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
Milestone

Comments

@rasky
Copy link
Member

@rasky 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

@bradfitz bradfitz commented Apr 25, 2017

Loading

@bradfitz bradfitz added this to the Go1.10 milestone Jul 14, 2017
@bradfitz bradfitz removed this from the Go1.9Maybe milestone Jul 14, 2017
@quasilyte
Copy link
Contributor

@quasilyte 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.

Loading

@rsc
Copy link
Contributor

@rsc 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.

Loading

@rsc rsc added the NeedsFix label Dec 4, 2017
@rsc rsc removed this from the Go1.10 milestone Dec 4, 2017
@rsc rsc added this to the Go1.11 milestone Dec 4, 2017
@gopherbot gopherbot removed this from the Go1.11 milestone May 23, 2018
@gopherbot gopherbot added this to the Unplanned milestone May 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants