[3/7] ld:testsuite:pru: Fix LDI32 pseudo to conform to TI ABI

Message ID 20180428192827.18401-3-dimitar@dinux.eu
State Superseded
Headers show
Series
  • [1/7] bfd:pru: Fix LDI32 relocation to conform to TI ABI
Related show

Commit Message

Dimitar Dimitrov April 28, 2018, 7:28 p.m.
Per TI ABI, first LDI must load the MSB 16bits.

2018-04-26  Dimitar Dimitrov  <dimitar@dinux.eu>

        * testsuite/ld-pru/ldi32.d: Update LDI32 test to conform to TI ABI.
        * testsuite/ld-pru/norelax_ldi32-data.d: Ditto.
        * testsuite/ld-pru/norelax_ldi32-dis.d: Ditto.
        * testsuite/ld-pru/relax_ldi32-data.d: Ditto.
        * testsuite/ld-pru/relax_ldi32-dis.d: Ditto.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

---
 ld/testsuite/ld-pru/ldi32.d              |  2 +-
 ld/testsuite/ld-pru/norelax_ldi32-data.d |  8 ++++----
 ld/testsuite/ld-pru/norelax_ldi32-dis.d  | 28 ++++++++++++++--------------
 ld/testsuite/ld-pru/relax_ldi32-data.d   |  8 ++++----
 ld/testsuite/ld-pru/relax_ldi32-dis.d    | 20 ++++++++++----------
 5 files changed, 33 insertions(+), 33 deletions(-)

-- 
2.11.0

Patch

diff --git a/ld/testsuite/ld-pru/ldi32.d b/ld/testsuite/ld-pru/ldi32.d
index 123ead310f..cc9b86dd70 100644
--- a/ld/testsuite/ld-pru/ldi32.d
+++ b/ld/testsuite/ld-pru/ldi32.d
@@ -8,5 +8,5 @@ 
 .*: +file format elf32-pru
 
 Disassembly of section .text:
-[0-9a-f]+ <[^>]*> ldi	r16, 48879
 [0-9a-f]+ <[^>]*> ldi	r16.w2, 57005
+[0-9a-f]+ <[^>]*> ldi	r16.w0, 48879
diff --git a/ld/testsuite/ld-pru/norelax_ldi32-data.d b/ld/testsuite/ld-pru/norelax_ldi32-data.d
index 47fc2c12f4..cc7140e450 100644
--- a/ld/testsuite/ld-pru/norelax_ldi32-data.d
+++ b/ld/testsuite/ld-pru/norelax_ldi32-data.d
@@ -10,10 +10,10 @@ 
 .*: +file format elf32-pru
 
 Contents of section .text:
- [0-9a-f]+ f0efbe24 d0adde24 0f00f630 f0efbe24  .*
- [0-9a-f]+ d0adde24 f0cace24 d0000024 e0cace24  .*
- [0-9a-f]+ f0cace24 d0010024 f0efbe24 d0acde24  .*
- [0-9a-f]+ f0785624 d0341224 f0785624 d0000024  .*
+ [0-9a-f]+ d0adde24 90efbe24 0f00f630 d0adde24  .*
+ [0-9a-f]+ 90efbe24 d0000024 90cace24 e0cace24  .*
+ [0-9a-f]+ d0010024 90cace24 d0acde24 90efbe24  .*
+ [0-9a-f]+ d0341224 90785624 d0000024 90785624  .*
  [0-9a-f]+ f0120024 f100007e .*
 Contents of section .data:
  0000 00000000 48000020 40000000 12004000  .*
diff --git a/ld/testsuite/ld-pru/norelax_ldi32-dis.d b/ld/testsuite/ld-pru/norelax_ldi32-dis.d
index 072de5fbd4..8f3be0f6e6 100644
--- a/ld/testsuite/ld-pru/norelax_ldi32-dis.d
+++ b/ld/testsuite/ld-pru/norelax_ldi32-dis.d
@@ -9,21 +9,21 @@ 
 .*: +file format elf32-pru
 
 Disassembly of section .text:
-..000000 <[^>]*> ldi	r16, 48879
-..000004 <[^>]*> ldi	r16.w2, 57005
+..000000 <[^>]*> ldi	r16.w2, 57005
+..000004 <[^>]*> ldi	r16.w0, 48879
 ..000008 <[^>]*> loop	..000044 <__end_loop>, r22
-..00000c <[^>]*> ldi	r16, 48879
-..000010 <[^>]*> ldi	r16.w2, 57005
-..000014 <[^>]*> ldi	r16, 52938
-..000018 <[^>]*> ldi	r16.w2, 0
+..00000c <[^>]*> ldi	r16.w2, 57005
+..000010 <[^>]*> ldi	r16.w0, 48879
+..000014 <[^>]*> ldi	r16.w2, 0
+..000018 <[^>]*> ldi	r16.w0, 52938
 ..00001c <[^>]*> ldi	r0, 52938
-..000020 <[^>]*> ldi	r16, 52938
-..000024 <[^>]*> ldi	r16.w2, 1
-..000028 <[^>]*> ldi	r16, 48879
-..00002c <[^>]*> ldi	r16.w2, 57004
-..000030 <[^>]*> ldi	r16, 22136
-..000034 <[^>]*> ldi	r16.w2, 4660
-..000038 <[^>]*> ldi	r16, 22136
-..00003c <[^>]*> ldi	r16.w2, 0
+..000020 <[^>]*> ldi	r16.w2, 1
+..000024 <[^>]*> ldi	r16.w0, 52938
+..000028 <[^>]*> ldi	r16.w2, 57004
+..00002c <[^>]*> ldi	r16.w0, 48879
+..000030 <[^>]*> ldi	r16.w2, 4660
+..000034 <[^>]*> ldi	r16.w0, 22136
+..000038 <[^>]*> ldi	r16.w2, 0
+..00003c <[^>]*> ldi	r16.w0, 22136
 ..000040 <[^>]*> ldi	r16, 18
 ..000044 <[^>]*> qba	..000008 <__intermediate>
diff --git a/ld/testsuite/ld-pru/relax_ldi32-data.d b/ld/testsuite/ld-pru/relax_ldi32-data.d
index 2c24fe422e..ffb5d81170 100644
--- a/ld/testsuite/ld-pru/relax_ldi32-data.d
+++ b/ld/testsuite/ld-pru/relax_ldi32-data.d
@@ -10,10 +10,10 @@ 
 .*: +file format elf32-pru
 
 Contents of section .text:
- [0-9a-f]+ f0efbe24 d0adde24 0d00f630 f0efbe24  .*
- [0-9a-f]+ d0adde24 f0cace24 e0cace24 f0cace24  .*
- [0-9a-f]+ d0010024 f0efbe24 d0acde24 f0785624  .*
- [0-9a-f]+ d0341224 f0785624 f0100024 f300007e  .*
+ [0-9a-f]+ d0adde24 90efbe24 0d00f630 d0adde24  .*
+ [0-9a-f]+ 90efbe24 f0cace24 e0cace24 d0010024  .*
+ [0-9a-f]+ 90cace24 d0acde24 90efbe24 d0341224  .*
+ [0-9a-f]+ 90785624 f0785624 f0100024 f300007e  .*
 Contents of section .data:
  0000 00000000 40000020 38000000 10003800  .*
  0010 0e000000 f2ffffff 0e0038aa           .*
diff --git a/ld/testsuite/ld-pru/relax_ldi32-dis.d b/ld/testsuite/ld-pru/relax_ldi32-dis.d
index 1371f1c644..31c7818c66 100644
--- a/ld/testsuite/ld-pru/relax_ldi32-dis.d
+++ b/ld/testsuite/ld-pru/relax_ldi32-dis.d
@@ -9,19 +9,19 @@ 
 .*: +file format elf32-pru
 
 Disassembly of section .text:
-..000000 <[^>]*> ldi	r16, 48879
-..000004 <[^>]*> ldi	r16.w2, 57005
+..000000 <[^>]*> ldi	r16.w2, 57005
+..000004 <[^>]*> ldi	r16.w0, 48879
 ..000008 <[^>]*> loop	..00003c <__end_loop>, r22
-..00000c <[^>]*> ldi	r16, 48879
-..000010 <[^>]*> ldi	r16.w2, 57005
+..00000c <[^>]*> ldi	r16.w2, 57005
+..000010 <[^>]*> ldi	r16.w0, 48879
 ..000014 <[^>]*> ldi	r16, 52938
 ..000018 <[^>]*> ldi	r0, 52938
-..00001c <[^>]*> ldi	r16, 52938
-..000020 <[^>]*> ldi	r16.w2, 1
-..000024 <[^>]*> ldi	r16, 48879
-..000028 <[^>]*> ldi	r16.w2, 57004
-..00002c <[^>]*> ldi	r16, 22136
-..000030 <[^>]*> ldi	r16.w2, 4660
+..00001c <[^>]*> ldi	r16.w2, 1
+..000020 <[^>]*> ldi	r16.w0, 52938
+..000024 <[^>]*> ldi	r16.w2, 57004
+..000028 <[^>]*> ldi	r16.w0, 48879
+..00002c <[^>]*> ldi	r16.w2, 4660
+..000030 <[^>]*> ldi	r16.w0, 22136
 ..000034 <[^>]*> ldi	r16, 22136
 ..000038 <[^>]*> ldi	r16, 16
 ..00003c <[^>]*> qba	..000008 <__intermediate>