diff options
Diffstat (limited to 'src/arch/arm/v7/helpers.c')
-rw-r--r-- | src/arch/arm/v7/helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/arm/v7/helpers.c b/src/arch/arm/v7/helpers.c index 8acfeb5..45c6ba5 100644 --- a/src/arch/arm/v7/helpers.c +++ b/src/arch/arm/v7/helpers.c @@ -145,7 +145,7 @@ GArchOperand *sign_extend_armv7_imm(uint32_t value, bool topbit, unsigned int si mds = MDS_ ## sz ## _BITS_SIGNED; \ val ## sz = value; \ if (topbit) \ - for (i = msb + 1; i < sz; i++) \ + for (i = msb; i < sz; i++) \ val ## sz |= (1 << i); \ result = g_imm_operand_new_from_value(mds, val ## sz); \ break; |