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

Invalid instruction variants allowed #12

Closed
eschkufz opened this issue Apr 30, 2013 · 1 comment
Closed

Invalid instruction variants allowed #12

eschkufz opened this issue Apr 30, 2013 · 1 comment
Assignees

Comments

@eschkufz
Copy link
Contributor

The x64asm type system is insufficient for preventing users from requesting instruction such as:

crc32 %r12, %ah

(This shouldn't be allowed due to %r12 requiring a rex prefix.)

This occurs for other instructions in similar situations, such as when a memory operand requires an rex prefix. Fixing this issue will require a major re-architecting. I'd prefer to stay away from this is possible.

Known opcodes with this issue --

  • crc32
  • movsx
  • movzx
@eschkufz eschkufz added low. and removed enhancement labels Dec 2, 2014
@eschkufz eschkufz self-assigned this Dec 2, 2014
@eschkufz eschkufz changed the title Invalid variants allowed for crc32 Invalid instruction variants allowed Dec 2, 2014
@stefanheule stefanheule assigned stefanheule and unassigned eschkufz Apr 2, 2015
@stefanheule
Copy link
Member

I will implement a dynamic check in Instruction::check() for this. In the future, we might reevaluate the situation and decide to extend the type-system to catch this statically.

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