summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryufeng <yufeng>2012-10-15 14:52:05 +0000
committeryufeng <yufeng>2012-10-15 14:52:05 +0000
commit8b44e7ce7fc895e34ffdc44a6363ec75d3355a1c (patch)
treeae6a4c9fc4a3f9fccd5d7a53b94291a85076c7eb
parentaaea4effb8b199247b3cbd5ed0a57dc774852bca (diff)
downloadgdb-8b44e7ce7fc895e34ffdc44a6363ec75d3355a1c.tar.gz
Added missing alignment check to load/store uimm12 immediate offset.
opcodes/ * aarch64-opc.c (operand_general_constraint_met_p): Change to check the alignment of addr.offset.imm instead of that of shifter.amount for operand type AARCH64_OPND_ADDR_UIMM12. gas/testsuite/ * gas/aarch64/illegal-2.s: Add test case. * gas/aarch64/illegal-2.l: Likewise.
-rw-r--r--opcodes/aarch64-opc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c
index 2d66a255e95..8c709383004 100644
--- a/opcodes/aarch64-opc.c
+++ b/opcodes/aarch64-opc.c
@@ -1426,7 +1426,7 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx,
0, 4095 * size);
return 0;
}
- if (!value_aligned_p (opnd->shifter.amount, size))
+ if (!value_aligned_p (opnd->addr.offset.imm, size))
{
set_unaligned_error (mismatch_detail, idx, size);
return 0;