cmd/asm: constant MOVQ transformed to MOVL, but MOVL upper bit zeroing not guaranteed #58016
Labels
compiler/runtime
Issues related to the Go compiler and/or runtime.
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When 64bit immediate that can be fit into 32bit immediate is used as argument of MOVQ instruction, the compiler assembler transforms it to MOVL. On X86_64 platform the test shows that upper that upper 32bits of RAX are zeroed after MOVL of 32bit constant (tested on Xeon 6230N CPU). But there is no such statement in SDM so this behavior should be classified as 'non-documented' and can be easily changed by the platform owner without any announcement.
test.s
FileCommands that I run:
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: