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
I find myself writing some ugly code to answer questions like "which 64-bit GPR is ch a part of? which bits?".
I would expect yaxpeax to provide APIs on RegSpec for this, though I understand if this is something you want to model in yaxpeax_arch, with the API design questions this involves.
The text was updated successfully, but these errors were encountered:
agreed on all counts! yaxpeax_core has a pretty unsatisfactory interface for this that i'd never gotten happy enough with to move over to arch, but i definitely agree that "this register selects the u64 you're using to represent rcx" or similar should be something this crate can answer. reading between the lines, that's kind of related to what @i509VCB was getting at over here (agh goodness that's an old issue)
so, that said, i think something more specifically suited to x86 is a great excuse to think about what a good interface would feel like.
things off the top of my head:
"what is the largest alias of this register?" (ch -> rcx)
"what is the smallest larger alias of this register?" (ch -> cx, cx -> ecx, ecx -> rcx)
"what registers are aliased by the largest alias of this register?" (ch -> {rcx, ecx, cx, cl}, maybe include ch in the list idk)
"what registers are aliased by the smallest larger alias of this register?" (ch -> {cx, cl}, maybe include ch in the list idk)
bonus: "where is this register, in that other register?" (ch -> (rcx, 8), cl -> (rcx, 0))
and of course at the minimum, "what is the largest alias?" and "what is the smallest larger alias?" should be const fn.
I find myself writing some ugly code to answer questions like "which 64-bit GPR is
ch
a part of? which bits?".I would expect
yaxpeax
to provide APIs onRegSpec
for this, though I understand if this is something you want to model inyaxpeax_arch
, with the API design questions this involves.The text was updated successfully, but these errors were encountered: