mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-11 00:56:52 +00:00
Add arm64 stp instruction (#8490)
This commit is contained in:
parent
0a619adc47
commit
d09adae6d2
@ -657,6 +657,23 @@ static ut32 adr(ArmOp *op, int addr) {
|
||||
return data;
|
||||
}
|
||||
|
||||
static ut32 stp(ArmOp *op, int k) {
|
||||
ut32 data = UT32_MAX;
|
||||
|
||||
if (op->operands[3].immediate & 0x7) {
|
||||
return data;
|
||||
}
|
||||
|
||||
data = k;
|
||||
data += op->operands[0].reg << 24;
|
||||
data += op->operands[1].reg << 18;
|
||||
data += (op->operands[2].reg & 0x7) << 29;
|
||||
data += (op->operands[2].reg >> 3) << 16;
|
||||
data += (op->operands[3].immediate & 0x8) << 20;
|
||||
data += (op->operands[3].immediate >> 4) << 8;
|
||||
return data;
|
||||
}
|
||||
|
||||
static ut32 exception(ArmOp *op, ut32 k) {
|
||||
ut32 data = UT32_MAX;
|
||||
|
||||
@ -899,6 +916,10 @@ bool arm64ass(const char *str, ut64 addr, ut32 *op) {
|
||||
*op = reglsop (&ops, 0x000000f8);
|
||||
return *op != -1;
|
||||
}
|
||||
if (!strncmp (str, "stp", 3)) {
|
||||
*op = stp (&ops, 0x000000a9);
|
||||
return *op != -1;
|
||||
}
|
||||
if (!strncmp (str, "sub", 3)) { // w
|
||||
*op = arithmetic (&ops, 0xd1);
|
||||
return *op != -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user