Skip to content

Commit

Permalink
i#1569 AArch64: Disable sign_extend_immed on AArch64.
Browse files Browse the repository at this point in the history
The automatic sign extension is probably only useful on Intel but
is left enabled on ARM (AArch32) so as not to change the output
from tests (api.disA32, api.disT32, api.static).

This only affects disassembly.

Review-URL: https://codereview.appspot.com/301090043
  • Loading branch information
egrimley-arm committed Jul 4, 2016
1 parent b86fc3a commit ecdd2f7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/arch/disassemble_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,14 @@ sign_extend_immed(instr_t *instr, int srcnum, opnd_t *src)
{
opnd_size_t opsz = OPSZ_NA;
bool resize = true;

#if !defined(X86) && !defined(ARM)
/* Automatic sign extension is probably only useful on Intel but
* is left enabled on ARM (AArch32) as it is what some tests expect.
*/
return;
#endif

if (opnd_is_immed_int(*src)) {
/* PR 327775: force operand to sign-extend if all other operands
* are of a larger and identical-to-each-other size (since we
Expand Down

0 comments on commit ecdd2f7

Please sign in to comment.