Skip to content

Fix build for i386 #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2021
Merged

Conversation

mshinwell
Copy link
Collaborator

Two problems:

  • the i386 backend was out-of-date with respect to Cextcall;
  • the Flambda 2 code contained some constants that are unrepresentable on 32 bit hosts.


let num_occurrences_phantom t =
(t land 0xfffff_00000_00000) lsr 40
(t land (0xfffff lsl 40)) lsr 40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 32-bit targets, 0xfffff lsl 40 is 0, so the result of the expression in this line is always 0, is that intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flambda 2 doesn't support 32-bit compilation, so it's ok. It just needs not to cause a compile-time error when the compiler itself is being built.

@gretay-js gretay-js merged commit e3b1ba3 into ocaml-flambda:main Aug 4, 2021
mshinwell added a commit that referenced this pull request Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants