mirror of
https://github.com/radareorg/radare2.git
synced 2025-02-19 05:38:43 +00:00
Add 'sar' opcode for 32 and 64bits in x86.nz
This commit is contained in:
parent
23a291b085
commit
5ef42734ab
@ -20,8 +20,7 @@ BLA:
|
||||
|
||||
static int getnum(RAsm *a, const char *s) {
|
||||
if (!s) return 0;
|
||||
if (*s=='$')
|
||||
s++;
|
||||
if (*s=='$') s++;
|
||||
return r_num_get (a->num, s);
|
||||
}
|
||||
|
||||
@ -597,6 +596,18 @@ static int assemble(RAsm *a, RAsmOp *ao, const char *str) {
|
||||
}
|
||||
} else eprintf ("Invalid args for lea?\n");
|
||||
return l;
|
||||
} else if (!strcmp (op, "sar")) {
|
||||
if (*arg=='r') { // 64bits
|
||||
data[l++] = 0x48;
|
||||
data[l++] = 0xc1;
|
||||
data[l++] = 0xf8 | getreg (arg);
|
||||
data[l++] = getnum (a, arg2);
|
||||
} else { // 32bits
|
||||
data[l++] = 0xc1;
|
||||
data[l++] = 0xf8 | getreg (arg);
|
||||
data[l++] = getnum (a, arg2);
|
||||
}
|
||||
return l;
|
||||
} else if (!strcmp (op, "cmovz")) {
|
||||
ut8 a, b;
|
||||
if ((a = getreg (arg))==0xff) return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user