Skip to content

Emit the rounding instructions for Float.round, Float.trunc, ceil and floor on arm64 and power - #15017

Open
Zaneham wants to merge 4 commits into
ocaml:trunkfrom
Zaneham:float-round
Open

Emit the rounding instructions for Float.round, Float.trunc, ceil and floor on arm64 and power#15017
Zaneham wants to merge 4 commits into
ocaml:trunkfrom
Zaneham:float-round

Conversation

@Zaneham

@Zaneham Zaneham commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Hello,

Float.round, Float.trunc, ceil and floor went out to C everywhere, though arm64
and power have had one instruction for each since ARMv8-A and ISA 2.02. Eight
calls become eight instructions.

riscv needs Zfa and s390x needs z196 for the form that doesn't raise inexact,
so I can't do both, GCC does the same thing.

Tested on cfarm185 and cfarm120.

@nojb nojb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@nojb

nojb commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Please update Changes entry and we can merge. Thanks!

@Zaneham

Zaneham commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Done! :-)

@nojb nojb added the merge-me label Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants