mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-26 22:50:48 +00:00
Fix sparc disassembler for big endian hosts ##endian
This commit is contained in:
parent
4ee16e2c81
commit
05bf34abe5
@ -2287,7 +2287,6 @@ ST_FUNC long long expr_const(TCCState *s1) {
|
||||
expect (s1, "constant expression");
|
||||
return 0;
|
||||
}
|
||||
return r_read_le64 (&s1->vtop->c.ll);
|
||||
return s1->vtop->c.ll;
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* radare2 - LGPL - Copyright 2014-2023 - pancake */
|
||||
/* radare2 - LGPL - Copyright 2014-2024 - pancake */
|
||||
|
||||
#include <r_anal.h>
|
||||
#include <r_lib.h>
|
||||
@ -136,7 +136,11 @@ performed in big-endian byte order.
|
||||
if (op->size < 4) {
|
||||
return false;
|
||||
}
|
||||
#if R_SYS_ENDIAN
|
||||
ut32 lbuf = r_read_ble32 (op->bytes, R_ARCH_CONFIG_IS_BIG_ENDIAN (as->config));
|
||||
#else
|
||||
ut32 lbuf = r_read_ble32 (op->bytes, !R_ARCH_CONFIG_IS_BIG_ENDIAN (as->config));
|
||||
#endif
|
||||
|
||||
// capstone-next
|
||||
int n = cs_disasm (handle, (const ut8*)&lbuf, sizeof (lbuf), addr, 1, &insn);
|
||||
|
Loading…
Reference in New Issue
Block a user