diff options
author | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2012-08-24 08:02:51 +0000 |
---|---|---|
committer | Matthew Gretton-Dann <matthew.gretton-dann@arm.com> | 2012-08-24 08:02:51 +0000 |
commit | 8884b7208b371aa604ceab383380956c687065ee (patch) | |
tree | 14086fa47538911174f109a3a0201227c6694a2e /gas/config | |
parent | b79f7053dd3e33f7b5e61bac1f94be303b14fe77 (diff) | |
download | gdb-8884b7208b371aa604ceab383380956c687065ee.zip gdb-8884b7208b371aa604ceab383380956c687065ee.tar.gz gdb-8884b7208b371aa604ceab383380956c687065ee.tar.bz2 |
* gas/config/tc-arm.c (do_t_bkpt_hlt1): New function.
(do_t_hlt): New function.
(do_t_bkpt): Use do_t_bkpt_hlt1.
(insns): Add HLT.
* gas/testsuite/gas/arm/armv8-a-bad.l: Update for HLT.
* gas/testsuite/gas/arm/armv8-a-bad.s: Likewise.
* gas/testsuite/gas/arm/armv8-a.d: Likewise.
* gas/testsuite/gas/arm/armv8-a.s: Likewise.
* opcodes/arm-dis.c (arm_opcodes): Add HLT.
(thumb_opcodes): Likewise.
Diffstat (limited to 'gas/config')
-rw-r--r-- | gas/config/tc-arm.c | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 1c5eb31..d98944b 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -10198,18 +10198,34 @@ do_t_branch (void) inst.reloc.pc_rel = 1; } +/* Actually do the work for Thumb state bkpt and hlt. The only difference + between the two is the maximum immediate allowed - which is passed in + RANGE. */ static void -do_t_bkpt (void) +do_t_bkpt_hlt1 (int range) { constraint (inst.cond != COND_ALWAYS, _("instruction is always unconditional")); if (inst.operands[0].present) { - constraint (inst.operands[0].imm > 255, + constraint (inst.operands[0].imm > range, _("immediate value out of range")); inst.instruction |= inst.operands[0].imm; - set_it_insn_type (NEUTRAL_IT_INSN); } + + set_it_insn_type (NEUTRAL_IT_INSN); +} + +static void +do_t_hlt (void) +{ + do_t_bkpt_hlt1 (63); +} + +static void +do_t_bkpt (void) +{ + do_t_bkpt_hlt1 (255); } static void @@ -17974,7 +17990,9 @@ static const struct asm_opcode insns[] = #define THUMB_VARIANT & arm_ext_v8 tCE("sevl", 320f005, _sevl, 0, (), noargs, t_hint), + TUE("hlt", 1000070, ba80, 1, (oIffffb), bkpt, t_hlt), + /* ARMv8 T32 only. */ #undef ARM_VARIANT #define ARM_VARIANT NULL TUF("dcps1", 0, f78f8001, 0, (), noargs, noargs), |