aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2016-02-04 09:55:10 +0000
committerNick Clifton <nickc@redhat.com>2016-02-04 09:55:10 +0000
commitc1d9289fef41b82aa22f63f74aa8e730ec898d3c (patch)
treee477a2b77b58e8d51a359f02cba511bc00f85873 /gas/testsuite
parent1b18aa1e79a0b343087d08075f117e821c33b930 (diff)
downloadgdb-c1d9289fef41b82aa22f63f74aa8e730ec898d3c.zip
gdb-c1d9289fef41b82aa22f63f74aa8e730ec898d3c.tar.gz
gdb-c1d9289fef41b82aa22f63f74aa8e730ec898d3c.tar.bz2
Fix the encoding of the MSP430's RRUX instruction.
PR target/19561 opcdoe * msp430-dis.c (print_insn_msp430): Add a special case for decoding an RRC instruction with the ZC bit set in the extension word. include * opcode/msp430.h (IGNORE_CARRY_BIT): New define. (RRUX): Synthesise using case 2 rather than 7. gas * config/tc-msp430.c (msp430_operands): Remove case 7. Use case 2 to handle encoding of RRUX instruction. * testsuite/gas/msp430/msp430x.s: Add more tests of the extended shift instructions. * testsuite/gas/msp430/msp430x.d: Update expected disassembly.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/gas/msp430/msp430x.d53
-rw-r--r--gas/testsuite/gas/msp430/msp430x.s8
2 files changed, 36 insertions, 25 deletions
diff --git a/gas/testsuite/gas/msp430/msp430x.d b/gas/testsuite/gas/msp430/msp430x.d
index 6bd6db3..8eea453 100644
--- a/gas/testsuite/gas/msp430/msp430x.d
+++ b/gas/testsuite/gas/msp430/msp430x.d
@@ -201,27 +201,32 @@ Disassembly of section .text:
0+039e <[^>]*> 54 0b rrum #3, r4 ;
0+03a0 <[^>]*> 44 07 rrum.a #2, r4 ;
0+03a2 <[^>]*> 54 03 rrum #1, r4 ;
-0+03a4 <[^>]*> 54 03 rrum #1, r4 ;
-0+03a6 <[^>]*> 47 03 rrum.a #1, r7 ;
-0+03a8 <[^>]*> 45 11 rra.b r5 ;
-0+03aa <[^>]*> 75 c0 80 00 bic.b #128, r5 ;#0x0080
-0+03ae <[^>]*> 56 03 rrum #1, r6 ;
-0+03b0 <[^>]*> 40 18 81 10 swpbx.w r1 ;
-0+03b4 <[^>]*> 00 18 90 10 00 00 swpbx.a 0x0000 ;PC rel. 0x03b8
-0+03ba <[^>]*> 40 18 8c 10 swpbx.w r12 ;
-0+03be <[^>]*> 40 18 82 11 sxtx.w r2 ;
-0+03c2 <[^>]*> 00 18 92 11 00 00 sxtx.a &0x0000 ;
-0+03c8 <[^>]*> 40 18 82 11 sxtx.w r2 ;
-0+03cc <[^>]*> 04 18 45 11 rpt #5 \{ rrax.a r5 ;
-0+03d0 <[^>]*> 85 18 45 11 rpt r5 \{ rrax.a r5 ;
-0+03d4 <[^>]*> e2 01 adda r1, r2 ;
-0+03d6 <[^>]*> c0 01 mova r1, r0 ;
-0+03d8 <[^>]*> 41 13 calla r1 ;
-0+03da <[^>]*> 40 18 01 43 clrx.w r1 ;
-0+03de <[^>]*> d2 01 cmpa r1, r2 ;
-0+03e0 <[^>]*> 40 18 21 83 decdx.w r1 ;
-0+03e4 <[^>]*> 40 18 21 53 incdx.w r1 ;
-0+03e8 <[^>]*> c2 01 mova r1, r2 ;
-0+03ea <[^>]*> 10 01 reta ;
-0+03ec <[^>]*> f2 01 suba r1, r2 ;
-0+03ee <[^>]*> 40 18 80 93 00 00 cmpx.w #0, 0x00000 ;r3 As==00, PC rel. 0x003f2
+0+03a4 <[^>]*> 40 19 04 10 rrux.w r4 ;
+0+03a8 <[^>]*> 00 19 47 10 rrux.a r7 ;
+0+03ac <[^>]*> 40 19 45 10 rrux.b r5 ;
+0+03b0 <[^>]*> 40 19 06 10 rrux.w r6 ;
+0+03b4 <[^>]*> 40 18 81 10 swpbx.w r1 ;
+0+03b8 <[^>]*> 00 18 90 10 00 00 swpbx.a 0x0000 ;PC rel. 0x03bc
+0+03be <[^>]*> 40 18 8c 10 swpbx.w r12 ;
+0+03c2 <[^>]*> 40 18 82 11 sxtx.w r2 ;
+0+03c6 <[^>]*> 00 18 92 11 00 00 sxtx.a &0x0000 ;
+0+03cc <[^>]*> 40 18 82 11 sxtx.w r2 ;
+0+03d0 <[^>]*> 04 18 45 11 rpt #5 \{ rrax.a r5 ;
+0+03d4 <[^>]*> 85 18 45 11 rpt r5 \{ rrax.a r5 ;
+0+03d8 <[^>]*> e2 01 adda r1, r2 ;
+0+03da <[^>]*> c0 01 mova r1, r0 ;
+0+03dc <[^>]*> 41 13 calla r1 ;
+0+03de <[^>]*> 40 18 01 43 clrx.w r1 ;
+0+03e2 <[^>]*> d2 01 cmpa r1, r2 ;
+0+03e4 <[^>]*> 40 18 21 83 decdx.w r1 ;
+0+03e8 <[^>]*> 40 18 21 53 incdx.w r1 ;
+0+03ec <[^>]*> c2 01 mova r1, r2 ;
+0+03ee <[^>]*> 10 01 reta ;
+0+03f0 <[^>]*> f2 01 suba r1, r2 ;
+0+03f2 <[^>]*> 40 18 80 93 00 00 cmpx.w #0, 0x00000 ;r3 As==00, PC rel. 0x003f6
+0+03f8 <[^>]*> c1 19 01 10 rpt r1 \{ rrux.w r1 ;
+0+03fc <[^>]*> 41 18 02 10 rpt #2 \{ rrcx.w r2 ;
+0+0400 <[^>]*> 42 18 47 11 rpt #3 \{ rrax.b r7 ;
+0+0404 <[^>]*> 84 18 44 11 rpt r4 \{ rrax.a r4 ;
+0+0408 <[^>]*> 44 18 45 55 rpt #5 \{ rlax.b r5 ;
+0+040c <[^>]*> 05 18 46 66 rpt #6 \{ rlcx.a r6 ;
diff --git a/gas/testsuite/gas/msp430/msp430x.s b/gas/testsuite/gas/msp430/msp430x.s
index d968fae..8fef882 100644
--- a/gas/testsuite/gas/msp430/msp430x.s
+++ b/gas/testsuite/gas/msp430/msp430x.s
@@ -274,4 +274,10 @@ foo:
sub.a r1, r2
tst.a fooz
-
+ ;; Check that repeat counts can be used with shift instructions.
+ rpt r1 { rrux.w r1
+ rpt #2 { rrcx.w r2
+ rpt #3 { rrax.b r7
+ rpt r4 { rrax.a r4
+ rpt #5 { rlax.b r5
+ rpt #6 { rlcx.a r6