2010-01-06 Quentin Neill <quentin.neill@amd.com>
[deliverable/binutils-gdb.git] / gas / testsuite / gas / m32r / m32rx.s
index 70e4b2456ed5e932ff7bf3cd150583caa2b81225..e25ec77bc0a4211fb18f243a0292ca86ac24b4bf 100644 (file)
@@ -22,9 +22,9 @@ cmpeq:
        cmpeq fp, fp
 
        .text
-       .global machl1
-machl1:
-       machl1 fp, fp
+       .global maclh1
+maclh1:
+       maclh1 fp, fp
        
        .text
        .global macsl0
@@ -63,14 +63,9 @@ mullo:
        mullo fp, fp, a0
        
        .text
-       .global mulwhi
-mulwhi:
-       mulwhi fp, fp, a1
-       
-       .text
-       .global mulwlo
-mulwlo:
-       mulwlo fp, fp, a0
+       .global divh
+divh:
+       divh fp, fp
        
        .text
        .global machi
@@ -82,16 +77,6 @@ machi:
 maclo:
        maclo fp, fp, a0
        
-       .text
-       .global macwhi
-macwhi:
-       macwhi fp, fp, a1
-       
-       .text
-       .global macwlo
-macwlo:
-       macwlo fp, fp, a0
-       
        .text
        .global mvfachi
 mvfachi:
@@ -105,7 +90,7 @@ mvfacmi:
        .text
        .global mvfaclo
 mvfaclo:
-       mvfaclo fp, a0
+       mvfaclo fp, a1
        
        .text
        .global mvtachi
@@ -122,54 +107,80 @@ mvtaclo:
 rac:
        rac a1
        
+       .text
+       .global rac_ds
+rac_ds:
+       rac a1, a0
+       
+       .text
+       .global rac_dsi
+rac_dsi:
+       rac a0, a1, #1
+       
        .text
        .global rach
 rach:
        rach a1
        
+       .text
+       .global rach_ds
+rach_ds:
+       rach a0, a1
+       
+       .text
+       .global rach_dsi
+rach_dsi:
+       rach a1, a0, #2
+       
 # Test explicitly parallel and implicitly parallel instructions
 # Including apparent instruction sequence reordering.
        .text
        .global bc__add
 bc__add:
-       bc branchpoint || add fp, fp
-       bc branchpoint
+       bc bcl || add fp, fp
+# Use bc.s here as bc is relaxable and thus a nop will be emitted.
+       bc.s bcl
        add fp, fp
 
        .text
        .global bcl__addi
 bcl__addi:     
-       bcl branchpoint || addi fp, #77
+       bcl bcl || addi fp, #77
        addi fp, #77
-       bcl branchpoint
+# Use bcl.s here as bcl is relaxable and thus the parallelization won't happen.
+       bcl.s bcl
 
        .text
        .global bl__addv
 bl__addv:
-       bl branchpoint || addv fp, fp
+       bl bcl || addv fp, fp
        addv fp, fp
-       bl branchpoint
+# Use bl.s here as bl is relaxable and thus the parallelization won't happen.
+       bl.s bcl
        
        .text
        .global bnc__addx
 bnc__addx:
-       bnc branchpoint || addx fp, fp
-       bnc branchpoint
+       bnc bcl || addx fp, fp
+# Use bnc.s here as bnc is relaxable and thus the parallelization attempt won't
+# happen.  Things still won't be parallelized, but we want this test to try.
+       bnc.s bcl
        addx fp, fp
 
        .text
        .global bncl__and
 bncl__and:
-       bncl branchpoint || and fp, fp
-       bncl branchpoint
+       bncl bcl || and fp, fp
        and fp, fp
+       bncl.s bcl
 
        .text
        .global bra__cmp
 bra__cmp:
-       bra branchpoint || cmp fp, fp
+       bra bcl || cmp fp, fp
        cmp fp, fp
-       bra branchpoint
+# Use bra.s here as bra is relaxable and thus the parallelization won't happen.
+       bra.s bcl
        
        .text
        .global jl__cmpeq
@@ -244,14 +255,14 @@ mvfc__sub:
        .text
        .global mvtc__subv
 mvtc__subv:
-       mvtc fp, cr0 || subv r2, fp
-       mvtc fp, cr0
+       mvtc fp, cr2 || subv r2, fp
+       mvtc fp, cr2
        subv r2, fp
 
        .text
        .global rte__subx
 rte__subx:
-       rte || subx r2, fp
+       rte || sub r2, fp
        rte
        subx r2, fp
 
@@ -270,11 +281,11 @@ slli__machi:
        machi r2, fp
 
        .text
-       .global sra__machl1
-sra__machl1:
-       sra fp, fp || machl1 r2, fp
+       .global sra__maclh1
+sra__maclh1:
+       sra fp, fp || maclh1 r2, fp
        sra fp, fp
-       machl1 r2, fp
+       maclh1 r2, fp
 
        .text
        .global srai__maclo
@@ -335,8 +346,8 @@ sth__mullo:
        .text
        .global trap__mulwhi
 trap__mulwhi:
-       trap 2 || mulwhi r2, fp
-       trap 2
+       trap #2 || mulwhi r2, fp
+       trap #2
        mulwhi r2, fp
 
        .text
@@ -398,9 +409,9 @@ cmpeq__rac:
        .text
        .global cmpu__rach
 cmpu__rach:
-       cmpu fp, fp || rach a0
+       cmpu fp, fp || rach a0, a1
        cmpu fp, fp
-       rach a0
+       rach a1, a1, #1
 
        .text
        .global cmpz__sadd
@@ -480,7 +491,100 @@ snc__neg:
        snc 
        neg fp, r2
        
+# Test automatic and explicit parallelisation of instructions
+       .text
+       .global nop__sadd
+nop__sadd:
+       nop
+       sadd
+
+       .text
+       .global sadd__nop
+sadd__nop:
+       sadd
+       nop
+
+       .text
+       .global sadd__nop_reverse
+sadd__nop_reverse:
+       sadd || nop
+
+       .text
+       .global add__not
+add__not:
+       add  r0, r1
+       not  r3, r5
+
+       .text
+       .global add__not__dest_clash
+add__not_dest_clash:
+       add  r3, r4
+       not  r3, r5
+
+       .text
+       .global add__not__src_clash
+add__not__src_clash:
+       add  r3, r4
+       not  r5, r3
+
+       .text
+       .global add__not__no_clash
+add__not__no_clash:
+       add  r3, r4
+       not  r4, r5
+
+       .text
+       .global mul__sra
+mul__sra:
+       mul  r1, r2
+       sra  r3, r4
+       
+       .text
+       .global mul__sra__reverse_src_clash
+mul__sra__reverse_src_clash:
+       mul  r1, r3
+       sra  r3, r4
        
+       .text
+       .global bc__add_
+bc__add_:
+       bc.s label
+       add r1, r2
+
+       .text
+       .global add__bc
+add__bc:
+       add r3, r4
+       bc.s  label
+
+       .text
+       .global bc__add__forced_parallel
+bc__add__forced_parallel:
+       bc label || add r5, r6
+
+       .text
+       .global add__bc__forced_parallel
+add__bc__forced_parallel:
+       add r7, r8 || bc label
+label:
+       nop
+
+; Additional testcases.
+; These insns were added to the chip later.
+
+       .text
+mulwhi:
+       mulwhi fp, fp, a0
+       mulwhi fp, fp, a1
        
+mulwlo:
+       mulwlo fp, fp, a0
+       mulwlo fp, fp, a1
+
+macwhi:
+       macwhi fp, fp, a0
+       macwhi fp, fp, a1
 
-       
\ No newline at end of file
+macwlo:
+       macwlo fp, fp, a0
+       macwlo fp, fp, a1
This page took 0.027112 seconds and 4 git commands to generate.