]> rtime.felk.cvut.cz Git - fpga/lx-cpu1/binutils-tumbl.git/commitdiff
testsuite/gas/xgate
authorseank <seank>
Mon, 6 Aug 2012 19:49:47 +0000 (19:49 +0000)
committerseank <seank>
Mon, 6 Aug 2012 19:49:47 +0000 (19:49 +0000)
* xgate.exp: Added hi/lo test.
* hilo.d: New test file
* hilo.s: Net test source file.

gas/testsuite/gas/xgate/hilo.d [new file with mode: 0644]
gas/testsuite/gas/xgate/hilo.s [new file with mode: 0644]
gas/testsuite/gas/xgate/xgate.exp

diff --git a/gas/testsuite/gas/xgate/hilo.d b/gas/testsuite/gas/xgate/hilo.d
new file mode 100644 (file)
index 0000000..32c0a68
--- /dev/null
@@ -0,0 +1,26 @@
+#objdump: -d --prefix-addresses --reloc
+#as: 
+#name: hilo
+
+# Test for correct generation of XGATE insns when using the %hi and %lo modifiers.
+
+.*: +file format elf32\-xgate
+
+Disassembly of section .text:
+0+0000 <hiTestLo> ldl R2, #0x88
+0+0002 <hiTestHi> ldh R2, #0x88 Abs\* 0x00008888 <symValue\+0x8870>
+0+0004 <loTestLo> ldl R3, #0x44
+0+0006 <loTestHi> ldh R3, #0x44 Abs\* 0x00004444 <symValue\+0x442c>
+0+0008 <hiTestLoF> ldl R2, #0xff
+0+000a <hiTestHiF> ldh R2, #0xff Abs\* 0x0000ffff <test\+0x77>
+0+000c <loTestLoF> ldl R3, #0x88
+0+000e <loTestHiF> ldh R3, #0x88 Abs\* 0x00008888 <symValue\+0x8870>
+0+0010 <hiTestLoR> ldl R2, #0x00
+                       10: R_XGATE_IMM8_HI     .text
+0+0012 <hiTestHiR> ldh R2, #0x00 Abs\* 0x00000000 <hiTestLo>
+                       12: R_XGATE_IMM8_HI     .text
+0+0014 <loTestLoR> ldl R3, #0x18
+                       14: R_XGATE_IMM8_LO     .text
+0+0016 <loTestHiR> ldh R3, #0x18 Abs\* 0x00001818 <symValue\+0x1800>
+                       16: R_XGATE_IMM8_LO     .text
+
diff --git a/gas/testsuite/gas/xgate/hilo.s b/gas/testsuite/gas/xgate/hilo.s
new file mode 100644 (file)
index 0000000..c157a6a
--- /dev/null
@@ -0,0 +1,33 @@
+# Test for correct generation of XGATE insns when using the %hi and %lo modifiers.
+       
+       .sect .text
+;Test Constants
+hiTestLo:
+       ldl R2, %hi(0x8844)
+hiTestHi:
+       ldh R2, %hi(0x8844)
+loTestLo:
+       ldl R3, %lo(0x8844)
+loTestHi:
+       ldh R3, %lo(0x8844)
+;Test Fixups
+hiTestLoF:
+       ldl R2, %hi(test)
+hiTestHiF:
+       ldh R2, %hi(test)
+loTestLoF:
+       ldl R3, %lo(test)
+loTestHiF:
+       ldh R3, %lo(test)
+;Test Relocs
+hiTestLoR:
+       ldl R2, %hi(symValue)
+hiTestHiR:
+       ldh R2, %hi(symValue)
+loTestLoR:
+       ldl R3, %lo(symValue)
+loTestHiR:
+       ldh R3, %lo(symValue)
+
+symValue:
+test = 0xff88
index 1af5e7622493aba9f00055a03025b0fba60a122c..eb5296a4c2b8cdbda3faf179551137f62946b680 100644 (file)
@@ -16,4 +16,5 @@ run_dump_test abi-xgate-32-32
 run_dump_test insns-dwarf2
 run_dump_test all_insns
 run_dump_test insns
+run_dump_test hilo