XINST_CREATE_sub fails to take sp as first source on A64
On A64 you can encode sub
with sp
as the first source, yet XINST_CREATE_sub
fails to encode:
XNST_CREATE_sub(dcontext, opnd_create_reg(DR_REG_X1), opnd_create_reg(DR_REG_SP),
opnd_create_reg(DR_REG_X2));
=>
<Internal Error: Failed to encode instruction: 'sub %sp %x2 lsl $0x0000000000000000 -> %x1'
It's because only the extended-register form takes sp
, while the macro hardcodes the shifted-register form. We should have it pick the extended.