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

Implicit ST0 operands of X87 instructions #162

Open
andreas-abel opened this issue Dec 19, 2018 · 2 comments
Open

Implicit ST0 operands of X87 instructions #162

andreas-abel opened this issue Dec 19, 2018 · 2 comments

Comments

@andreas-abel
Copy link
Contributor

I think the implicit ST0 operands of several X87 instructions should actually be suppressed. An example is the FLD instruction: the ST0 operand is not expressed in disassembly, and it is also not used for picking an encoding. Therefore, it should be suppressed.

@markcharney
Copy link
Contributor

x87 is a little strange. Technically you are right. This is some of the oldest stuff in XED. I do not recall what MS disasm did at the time. But I recall thinking that I didn't like having written suppressed operands that were nominally the destination operand not be listed the first register in the list. So I made them implicit so they'd show up and they'd show up first, where dest's belong in "intel" format disasm. Now after 14 or so years, I am reluctant to change them as there might be XED users out there with code that expects them to behave this way. I'm still thinking though. I could probably add an attribute and a new disassembly formatting option to drop the implicit operand if that attribute is present.

If you don't mind my asking what are you doing that you encountered the 4 issues that you reported?

@andreas-abel
Copy link
Contributor Author

I'm using the instruction files from XED to automatically generate assembler code for measuring the latency, throughput, and port usage of individual x86 instructions on different microarchitectures. You can find out more on www.uops.info. In particular, I'm using the XED files to create an XML representation of the x86 instruction set that makes it easy to generate assembler code for all instructions (see http://www.uops.info/xml.html).

The issue I reported here is not really critical for me, as I have a workaround (I'm just making all implicit operands of X87_ALU instructions suppressed). So if there is a good reason for leaving it as it is, I'm fine with that.

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

No branches or pull requests

2 participants