From 21ed313e2c7a94a2971789a28bd67c1dd97efac0 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 18 Sep 2012 12:23:43 +0000 Subject: [PATCH] opcodes/ 2012-09-17 Yufeng Zhang * aarch64-asm.c (aarch64_ins_imm_half): Remove ATTRIBUTE_UNUSED from the parameter 'inst'. (aarch64_ins_addr_simm): Add ATTRIBUTE_UNUSED to the parameter 'inst'. (convert_mov_to_movewide): Change to assert (0) when aarch64_wide_constant_p returns FALSE. --- opcodes/ChangeLog | 8 ++++++++ opcodes/aarch64-asm.c | 11 ++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f8ba0a6a648..e2f535e0a39 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +2012-09-17 Yufeng Zhang + + * aarch64-asm.c (aarch64_ins_imm_half): Remove ATTRIBUTE_UNUSED from + the parameter 'inst'. + (aarch64_ins_addr_simm): Add ATTRIBUTE_UNUSED to the parameter 'inst'. + (convert_mov_to_movewide): Change to assert (0) when + aarch64_wide_constant_p returns FALSE. + 2012-08-17 Nagajyothi Eggone * i386-gen.c (cpu_flag_init): Add CPU_BTVER1_FLAGS and diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c index c3e3a4d84d1..b10a873004f 100644 --- a/opcodes/aarch64-asm.c +++ b/opcodes/aarch64-asm.c @@ -335,8 +335,7 @@ aarch64_ins_imm (const aarch64_operand *self, const aarch64_opnd_info *info, MOVZ , #{, LSL #}. */ const char* aarch64_ins_imm_half (const aarch64_operand *self, const aarch64_opnd_info *info, - aarch64_insn *code, - const aarch64_inst *inst ATTRIBUTE_UNUSED) + aarch64_insn *code, const aarch64_inst *inst) { /* imm16 */ aarch64_ins_imm (self, info, code, inst); @@ -531,7 +530,8 @@ aarch64_ins_addr_regoff (const aarch64_operand *self ATTRIBUTE_UNUSED, const char* aarch64_ins_addr_simm (const aarch64_operand *self, const aarch64_opnd_info *info, - aarch64_insn *code, const aarch64_inst *inst) + aarch64_insn *code, + const aarch64_inst *inst ATTRIBUTE_UNUSED) { int imm; @@ -1085,8 +1085,9 @@ convert_mov_to_movewide (aarch64_inst *inst) } inst->operands[1].type = AARCH64_OPND_HALF; is32 = inst->operands[0].qualifier == AARCH64_OPND_QLF_W; - /* This should have been guaranteed by the constraint check. */ - assert (aarch64_wide_constant_p (value, is32, &shift_amount) == TRUE); + if (! aarch64_wide_constant_p (value, is32, &shift_amount)) + /* The constraint check should have guaranteed this wouldn't happen. */ + assert (0); value >>= shift_amount; value &= 0xffff; inst->operands[1].imm.value = value; -- 2.47.2