You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've got decent coverage of the decoder API but very little of the encoder. We need to do that. There should be decent coverage of the XED enums so this should mostly be just binding the various xed_encoder_request_set_xxx methods.
As far as I can tell the general way that encoding works in XED is as follows:
You create an empty xed_encoder_request_t (which is actually a xed_decoded_inst_t)
You set a bunch of options on it
You call xed_encode to encode the instruction
Some extra notes:
We can't use DecodedInst as-is because a bunch of the accessors panic if they get an invalid XED enum value. We either need to adjust how it works, or define a new type to use instead.
xed_operand_values_t is also a xed_decoded_inst_t. I'm not sure if a pointer gets stored in the instruction and thus there should be lifetimes involved.
There's also xed_encode_nop which doesn't quite fit in but might be ok to have as a free-floating function.
I suspect a InstructionBuilder type thing might actually be a good fit here. I haven't really spent any time thinking about what it would look like though.
The text was updated successfully, but these errors were encountered:
We've got decent coverage of the decoder API but very little of the encoder. We need to do that. There should be decent coverage of the XED enums so this should mostly be just binding the various
xed_encoder_request_set_xxx
methods.As far as I can tell the general way that encoding works in XED is as follows:
xed_encoder_request_t
(which is actually axed_decoded_inst_t
)xed_encode
to encode the instructionSome extra notes:
DecodedInst
as-is because a bunch of the accessors panic if they get an invalid XED enum value. We either need to adjust how it works, or define a new type to use instead.xed_operand_values_t
is also axed_decoded_inst_t
. I'm not sure if a pointer gets stored in the instruction and thus there should be lifetimes involved.xed_encode_nop
which doesn't quite fit in but might be ok to have as a free-floating function.I suspect a
InstructionBuilder
type thing might actually be a good fit here. I haven't really spent any time thinking about what it would look like though.The text was updated successfully, but these errors were encountered: