From a028a6f5344b31f555a14d6769b61e6871317475 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 4 Jan 2007 20:08:36 +0000 Subject: [PATCH] 2007-01-04 Paul Brook gas/ * config/tc-arm.c (do_cpsi): Set mmod bit for 2 argument form. gas/testsuite/ * gas/arm/archv6.s: Add more cpsie tests. * gas/arm/archv6.d: Ditto. opcodes/ * arm-dis.c (arm_opcodes): Fix cpsie and cpsid entries. --- gas/ChangeLog | 4 ++++ gas/config/tc-arm.c | 7 ++++++- gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/arm/archv6.d | 2 ++ gas/testsuite/gas/arm/archv6.s | 2 ++ opcodes/ChangeLog | 4 ++++ opcodes/arm-dis.c | 8 ++++---- 7 files changed, 27 insertions(+), 5 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 096ed251e1e..2955f4ce994 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2007-01-04 Paul Brook + + * config/tc-arm.c (do_cpsi): Set mmod bit for 2 argument form. + 2007-01-04 H.J. Lu PR gas/3826 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index a95fcb67feb..45b8d2e85df 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -548,6 +548,7 @@ struct asm_opcode #define INDEX_UP 0x00800000 #define WRITE_BACK 0x00200000 #define LDM_TYPE_2_OR_3 0x00400000 +#define CPSI_MMOD 0x00020000 #define LITERAL_MASK 0xf000f000 #define OPCODE_MASK 0xfe1fffff @@ -6828,7 +6829,11 @@ static void do_cpsi (void) { inst.instruction |= inst.operands[0].imm << 6; - inst.instruction |= inst.operands[1].imm; + if (inst.operands[1].present) + { + inst.instruction |= CPSI_MMOD; + inst.instruction |= inst.operands[1].imm; + } } static void diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 40a58956ea3..df0a747fa94 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-01-04 Paul Brook + + * gas/arm/archv6.s: Add more cpsie tests. + * gas/arm/archv6.d: Ditto. + 2007-01-04 Andreas Schwab * gas/m68k/cpu32.[sd]: New test. diff --git a/gas/testsuite/gas/arm/archv6.d b/gas/testsuite/gas/arm/archv6.d index 1dbaad3a714..ed78384de41 100644 --- a/gas/testsuite/gas/arm/archv6.d +++ b/gas/testsuite/gas/arm/archv6.d @@ -217,3 +217,5 @@ Disassembly of section .text: 0+344 <[^>]*> e6ef2475 ? uxtb r2,r5, ROR #8 0+348 <[^>]*> 16ef2075 ? uxtbne r2,r5 0+34c <[^>]*> 16ef2475 ? uxtbne r2,r5, ROR #8 +0+350 <[^>]*> f10a00ca ? cpsie if,#10 +0+354 <[^>]*> f10a00d5 ? cpsie if,#21 diff --git a/gas/testsuite/gas/arm/archv6.s b/gas/testsuite/gas/arm/archv6.s index 50378b7c379..d55c98f0a65 100644 --- a/gas/testsuite/gas/arm/archv6.s +++ b/gas/testsuite/gas/arm/archv6.s @@ -214,3 +214,5 @@ label: uxtb r2, r5, ROR #8 uxtbne r2, r5 uxtbne r2, r5, ROR #8 + cpsie if, #10 + cpsie if, #21 diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index d3985069270..7e43932364a 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,7 @@ +2007-01-04 Paul Brook + + * arm-dis.c (arm_opcodes): Fix cpsie and cpsid entries. + 2007-01-04 Andreas Schwab * m68k-opc.c: Fix encoding of signed bit in the cpu32 tbls insns. diff --git a/opcodes/arm-dis.c b/opcodes/arm-dis.c index a1f250c10ec..3523cabcd5d 100644 --- a/opcodes/arm-dis.c +++ b/opcodes/arm-dis.c @@ -814,10 +814,10 @@ static const struct opcode32 arm_opcodes[] = {ARM_EXT_V6K, 0x0320f000, 0x0fffff00, "nop%c\t{%0-7d}"}, /* ARM V6 instructions. */ - {ARM_EXT_V6, 0xf1080000, 0xfffdfe3f, "cpsie\t%8'a%7'i%6'f"}, - {ARM_EXT_V6, 0xf1080000, 0xfffdfe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"}, - {ARM_EXT_V6, 0xf10C0000, 0xfffdfe3f, "cpsid\t%8'a%7'i%6'f"}, - {ARM_EXT_V6, 0xf10C0000, 0xfffdfe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"}, + {ARM_EXT_V6, 0xf1080000, 0xfffffe3f, "cpsie\t%8'a%7'i%6'f"}, + {ARM_EXT_V6, 0xf10a0000, 0xfffffe20, "cpsie\t%8'a%7'i%6'f,#%0-4d"}, + {ARM_EXT_V6, 0xf10C0000, 0xfffffe3f, "cpsid\t%8'a%7'i%6'f"}, + {ARM_EXT_V6, 0xf10e0000, 0xfffffe20, "cpsid\t%8'a%7'i%6'f,#%0-4d"}, {ARM_EXT_V6, 0xf1000000, 0xfff1fe20, "cps\t#%0-4d"}, {ARM_EXT_V6, 0x06800010, 0x0ff00ff0, "pkhbt%c\t%12-15r, %16-19r, %0-3r"}, {ARM_EXT_V6, 0x06800010, 0x0ff00070, "pkhbt%c\t%12-15r, %16-19r, %0-3r, LSL #%7-11d"},