Skip to content
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
Open

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

rasky opened this issue Apr 25, 2017 · 3 comments
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rasky
Copy link
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 x86asm: 64-bit CMOV is disassembled as 32-bit CMOV 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
Copy link
Contributor

/cc @cherrymui @randall77

@bradfitz bradfitz added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jul 14, 2017
@bradfitz bradfitz modified the milestones: Go1.10, Go1.9Maybe Jul 14, 2017
@quasilyte
Copy link
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
Copy link
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 The path to resolution is known, but the work has not been done. label Dec 4, 2017
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. 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
Labels
NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

5 participants