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

x/arch/x86/x86asm: 64-bit CMOV is disassembled as 32-bit CMOV #20111

Open
rasky opened this Issue Apr 25, 2017 · 3 comments

Comments

Projects
None yet
5 participants
@rasky
Member

rasky commented Apr 25, 2017

These two sequences are disassembled by x86asm with the same string:

0f4dd0        CMOVGE AX, DX
480f4dd0      CMOVGE AX, DX

If I'm not mistaken, the second is the 64-bit version and should probably use a mnemonic like CMOVQGE (or the other one should use CMOVLGE).

@bradfitz bradfitz changed the title from x86asm: 64-bit CMOV is disassembled as 32-bit CMOV to x/arch/x86/x86asm: 64-bit CMOV is disassembled as 32-bit CMOV Apr 25, 2017

@bradfitz bradfitz added this to the Go1.9Maybe milestone Apr 25, 2017

@bradfitz

This comment has been minimized.

Member

bradfitz commented Apr 25, 2017

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jul 14, 2017

@Quasilyte

This comment has been minimized.

Contributor

Quasilyte commented Sep 17, 2017

This is not the only case.

I have no concrete examples yet, but quite recently I assembled hand-coded file and
disassembled listing had different mnemonics. The disasm output was acquired by go tool objdump, so it may be unrelated.

When this will pop up again, I will post them here.

@rsc

This comment has been minimized.

Contributor

rsc commented Dec 4, 2017

If the decision is whether to make a fix, then I think the answer is yes: CMOVGE is not an instruction, it should have an L or Q in both cases.

@rsc rsc added the NeedsFix label Dec 4, 2017

@gopherbot gopherbot removed the NeedsDecision label Dec 4, 2017

@rsc rsc modified the milestones: Go1.10, Go1.11 Dec 4, 2017

@gopherbot gopherbot modified the milestones: Go1.11, Unplanned May 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment