From cd492b76385e821c55186937d09d5929fa15c748 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Tue, 19 Sep 2006 09:27:31 +0000 Subject: [PATCH] * gas/bfin/load.s, gas/bfin/load.d: Add constant folding tests. --- gas/testsuite/ChangeLog | 4 + gas/testsuite/gas/bfin/load.d | 230 +++++++++++++++++++++--------------------- gas/testsuite/gas/bfin/load.s | 4 + 3 files changed, 124 insertions(+), 114 deletions(-) rewrite gas/testsuite/gas/bfin/load.d (72%) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 072cfb2f3..05b0f81dd 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2006-09-19 Bernd Schmidt + + * gas/bfin/load.s, gas/bfin/load.d: Add constant folding tests. + 2006-09-17 Mei Ligang * gas/score: New directory. diff --git a/gas/testsuite/gas/bfin/load.d b/gas/testsuite/gas/bfin/load.d dissimilarity index 72% index 58d97c2a8..07af13973 100644 --- a/gas/testsuite/gas/bfin/load.d +++ b/gas/testsuite/gas/bfin/load.d @@ -1,114 +1,116 @@ -#objdump: -d -#name: load -.*: +file format .* - -Disassembly of section .text: - -00000000 : - 0: 17 e1 ff ff M3.L=ffff.* - 4: 1a e1 fe ff B2.L=fffe.* - 8: 0e e1 00 00 SP.L=0.* - c: 0f e1 dc fe FP.L=fedc.* - 10: 40 e1 02 00 R0.H=0x2; - 14: 4d e1 20 00 P5.H=20.* - 18: 52 e1 04 f2 I2.H=f204.* - 1c: 59 e1 40 00 B1.H=40.* - 20: 5c e1 ff ff L0.H=ffff.* - 24: 45 e1 00 00 R5.H=0x0; - 28: 5a e1 00 00 B2.H=0 ; - 2c: 8f e1 20 ff FP=ff20.* - 30: 9e e1 20 00 L2=20.* - 34: 85 e1 00 00 R5=0 \(Z\); - 38: 08 c4 [0-3][[:xdigit:]] 00 A0=0; - 3c: 08 c4 [0-3][[:xdigit:]] 40 A1=0; - 40: 08 c4 [0-3][[:xdigit:]] 80 A1=A0=0; - 44: 02 62 R2=-64\(x\); - 46: 20 e1 7f 00 R0=0x7f \(X\); - 4a: 02 68 P2=0x0; - 4c: 06 6b SP=-32; - 4e: 67 69 FP=0x2c; - 50: 3f e1 00 08 L3=0x800 \(X\); - 54: 36 e1 ff 7f M2=0x7fff \(X\); - 58: 81 60 R1=0x10\(x\); - 5a: 3c e1 00 00 L0=0x0 \(X\); - 5e: 27 e1 eb 00 R7=0xeb \(X\); - -00000062 : - 62: 7e 91 SP=\[FP\]; - 64: 47 90 FP=\[P0\+\+\]; - 66: f1 90 P1=\[SP--\]; - 68: 96 af SP=\[P2\+0x38\]; - 6a: 3b ac P3=\[FP\+0x0]; - 6c: 3c e5 ff 7f P4=\[FP\+0x1fffc\]; - 70: 3e e5 01 80 SP=\[FP\+-131068\]; - 74: 26 ac SP=\[P4\+0x0\]; - 76: 0d b8 P5=\[FP-128\]; - -00000078 : - 78: 07 91 R7=\[P0\]; - 7a: 2e 90 R6=\[P5\+\+\]; - 7c: a5 90 R5=\[P4--\]; - 7e: bc a2 R4=\[FP\+0x28\]; - 80: 33 e4 ff 7f R3=\[SP\+0x1fffc\]; - 84: 32 a0 R2=\[SP\+0x0\]; - 86: 39 e4 01 80 R1=\[FP\+-131068\]; - 8a: 06 80 R0=\[SP\+\+P0\]; - 8c: 05 b8 R5=\[FP-128\]; - 8e: 02 9d R2=\[I0\]; - 90: 09 9c R1=\[I1\+\+\]; - 92: 93 9c R3=\[I2--\]; - 94: 9c 9d R4=\[I3\+\+M0\]; - -00000096 : - 96: 37 95 R7=W\[SP\] \(Z\); - 98: 3e 94 R6=W\[FP\+\+\] \(Z\); - 9a: 85 94 R5=W\[P0--\] \(Z\); - 9c: cc a7 R4=W\[P1\+0x1e\] \(Z\); - 9e: 73 e4 fe 7f R3=W\[SP\+0xfffc\] \(Z\); - a2: 7a e4 02 80 R2=W\[FP\+-65532\] \(Z\); - a6: 28 86 R0=W\[P0\+\+P5\] \(Z\); - -000000a8 : - a8: 77 95 R7=W\[SP\]\(X\); - aa: 7e 94 R6=W\[FP\+\+\]\(X\); - ac: c5 94 R5=W\[P0--\]\(X\); - ae: 0d ab R5=W\[P1\+0x18\]\(X\); - b0: 73 e5 fe 7f R3=W\[SP\+0xfffc\]\(X\); - b4: 7f e5 02 80 R7=W\[FP\+-65532\]\(X\); - b8: 51 8e R1=W\[P1\+\+P2\]\(X\); - -000000ba : - ba: 40 9d R0.H=W\[I0\]; - bc: 49 9c R1.H=W\[I1\+\+\]; - be: d2 9c R2.H=W\[I2--\]; - c0: f6 84 R3.H=W\[SP\]; - c2: 07 85 R4.H=W\[FP\+\+P0\]; - -000000c4 : - c4: 3f 9d R7.L=W\[I3\]; - c6: 36 9c R6.L=W\[I2\+\+\]; - c8: ad 9c R5.L=W\[I1--\]; - ca: 00 83 R4.L=W\[P0\]; - cc: da 82 R3.L=W\[P2\+\+P3\]; - -000000ce : - ce: 05 99 R5=B\[P0\] \(Z\); - d0: 0c 98 R4=B\[P1\+\+\] \(Z\); - d2: 90 98 R0=B\[P2--\] \(Z\); - d4: b3 e4 ff 7f R3=B\[SP\+0x7fff\] \(Z\); - d8: b7 e4 01 80 R7=B\[SP\+-32767\] \(Z\); - -000000dc : - dc: 45 99 R5=B\[P0\]\(X\); - de: 4a 98 R2=B\[P1\+\+\]\(X\); - e0: fb 98 R3=B\[FP--\]\(X\); - e2: b7 e5 00 00 R7=B\[SP\+0x0\]\(X\); - e6: be e5 01 80 R6=B\[FP\+-32767\]\(X\); - -000000ea : - ... - -000000eb : - eb: 10 00 IF ! CC JUMP eb ; - ed: 00 00 NOP; - ... +#objdump: -d +#name: load +.*: +file format .* + +Disassembly of section .text: + +00000000 : + 0: 17 e1 ff ff M3.L=ffff.* + 4: 1a e1 fe ff B2.L=fffe.* + 8: 0e e1 00 00 SP.L=0.* + c: 0f e1 dc fe FP.L=fedc.* + 10: 40 e1 02 00 R0.H=0x2; + 14: 4d e1 20 00 P5.H=20.* + 18: 52 e1 04 f2 I2.H=f204.* + 1c: 59 e1 40 00 B1.H=40.* + 20: 5c e1 ff ff L0.H=ffff.* + 24: 45 e1 00 00 R5.H=0x0; + 28: 5a e1 00 00 B2.H=0 ; + 2c: 8f e1 20 ff FP=ff20.* + 30: 9e e1 20 00 L2=20.* + 34: 85 e1 00 00 R5=0 \(Z\); + 38: 08 c4 [0-3][[:xdigit:]] 00 A0=0; + 3c: 08 c4 [0-3][[:xdigit:]] 40 A1=0; + 40: 08 c4 [0-3][[:xdigit:]] 80 A1=A0=0; + 44: 02 62 R2=-64\(x\); + 46: 20 e1 7f 00 R0=0x7f \(X\); + 4a: 02 68 P2=0x0; + 4c: 06 6b SP=-32; + 4e: 67 69 FP=0x2c; + 50: 3f e1 00 08 L3=0x800 \(X\); + 54: 36 e1 ff 7f M2=0x7fff \(X\); + 58: 81 60 R1=0x10\(x\); + 5a: 3c e1 00 00 L0=0x0 \(X\); + 5e: 27 e1 f3 00 R7=0xf3 \(X\); + 62: 00 e1 03 00 R0.L=0x3; + 66: 01 e1 0f 00 R1.L=0xf; + +0000006a : + 6a: 7e 91 SP=\[FP\]; + 6c: 47 90 FP=\[P0\+\+\]; + 6e: f1 90 P1=\[SP--\]; + 70: 96 af SP=\[P2\+0x38\]; + 72: 3b ac P3=\[FP\+0x0\]; + 74: 3c e5 ff 7f P4=\[FP\+0x1fffc\]; + 78: 3e e5 01 80 SP=\[FP\+-131068\]; + 7c: 26 ac SP=\[P4\+0x0\]; + 7e: 0d b8 P5=\[FP-128\]; + +00000080 : + 80: 07 91 R7=\[P0\]; + 82: 2e 90 R6=\[P5\+\+\]; + 84: a5 90 R5=\[P4--\]; + 86: bc a2 R4=\[FP\+0x28\]; + 88: 33 e4 ff 7f R3=\[SP\+0x1fffc\]; + 8c: 32 a0 R2=\[SP\+0x0\]; + 8e: 39 e4 01 80 R1=\[FP\+-131068\]; + 92: 06 80 R0=\[SP\+\+P0\]; + 94: 05 b8 R5=\[FP-128\]; + 96: 02 9d R2=\[I0\]; + 98: 09 9c R1=\[I1\+\+\]; + 9a: 93 9c R3=\[I2--\]; + 9c: 9c 9d R4=\[I3\+\+M0\]; + +0000009e : + 9e: 37 95 R7=W\[SP\] \(Z\); + a0: 3e 94 R6=W\[FP\+\+\] \(Z\); + a2: 85 94 R5=W\[P0--\] \(Z\); + a4: cc a7 R4=W\[P1\+0x1e\] \(Z\); + a6: 73 e4 fe 7f R3=W\[SP\+0xfffc\] \(Z\); + aa: 7a e4 02 80 R2=W\[FP\+-65532\] \(Z\); + ae: 28 86 R0=W\[P0\+\+P5\] \(Z\); + +000000b0 : + b0: 77 95 R7=W\[SP\]\(X\); + b2: 7e 94 R6=W\[FP\+\+\]\(X\); + b4: c5 94 R5=W\[P0--\]\(X\); + b6: 0d ab R5=W\[P1\+0x18\]\(X\); + b8: 73 e5 fe 7f R3=W\[SP\+0xfffc\]\(X\); + bc: 7f e5 02 80 R7=W\[FP\+-65532\]\(X\); + c0: 51 8e R1=W\[P1\+\+P2\]\(X\); + +000000c2 : + c2: 40 9d R0.H=W\[I0\]; + c4: 49 9c R1.H=W\[I1\+\+\]; + c6: d2 9c R2.H=W\[I2--\]; + c8: f6 84 R3.H=W\[SP\]; + ca: 07 85 R4.H=W\[FP\+\+P0\]; + +000000cc : + cc: 3f 9d R7.L=W\[I3\]; + ce: 36 9c R6.L=W\[I2\+\+\]; + d0: ad 9c R5.L=W\[I1--\]; + d2: 00 83 R4.L=W\[P0\]; + d4: da 82 R3.L=W\[P2\+\+P3\]; + +000000d6 : + d6: 05 99 R5=B\[P0\] \(Z\); + d8: 0c 98 R4=B\[P1\+\+\] \(Z\); + da: 90 98 R0=B\[P2--\] \(Z\); + dc: b3 e4 ff 7f R3=B\[SP\+0x7fff\] \(Z\); + e0: b7 e4 01 80 R7=B\[SP\+-32767\] \(Z\); + +000000e4 : + e4: 45 99 R5=B\[P0\]\(X\); + e6: 4a 98 R2=B\[P1\+\+\]\(X\); + e8: fb 98 R3=B\[FP--\]\(X\); + ea: b7 e5 00 00 R7=B\[SP\+0x0\]\(X\); + ee: be e5 01 80 R6=B\[FP\+-32767\]\(X\); + +000000f2 : + ... + +000000f3 : + f3: 10 00 IF ! CC JUMP f3 ; + f5: 00 00 NOP; + ... diff --git a/gas/testsuite/gas/bfin/load.s b/gas/testsuite/gas/bfin/load.s index 07f4732a7..96ae1faad 100644 --- a/gas/testsuite/gas/bfin/load.s +++ b/gas/testsuite/gas/bfin/load.s @@ -36,6 +36,10 @@ load_immediate: L0 = foo1; r7 = load_data2; + /* Test constant folding. */ + r0.l = (a + 5) - 2; + r1.l = (a + 5) + 10; + .text .global load_pointer_register load_pointer_register: -- 2.11.4.GIT