From dc4503c6810ce9cca69448d2cc0a7804671ffef4 Mon Sep 17 00:00:00 2001 From: Paul Brook Date: Thu, 11 Jan 2007 15:39:08 +0000 Subject: [PATCH] 2007-01-11 Paul Brook gas/ * config/tc-arm.c (do_t_add_sub): Use Rd and Rs. gas/testsuite/ * gas/arm/thumb2_add.d: Add test for missing operand. * gas/arm/thumb2_add.s: Ditto. --- gas/ChangeLog | 4 ++++ gas/config/tc-arm.c | 4 ++-- gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/arm/thumb2_add.d | 2 ++ gas/testsuite/gas/arm/thumb2_add.s | 2 ++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 21c82999659..b3afb4bd15e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2007-01-11 Paul Brook + + * config/tc-arm.c (do_t_add_sub): Use Rd and Rs. + 2007-01-11 Nick Clifton PR gas/3707 diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 6a2756decd7..4f341cb9f81 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -8414,8 +8414,8 @@ do_t_add_sub (void) else inst.reloc.type = BFD_RELOC_ARM_T32_ADD_IMM; } - inst.instruction |= inst.operands[0].reg << 8; - inst.instruction |= inst.operands[1].reg << 16; + inst.instruction |= Rd << 8; + inst.instruction |= Rs << 16; } } else diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 06360e9e8a5..6001e8ee82d 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-01-11 Paul Brook + + * gas/arm/thumb2_add.d: Add test for missing operand. + * gas/arm/thumb2_add.s: Ditto. + 2007-01-11 Nick Clifton * gas/mcore/allinsn.s: Remove use of '#' before numbers - it is a diff --git a/gas/testsuite/gas/arm/thumb2_add.d b/gas/testsuite/gas/arm/thumb2_add.d index 6331acfc2f4..c63e5e6c70c 100644 --- a/gas/testsuite/gas/arm/thumb2_add.d +++ b/gas/testsuite/gas/arm/thumb2_add.d @@ -16,3 +16,5 @@ Disassembly of section .text: 0+024 <[^>]+> f5a9 6880 sub.w r8, r9, #1024 ; 0x400 0+028 <[^>]+> f2a9 1801 subw r8, r9, #257 ; 0x101 0+02c <[^>]+> f2a1 1301 subw r3, r1, #257 ; 0x101 +0+030 <[^>]+> f103 0301 add.w r3, r3, #1 ; 0x1 +0+034 <[^>]+> f1a3 0301 sub.w r3, r3, #1 ; 0x1 diff --git a/gas/testsuite/gas/arm/thumb2_add.s b/gas/testsuite/gas/arm/thumb2_add.s index c1803863e79..70ab86cd3ff 100644 --- a/gas/testsuite/gas/arm/thumb2_add.s +++ b/gas/testsuite/gas/arm/thumb2_add.s @@ -17,3 +17,5 @@ thumb2_add: sub r8, r9, #0x400 sub r8, r9, #0x101 sub r3, r1, #0x101 + add r3, #1 + sub r3, #1 -- 2.30.2