cfallin opened Issue #2586:
Currently, the new x64 backend encodes operand-size information into
x64::Inst
s in various ways, depending on the arm of the enum. We should refactor so that we use anOperandSize
universally; this would cut down a bit on boilerplate and would add some clarity.Related to that, we also have some fairly subtle logic surrounding REX-prefix emission. We should modify
RexFlags
so that it takes anOperandSize
in its constructor, to make REX-prefix errors less likely.
kaseyc commented on Issue #2586:
Hi Chris,
From looking at inst/mod.rs refactoring Inst to use OperandSize seems straightforward enough on the surface (famous last words).
Do you mind if I take a stab at it?
bnjbvr labeled Issue #2586:
Currently, the new x64 backend encodes operand-size information into
x64::Inst
s in various ways, depending on the arm of the enum. We should refactor so that we use anOperandSize
universally; this would cut down a bit on boilerplate and would add some clarity.Related to that, we also have some fairly subtle logic surrounding REX-prefix emission. We should modify
RexFlags
so that it takes anOperandSize
in its constructor, to make REX-prefix errors less likely.
bnjbvr labeled Issue #2586:
Currently, the new x64 backend encodes operand-size information into
x64::Inst
s in various ways, depending on the arm of the enum. We should refactor so that we use anOperandSize
universally; this would cut down a bit on boilerplate and would add some clarity.Related to that, we also have some fairly subtle logic surrounding REX-prefix emission. We should modify
RexFlags
so that it takes anOperandSize
in its constructor, to make REX-prefix errors less likely.
cfallin commented on Issue #2586:
@kaseyc -- please do! This is a pretty well-scoped issue I think -- you should be able to change the
Inst
enum first and then just follow the type errors all the way. Thanks!
cfallin closed Issue #2586:
Currently, the new x64 backend encodes operand-size information into
x64::Inst
s in various ways, depending on the arm of the enum. We should refactor so that we use anOperandSize
universally; this would cut down a bit on boilerplate and would add some clarity.Related to that, we also have some fairly subtle logic surrounding REX-prefix emission. We should modify
RexFlags
so that it takes anOperandSize
in its constructor, to make REX-prefix errors less likely.
Last updated: Dec 23 2024 at 12:05 UTC