mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-13 16:18:33 +00:00
anal_xtensa: fix l32r offset calculation (#5740)
This commit is contained in:
parent
547e98e1f4
commit
0f168ff73b
@ -747,21 +747,24 @@ static void esil_load_relative(xtensa_isa isa, xtensa_opcode opcode, xtensa_form
|
||||
xtensa_regfile dst_rf = xtensa_operand_regfile (isa, opcode, 0);
|
||||
|
||||
// example: l32r a2, 0x10
|
||||
// 0x10,pc,-, // address on stack
|
||||
// 0xFFFFFFFC,& // clear 3 lsb
|
||||
// 0x10,$$,3,+ // l32r address + 3 on stack
|
||||
// 0xFFFFFFFC,&, // clear 2 lsb
|
||||
// -, // subtract offset
|
||||
// [4], // read data
|
||||
// a2, // push data reg
|
||||
// = // assign to data reg
|
||||
// a2, // push data reg
|
||||
// = // assign to data reg
|
||||
|
||||
offset = - ((offset | 0xFFFF0000) << 2);
|
||||
|
||||
r_strbuf_appendf (
|
||||
&op->esil,
|
||||
"0x%x" CM
|
||||
"pc" CM
|
||||
"-" CM
|
||||
"$$" CM
|
||||
"3" CM
|
||||
"+" CM
|
||||
"0xFFFFFFFC" CM
|
||||
"&" CM
|
||||
"-" CM
|
||||
"[4]" CM
|
||||
"%s%d" CM
|
||||
"=",
|
||||
|
Loading…
Reference in New Issue
Block a user