aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-10-15 20:53:28 +0000
committerMike Frysinger <vapier@gentoo.org>2010-10-15 20:53:28 +0000
commit636b4f11428788ef1395da14da31df818afe289d (patch)
treea81751e03131f800ac035387d024e985f47d1ac1 /gas/testsuite
parente7b77cfe1ee56dbc179ee3bee00e22a815dafca7 (diff)
downloadgdb-636b4f11428788ef1395da14da31df818afe289d.zip
gdb-636b4f11428788ef1395da14da31df818afe289d.tar.gz
gdb-636b4f11428788ef1395da14da31df818afe289d.tar.bz2
gas: blackfin: add tests for recent loop label fixes
Signed-off-by: David Gibson <david.gibson@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/bfin/bfin.exp3
-rw-r--r--gas/testsuite/gas/bfin/loop_label.d14
-rw-r--r--gas/testsuite/gas/bfin/loop_label.s8
-rw-r--r--gas/testsuite/gas/bfin/loop_label2.d14
-rw-r--r--gas/testsuite/gas/bfin/loop_label2.s8
-rw-r--r--gas/testsuite/gas/bfin/loop_temps.d10
-rw-r--r--gas/testsuite/gas/bfin/loop_temps.s312
8 files changed, 376 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index ee3b43e..69f6fc0 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2010-10-15 David Gibson <david.gibson@analog.com>
+
+ * gas/bfin/loop_label.s, gas/bfin/loop_label.d,
+ gas/bfin/loop_label2.s, gas/bfin/loop_label2.d,
+ gas/bfin/loop_temps.s, gas/bfin/loop_temps.d: New tests.
+ * gas/bfin/bfin.exp: Add loop_label, loop_label2, and loop_temps.
+
2010-10-15 Robin Getz <robin.getz@analog.com>
* gas/bfin/16bit_illegals.s, gas/bfin/16bit_illegals.d,
diff --git a/gas/testsuite/gas/bfin/bfin.exp b/gas/testsuite/gas/bfin/bfin.exp
index 4fb4372..0ee7bb0 100644
--- a/gas/testsuite/gas/bfin/bfin.exp
+++ b/gas/testsuite/gas/bfin/bfin.exp
@@ -25,6 +25,9 @@ if [istarget bfin*-*-*] {
run_dump_test "loop"
run_dump_test "loop2"
run_dump_test "loop3"
+ run_dump_test "loop_label"
+ run_dump_test "loop_label2"
+ run_dump_test "loop_temps"
run_dump_test "misc"
run_dump_test "move"
run_dump_test "move2"
diff --git a/gas/testsuite/gas/bfin/loop_label.d b/gas/testsuite/gas/bfin/loop_label.d
new file mode 100644
index 0000000..b1592aa
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_label.d
@@ -0,0 +1,14 @@
+#objdump: -d
+#name: loop_label
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <.text>:
+ 0: 08 4f R0 <<= 0x1;
+ 2: 78 68 P0 = 0xf \(X\);.*
+ 4: 48 42 DIVS \(R0, R1\);
+ 6: a2 e0 02 00 LSETUP\(0x0xa, 0x0xa\) LC0 = P0;
+ a: 08 42 DIVQ \(R0, R1\);
+ c: 80 42 R0 = R0.L \(X\);
+ ...
diff --git a/gas/testsuite/gas/bfin/loop_label.s b/gas/testsuite/gas/bfin/loop_label.s
new file mode 100644
index 0000000..3fbd56d
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_label.s
@@ -0,0 +1,8 @@
+ r0 <<= 1;
+ p0 = 15;
+ divs (r0, r1);
+ loop 1f lc0=p0;
+loop_begin 1;
+ divq (r0, r1);
+loop_end 1;
+ r0 = r0.l (x);
diff --git a/gas/testsuite/gas/bfin/loop_label2.d b/gas/testsuite/gas/bfin/loop_label2.d
new file mode 100644
index 0000000..b7fc01b
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_label2.d
@@ -0,0 +1,14 @@
+#objdump: -d
+#name: loop_label2
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <.text>:
+ 0: 08 4f R0 <<= 0x1;
+ 2: 78 68 P0 = 0xf \(X\);.*
+ 4: 48 42 DIVS \(R0, R1\);
+ 6: a2 e0 02 00 LSETUP\(0x0xa, 0x0xa\) LC0 = P0;
+ a: 08 42 DIVQ \(R0, R1\);
+ c: 80 42 R0 = R0.L \(X\);
+ ...
diff --git a/gas/testsuite/gas/bfin/loop_label2.s b/gas/testsuite/gas/bfin/loop_label2.s
new file mode 100644
index 0000000..2f09f13
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_label2.s
@@ -0,0 +1,8 @@
+ r0 <<= 1;
+ p0 = 15;
+ divs (r0, r1);
+ loop .Lfoo lc0=p0;
+loop_begin .Lfoo;
+ divq (r0, r1);
+loop_end .Lfoo;
+ r0 = r0.l (x);
diff --git a/gas/testsuite/gas/bfin/loop_temps.d b/gas/testsuite/gas/bfin/loop_temps.d
new file mode 100644
index 0000000..ab1152c
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_temps.d
@@ -0,0 +1,10 @@
+#readelf:-s
+#name: loop_temps
+
+Symbol table '.symtab' contains 5 entries:
+ Num: Value Size Type Bind Vis Ndx Name
+ 0: 00000000 0 NOTYPE LOCAL DEFAULT UND
+ 1: 00000000 0 SECTION LOCAL DEFAULT 1
+ 2: 00000000 0 SECTION LOCAL DEFAULT 2
+ 3: 00000000 0 SECTION LOCAL DEFAULT 3
+ 4: 00000000 726 FUNC GLOBAL DEFAULT 1 _filter_mem16
diff --git a/gas/testsuite/gas/bfin/loop_temps.s b/gas/testsuite/gas/bfin/loop_temps.s
new file mode 100644
index 0000000..973e347
--- /dev/null
+++ b/gas/testsuite/gas/bfin/loop_temps.s
@@ -0,0 +1,312 @@
+ .align 4
+.global _filter_mem16;
+.type _filter_mem16, STT_FUNC;
+_filter_mem16:
+ [--sp] = ( r7:7 );
+
+ [--SP] = R4;
+ [--SP] = R5;
+ [--SP] = P3;
+ [--SP] = P4;
+ LINK 68;
+ [FP+28] = R0;
+ [FP+32] = R1;
+ [FP+36] = R2;
+ [FP+-68] = SP;
+ R0 = SP;
+ [FP+-24] = R0;
+ R0 = [FP+44];
+ R3 = R0;
+ R3 += 1;
+ R2 = R3;
+ R0 = R2;
+ R1 = 0 (X);
+ R2 = -1 (X);
+ R0 = R0 & R2;
+ R2 = 15 (X);
+ R1 = R1 & R2;
+ R2 = R0 >> 27;
+ R7 = R1 << 5;
+ [FP+-60] = R7;
+ R7 = [FP+-60];
+ R7 = R2 | R7;
+ [FP+-60] = R7;
+ R2 = R0 << 5;
+ [FP+-64] = R2;
+ R0 = [FP+-64];
+ R1 = [FP+-60];
+ [FP+-64] = R0;
+ [FP+-60] = R1;
+ R0 = -1 (X);
+ R1 = [FP+-64];
+ R1 = R1 & R0;
+ [FP+-64] = R1;
+ R0 = 15 (X);
+ R2 = [FP+-60];
+ R2 = R2 & R0;
+ R2 = R3;
+ R0 = R2;
+ R1 = 0 (X);
+ R2 = -1 (X);
+ R0 = R0 & R2;
+ R2 = 15 (X);
+ R1 = R1 & R2;
+ R2 = R0 >> 27;
+ R7 = R1 << 5;
+ [FP+-52] = R7;
+ R7 = [FP+-52];
+ R7 = R2 | R7;
+ [FP+-52] = R7;
+ R2 = R0 << 5;
+ [FP+-56] = R2;
+ R0 = [FP+-56];
+ R1 = [FP+-52];
+ [FP+-56] = R0;
+ [FP+-52] = R1;
+ R0 = -1 (X);
+ R1 = [FP+-56];
+ R1 = R1 & R0;
+ [FP+-56] = R1;
+ R0 = 15 (X);
+ R2 = [FP+-52];
+ R2 = R2 & R0;
+ R0 = R3;
+ R0 <<= 2;
+ R0 += 3;
+ R0 += 3;
+ R0 >>= 2;
+ P1 = R0;
+ P2 = P1 << 2;
+ SP -= P2;
+ [FP+-48] = SP;
+ R0 = [FP+-48];
+ R0 += 3;
+ R0 >>= 2;
+ R0 <<= 2;
+ [FP+-48] = R0;
+ R0 = [FP+-48];
+ [FP+-12] = R0;
+ R0 = [FP+48];
+ R0 += 1;
+ R3 = R0 << 1;
+ R2 = R3;
+ R0 = R2;
+ R1 = 0 (X);
+ R2 = -1 (X);
+ R0 = R0 & R2;
+ R2 = 15 (X);
+ R1 = R1 & R2;
+ R2 = R0 >> 27;
+ R7 = R1 << 5;
+ [FP+-40] = R7;
+ R7 = [FP+-40];
+ R7 = R2 | R7;
+ [FP+-40] = R7;
+ R2 = R0 << 5;
+ [FP+-44] = R2;
+ R0 = [FP+-44];
+ R1 = [FP+-40];
+ [FP+-44] = R0;
+ [FP+-40] = R1;
+ R0 = -1 (X);
+ R1 = [FP+-44];
+ R1 = R1 & R0;
+ [FP+-44] = R1;
+ R0 = 15 (X);
+ R2 = [FP+-40];
+ R2 = R2 & R0;
+ R2 = R3;
+ R0 = R2;
+ R1 = 0 (X);
+ R2 = -1 (X);
+ R0 = R0 & R2;
+ R2 = 15 (X);
+ R1 = R1 & R2;
+ R2 = R0 >> 27;
+ R7 = R1 << 5;
+ [FP+-32] = R7;
+ R7 = [FP+-32];
+ R7 = R2 | R7;
+ [FP+-32] = R7;
+ R2 = R0 << 5;
+ [FP+-36] = R2;
+ R0 = [FP+-36];
+ R1 = [FP+-32];
+ [FP+-36] = R0;
+ [FP+-32] = R1;
+ R0 = -1 (X);
+ R1 = [FP+-36];
+ R1 = R1 & R0;
+ [FP+-36] = R1;
+ R0 = 15 (X);
+ R2 = [FP+-32];
+ R2 = R2 & R0;
+ R0 = R3;
+ R0 <<= 2;
+ R0 += 3;
+ R0 += 3;
+ R0 >>= 2;
+ P1 = R0;
+ P2 = P1 << 2;
+ SP -= P2;
+ [FP+-28] = SP;
+ R0 = [FP+-28];
+ R0 += 3;
+ R0 >>= 2;
+ R0 <<= 2;
+ [FP+-28] = R0;
+ R0 = [FP+-28];
+ [FP+-8] = R0;
+ R0 = [FP+-12];
+ R0 += 4;
+ [FP+-16] = R0;
+ R0 = [FP+-8];
+ [FP+-20] = R0;
+ R0 = 0 (X);
+ [FP+-4] = R0;
+ jump.s .L6;
+.L7:
+ R1 = [FP+-20];
+ R0 = [FP+-4];
+ R0 <<= 2;
+ R1 = R1 + R0;
+ P1 = R1;
+ R0 = [FP+-4];
+ R1 = R0 << 1;
+ R0 = [FP+32];
+ R0 = R0 + R1;
+ P2 = R0;
+ R0 = W [P2] (Z);
+ W [P1] = R0;
+ R1 = [FP+-20];
+ R0 = [FP+-4];
+ R0 <<= 1;
+ R0 += 1;
+ R0 <<= 1;
+ R1 = R1 + R0;
+ P1 = R1;
+ R0 = [FP+-4];
+ R1 = R0 << 1;
+ R0 = [FP+36];
+ R0 = R0 + R1;
+ P2 = R0;
+ R0 = W [P2] (Z);
+ W [P1] = R0;
+ R0 = [FP+-4];
+ R0 += 1;
+ [FP+-4] = R0;
+.L6:
+ R1 = [FP+48];
+ R0 = [FP+-4];
+ cc =R0<R1;
+ if cc jump .L7;
+ R0 = [FP+48];
+ P0 = [FP+-20];
+ I0 = P0;
+ B0 = P0;
+ L0 = 0;
+ P2 = [FP+-16];
+ I2 = P2;
+ L2 = 0;
+ P4 = [FP+52];
+ P0 = [FP+28];
+ P1 = [FP+40];
+ R1 = [P4++];
+ R1 <<= 3;
+ R1.L = R1 (RND);
+ R2 = W[P0++];
+ R1.L = R1.L + R2.L;
+ W[P1++] = R1;
+ R2 = PACK(R1.L, R2.L);
+ [P2] = R2;
+ R0 += -1;
+ R3 = 0;
+ LC0 = R0;
+ LOOP filter_start256 LC0;
+ LOOP_BEGIN filter_start256;
+ R3 += 1;
+ LC1 = R3;
+ R1 = [P4++];
+ A1 = R1;
+ A0 = 0;
+ I0 = B0;
+ I2 = P2;
+ P2 += 4;
+ R4 = [I0++] || R5 = [I2--];
+ LOOP filter_start_inner256 LC1;
+ LOOP_BEGIN filter_start_inner256;
+ A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];
+ LOOP_END filter_start_inner256;
+ A0 += A1;
+ R4 = A0;
+ R4 <<= 3;
+ R4.L = R4 (RND);
+ R2 = W[P0++];
+ R4.L = R4.L + R2.L;
+ W[P1++] = R4;
+ R2 = PACK(R4.L, R2.L);
+ [P2] = R2;
+ LOOP_END filter_start256;
+ R0 = [FP+48];
+ R0 <<= 1;
+ I0 = B0;
+ R0 <<= 1;
+ L0 = R0;
+ R0 = [FP+48];
+ R2 = [FP+44];
+ R2 = R2 - R0;
+ R4 = [I0++];
+ LC0 = R2;
+ P3 = R0;
+ R0 <<= 2;
+ R0 += 8;
+ I2 = P2;
+ M0 = R0;
+ A1 = A0 = 0;
+ R5 = [I2--];
+ LOOP filter_mid256 LC0;
+ LOOP_BEGIN filter_mid256;
+ LOOP filter_mid_inner256 LC1=P3;
+ LOOP_BEGIN filter_mid_inner256;
+ A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];
+ LOOP_END filter_mid_inner256;
+ R0 = (A0 += A1) || I2 += M0;
+ R0 = R0 << 3 || R5 = W[P0++];
+ R0.L = R0 (RND);
+ R0.L = R0.L + R5.L;
+ R5 = PACK(R0.L, R5.L) || W[P1++] = R0;
+ A1 = A0 = 0 || [I2--] = R5
+ LOOP_END filter_mid256;
+ I2 += 4;
+ P2 = I2;
+ P4 = [FP+52];
+ R0 = [FP+48];
+ LC0 = R0;
+ P0 = B0;
+ A1 = A0 = 0;
+ LOOP mem_update256 LC0;
+ LOOP_BEGIN mem_update256;
+ I2 = P2;
+ I0 = P0;
+ P0 += 4;
+ R0 = LC0;
+ LC1 = R0;
+ R5 = [I2--] || R4 = [I0++];
+ LOOP mem_accum256 LC1;
+ LOOP_BEGIN mem_accum256;
+ A1 -= R4.H*R5.H, A0 += R4.L*R5.L (IS) || R4 = [I0++] || R5 = [I2--];
+ LOOP_END mem_accum256;
+ R0 = (A0 += A1);
+ A1 = A0 = 0 || [P4++] = R0;
+ LOOP_END mem_update256;
+ L0 = 0;
+ SP = [FP+-24];
+ SP = [FP+-68];
+ UNLINK;
+ P4 = [SP++];
+ P3 = [SP++];
+ R5 = [SP++];
+ R4 = [SP++];
+ ( r7:7 ) = [sp++];
+ rts;
+ .size _filter_mem16, .-_filter_mem16