* gas/mips/beq.d, gas/mips/beq.s: Remove checks for
authorMaciej W. Rozycki <macro@linux-mips.org>
Mon, 5 Jul 2010 23:46:21 +0000 (23:46 +0000)
committerMaciej W. Rozycki <macro@linux-mips.org>
Mon, 5 Jul 2010 23:46:21 +0000 (23:46 +0000)
branch-likely instructions.
* gas/mips/bge.d, gas/mips/bge.s: Likewise.
* gas/mips/bgeu.d, gas/mips/bgeu.s: Likewise.
* gas/mips/blt.d, gas/mips/blt.s: Likewise.
* gas/mips/bltu.d, gas/mips/bltu.s: Likewise.
* gas/mips/branch-likely.d, gas/mips/branch-likely.s: New test,
collecting checks for branch-likely instructions removed from
the above.
* gas/mips/mips.exp: Run the new test and update the
constraints for the updated tests to include MIPS I.

14 files changed:
gas/testsuite/ChangeLog
gas/testsuite/gas/mips/beq.d
gas/testsuite/gas/mips/beq.s
gas/testsuite/gas/mips/bge.d
gas/testsuite/gas/mips/bge.s
gas/testsuite/gas/mips/bgeu.d
gas/testsuite/gas/mips/bgeu.s
gas/testsuite/gas/mips/blt.d
gas/testsuite/gas/mips/blt.s
gas/testsuite/gas/mips/bltu.d
gas/testsuite/gas/mips/bltu.s
gas/testsuite/gas/mips/branch-likely.d [new file with mode: 0644]
gas/testsuite/gas/mips/branch-likely.s [new file with mode: 0644]
gas/testsuite/gas/mips/mips.exp

index 7a8f664995efc95bf98fd6c2f552601dbdc14f12..d839fdc587a79cf9a9b63084f5d92427c97e67a8 100644 (file)
@@ -1,3 +1,17 @@
+2010-07-05  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * gas/mips/beq.d, gas/mips/beq.s: Remove checks for
+       branch-likely instructions.
+       * gas/mips/bge.d, gas/mips/bge.s: Likewise.
+       * gas/mips/bgeu.d, gas/mips/bgeu.s: Likewise.
+       * gas/mips/blt.d, gas/mips/blt.s: Likewise.
+       * gas/mips/bltu.d, gas/mips/bltu.s: Likewise.
+       * gas/mips/branch-likely.d, gas/mips/branch-likely.s: New test,
+       collecting checks for branch-likely instructions removed from
+       the above.
+       * gas/mips/mips.exp: Run the new test and update the
+       constraints for the updated tests to include MIPS I.
+
 2010-07-05  Maciej W. Rozycki  <macro@codesourcery.com>
 
        * gas/mips/mips4-fp.d: Reformat.
index 09971dc565f8800c5158681d9332130845ba2d73..4da3d126d7af01d72b55336afcfd885274a2e47f 100644 (file)
@@ -28,22 +28,18 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> beq  a0,at,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> bnez a0,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> beqzl        a0,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> bnezl        a0,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
        \.\.\.
 [0-9a-f]+ <[^>]*> j    0+0000 <.*>
-[      ]*20068: (MIPS_JMP|JMPADDR|R_MIPS_26)   \.text
+[      ]*20058: (MIPS_JMP|JMPADDR|R_MIPS_26)   \.text
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> jal  0+0000 <.*>
-[      ]*20070: (MIPS_JMP|JMPADDR|R_MIPS_26)   \.text
+[      ]*20060: (MIPS_JMP|JMPADDR|R_MIPS_26)   \.text
 [0-9a-f]+ <[^>]*> nop
-#[0-9a-f]+ <[^>]*> b   0+20078 <.*\+0x20078>
-#[     ]*20078: .*16   external_label
+#[0-9a-f]+ <[^>]*> b   0+20068 <.*\+0x20068>
+#[     ]*20068: .*16   external_label
 #[0-9a-f]+ <[^>]*> nop
-#[0-9a-f]+ <[^>]*> bal 0+20080 <.*\+0x20080>
-#[     ]*20080: .*16   external_label
+#[0-9a-f]+ <[^>]*> bal 0+20070 <.*\+0x20070>
+#[     ]*20070: .*16   external_label
 #[0-9a-f]+ <[^>]*> nop
        \.\.\.
index ae7c7507885ed81d1dfd9dac3629413a85e36e9d..b3205f93fa9ac9b4bb192523591c04e76cdebbbe 100644 (file)
@@ -12,11 +12,6 @@ text_label:
 # bne is handled by the same code as beq.  Just sanity check.
        bne     $4,0,text_label
 
-# Sanity check beql and bnel
-       .set    mips2
-       beql    $4,0,text_label
-       bnel    $4,0,text_label
-
 # Test that branches which overflow are converted to jumps.
        .space  0x20000
        b       text_label
index 56041287d94387700dbcdbf8e6dd29156bc3cf87..a1d04fd36c030711d818fd56f161c50dcc263d0b 100644 (file)
@@ -47,25 +47,11 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> bgtz a0,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> beqz at,0+00a0 <.*\+0xa0>
+[      ]*a0: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> beqz at,0+00b8 <.*\+0xb8>
-[      ]*b8: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> bnez at,0+00c4 <.*\+0xc4>
-[      ]*c4: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> beqzl        at,0+00d0 <.*\+0xd0>
-[      ]*d0: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> bnezl        at,0+00dc <.*\+0xdc>
-[      ]*dc: .*16      external_label
+[0-9a-f]+ <[^>]*> bnez at,0+00ac <.*\+0xac>
+[      ]*ac: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
        \.\.\.
index 4b4e58f6d69bad91c5a64ff4b84ace7ad27b957e..6dc0ce1cf8f04426f1fac7e125dcb417a2be26d9 100644 (file)
@@ -19,16 +19,9 @@ text_label:
        bgt     $0,$5,text_label
        bgt     $4,0,text_label
 
-# Sanity test bgel and bgtl
-       .set    mips2
-       bgel    $4,$5,text_label
-       bgtl    $4,$5,text_label
-
 # Branch to an external label.
        bge     $4,$5,external_label
        bgt     $4,$5,external_label
-       bgel    $4,$5,external_label
-       bgtl    $4,$5,external_label
 
 # Round to a 16 byte boundary, for ease in testing multiple targets.
        nop
index 4fb9770f47922bbf7dad8c9e3cd70be59fbc32cb..8b14fe8c2760d47d5fe0cc51da48b8bd67214af3 100644 (file)
@@ -41,25 +41,11 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> bnez a0,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> beqz at,0+0088 <.*\+0x88>
+[      ]*88: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> beqz at,0+00a0 <.*\+0xa0>
-[      ]*a0: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> bnez at,0+00ac <.*\+0xac>
-[      ]*ac: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> beqzl        at,0+00b8 <.*\+0xb8>
-[      ]*b8: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> bnezl        at,0+00c4 <.*\+0xc4>
-[      ]*c4: .*16      external_label
+[0-9a-f]+ <[^>]*> bnez at,0+0094 <.*\+0x94>
+[      ]*94: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
        \.\.\.
index cccd584f780a4d38d1bb20a946514180e7a7ad08..dcfbfdb81feef1cbb45c9615028d0f1c19c75d59 100644 (file)
@@ -17,16 +17,9 @@ text_label:
        bgtu    $4,$0,text_label
        bgtu    $4,0,text_label
 
-# Sanity test bgeul and bgtul
-       .set    mips2
-       bgeul   $4,$5,text_label
-       bgtul   $4,$5,text_label
-
 # Branch to an external label.
        bgeu    $4,$5,external_label
        bgtu    $4,$5,external_label
-       bgeul   $4,$5,external_label
-       bgtul   $4,$5,external_label
 
 # Round to a 16 byte boundary, for ease in testing multiple targets.
        nop
index 919a786fab6707a42189611cf40611fcd08ec6c3..b0158f4049788e7e1613f2e9a847493923bd734d 100644 (file)
@@ -47,25 +47,11 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> blez a0,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> bnez at,0+00a0 <.*\+0xa0>
+[      ]*a0: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> bnez at,0+00b8 <.*\+0xb8>
-[      ]*b8: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> beqz at,0+00c4 <.*\+0xc4>
-[      ]*c4: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a0,a1
-[0-9a-f]+ <[^>]*> bnezl        at,0+00d0 <.*\+0xd0>
-[      ]*d0: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> slt  at,a1,a0
-[0-9a-f]+ <[^>]*> beqzl        at,0+00dc <.*\+0xdc>
-[      ]*dc: .*16      external_label
+[0-9a-f]+ <[^>]*> beqz at,0+00ac <.*\+0xac>
+[      ]*ac: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
        \.\.\.
index 9b2ed08524f396cd7d6212d7df6073ab87f1ae6d..2efebfa3efc6eeeea436eff49353e46f7704e110 100644 (file)
@@ -19,16 +19,9 @@ text_label:
        ble     $0,$5,text_label
        ble     $4,0,text_label
 
-# Sanity test bltl and blel
-       .set    mips2
-       bltl    $4,$5,text_label
-       blel    $4,$5,text_label
-
 # Branch to an external label.
        blt     $4,$5,external_label
        ble     $4,$5,external_label
-       bltl    $4,$5,external_label
-       blel    $4,$5,external_label
 
 # Round to a 16 byte boundary, for ease in testing multiple targets.
        nop
index 607809b2e8c9f532496a40f48f3d00f20ff5b923..bf6f19c859ca3a6ceba3738fd40cdd8875eeb312 100644 (file)
@@ -41,25 +41,11 @@ Disassembly of section \.text:
 [0-9a-f]+ <[^>]*> beqz a0,0+0000 <.*>
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> bnez at,0+0088 <.*\+0x88>
+[      ]*88: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
 [0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> bnez at,0+00a0 <.*\+0xa0>
-[      ]*a0: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> beqz at,0+00ac <.*\+0xac>
-[      ]*ac: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a0,a1
-[0-9a-f]+ <[^>]*> bnezl        at,0+00b8 <.*\+0xb8>
-[      ]*b8: .*16      external_label
-[0-9a-f]+ <[^>]*> nop
-[0-9a-f]+ <[^>]*> sltu at,a1,a0
-[0-9a-f]+ <[^>]*> beqzl        at,0+00c4 <.*\+0xc4>
-[      ]*c4: .*16      external_label
+[0-9a-f]+ <[^>]*> beqz at,0+0094 <.*\+0x94>
+[      ]*94: .*16      external_label
 [0-9a-f]+ <[^>]*> nop
        \.\.\.
index 602b7b283d65559ca26e511d90832e20b72d96b8..dd0d3a29e2b7bd64b1f95d555a9d30637e3e1d02 100644 (file)
@@ -17,16 +17,9 @@ text_label:
        bleu    $4,$0,text_label
        bleu    $4,0,text_label
 
-# Sanity test bltul and bleul
-       .set    mips2
-       bltul   $4,$5,text_label
-       bleul   $4,$5,text_label
-
 # Branch to an external label.
        bltu    $4,$5,external_label
        bleu    $4,$5,external_label
-       bltul   $4,$5,external_label
-       bleul   $4,$5,external_label
 
 # Round to a 16 byte boundary, for ease in testing multiple targets.
        nop
diff --git a/gas/testsuite/gas/mips/branch-likely.d b/gas/testsuite/gas/mips/branch-likely.d
new file mode 100644 (file)
index 0000000..b391ad9
--- /dev/null
@@ -0,0 +1,76 @@
+#objdump: -dr --prefix-addresses -m mips:4000
+#name: MIPS branch-likely instructions
+#as: -32
+
+# Check branch-likely instructions
+
+.*: +file format .*mips.*
+
+Disassembly of section \.text:
+[0-9a-f]+ <[^>]*> beqzl        a0,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> bnezl        a0,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> beqzl        a0,0+0010 <.*\+0x10>
+[      ]*10: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> bnezl        a0,0+0018 <.*\+0x18>
+[      ]*18: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a0,a1
+[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a1,a0
+[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a0,a1
+[0-9a-f]+ <[^>]*> beqzl        at,0+003c <.*\+0x3c>
+[      ]*3c: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a1,a0
+[0-9a-f]+ <[^>]*> bnezl        at,0+0048 <.*\+0x48>
+[      ]*48: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a0,a1
+[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a1,a0
+[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a0,a1
+[0-9a-f]+ <[^>]*> beqzl        at,0+006c <.*\+0x6c>
+[      ]*6c: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a1,a0
+[0-9a-f]+ <[^>]*> bnezl        at,0+0078 <.*\+0x78>
+[      ]*78: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a0,a1
+[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a1,a0
+[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a0,a1
+[0-9a-f]+ <[^>]*> bnezl        at,0+009c <.*\+0x9c>
+[      ]*9c: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> slt  at,a1,a0
+[0-9a-f]+ <[^>]*> beqzl        at,0+00a8 <.*\+0xa8>
+[      ]*a8: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a0,a1
+[0-9a-f]+ <[^>]*> bnezl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a1,a0
+[0-9a-f]+ <[^>]*> beqzl        at,0+0000 <.*>
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a0,a1
+[0-9a-f]+ <[^>]*> bnezl        at,0+00cc <.*\+0xcc>
+[      ]*cc: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+[0-9a-f]+ <[^>]*> sltu at,a1,a0
+[0-9a-f]+ <[^>]*> beqzl        at,0+00d8 <.*\+0xd8>
+[      ]*d8: .*16      external_label
+[0-9a-f]+ <[^>]*> nop
+       \.\.\.
diff --git a/gas/testsuite/gas/mips/branch-likely.s b/gas/testsuite/gas/mips/branch-likely.s
new file mode 100644 (file)
index 0000000..d45b1fa
--- /dev/null
@@ -0,0 +1,36 @@
+# Source file used to test the branch-likely macros.
+
+       .text
+text_label:
+# Sanity check beql and bnel
+       beql    $4,0,text_label
+       bnel    $4,0,text_label
+       beql    $4,0,external_label
+       bnel    $4,0,external_label
+
+# Sanity test bgel and bgtl
+       bgel    $4,$5,text_label
+       bgtl    $4,$5,text_label
+       bgel    $4,$5,external_label
+       bgtl    $4,$5,external_label
+
+# Sanity test bgeul and bgtul
+       bgeul   $4,$5,text_label
+       bgtul   $4,$5,text_label
+       bgeul   $4,$5,external_label
+       bgtul   $4,$5,external_label
+
+# Sanity test bltl and blel
+       bltl    $4,$5,text_label
+       blel    $4,$5,text_label
+       bltl    $4,$5,external_label
+       blel    $4,$5,external_label
+
+# Sanity test bltul and bleul
+       bltul   $4,$5,text_label
+       bleul   $4,$5,text_label
+       bltul   $4,$5,external_label
+       bleul   $4,$5,external_label
+
+# Force at least 8 (non-delay-slot) zero bytes, to make 'objdump' print ...
+       .space  8
index 3a541fe1521771e93c05198de1b4f50fc97fe145..537487546225112a137000a4335f2da1323a12e3 100644 (file)
@@ -412,13 +412,12 @@ if { [istarget mips*-*-vxworks*] } {
     # See http://sources.redhat.com/ml/binutils/2001-10/msg00418.html for
     # more information.  Not sure if the fixes there are correct; should
     # branches to external labels be allowed for ECOFF?
-    # XXX FIXME: the following tests require -mips2 disasm for
-    # branch-likely instructions.  They should be split.
-    run_dump_test_arches "beq"         [mips_arch_list_matching mips2]
-    run_dump_test_arches "bge"         [mips_arch_list_matching mips2]
-    run_dump_test_arches "bgeu"                [mips_arch_list_matching mips2]
-    run_dump_test_arches "blt"         [mips_arch_list_matching mips2]
-    run_dump_test_arches "bltu"                [mips_arch_list_matching mips2]
+    run_dump_test_arches "beq"         [mips_arch_list_matching mips1]
+    run_dump_test_arches "bge"         [mips_arch_list_matching mips1]
+    run_dump_test_arches "bgeu"                [mips_arch_list_matching mips1]
+    run_dump_test_arches "blt"         [mips_arch_list_matching mips1]
+    run_dump_test_arches "bltu"                [mips_arch_list_matching mips1]
+    run_dump_test_arches "branch-likely" [mips_arch_list_matching mips2]
     run_dump_test_arches "branch-misc-1" [mips_arch_list_matching mips1]
     run_dump_test_arches "branch-misc-2" [mips_arch_list_matching mips1]
     run_dump_test_arches "branch-misc-2pic" [mips_arch_list_matching mips1]