jameysharp requested wasmtime-compiler-reviewers for a review on PR #8445.
jameysharp requested elliottt for a review on PR #8445.
jameysharp opened PR #8445 from jameysharp:x64-32bit-imm
to bytecodealliance:main
:
On x86-64, instructions which take 32-bit immediate operands in 64-bit mode sign-extend those immediates.
To accommodate that, we currently only generate an immediate if the 64-bit constant we want is equal to truncating to 32 bits and then sign-extending back to 64 bits. Otherwise we put the 64-bit constant in the constant pool.
However, if the constant's type is I32, we don't care about its upper 32 bits. In that case it's safe to generate an immediate whether the sign bit is set or not. We should never need to use the constant pool for types smaller than 64 bits on x64.
github-actions[bot] commented on PR #8445:
Subscribe to Label Action
cc @cfallin, @fitzgen
<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64", "isle"Thus the following users have been cc'd because of the following labels:
- cfallin: isle
- fitzgen: isle
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
fitzgen submitted PR review:
ha, good find :p
fitzgen merged PR #8445.
Last updated: Dec 23 2024 at 12:05 UTC