aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorM R Swami Reddy <MR.Swami.Reddy@nsc.com>2008-11-27 11:46:52 +0000
committerM R Swami Reddy <MR.Swami.Reddy@nsc.com>2008-11-27 11:46:52 +0000
commit50e9934812fd3b3145eda37ae13a7d86afe6180d (patch)
tree018fe2009980a8871878095b4ab3e0da99b605ec
parente73521d6c7afa351268dbb2f3d8f464511d7358e (diff)
downloadgdb-50e9934812fd3b3145eda37ae13a7d86afe6180d.zip
gdb-50e9934812fd3b3145eda37ae13a7d86afe6180d.tar.gz
gdb-50e9934812fd3b3145eda37ae13a7d86afe6180d.tar.bz2
* gas/cr16/pic-1.s: New.
* gas/cr16/pic-1.d: New. * gas/cr16/pic-2.s: New. * gas/cr16/pic-2.d: New. * gas/cr16/pic.exp: Run pic tests.
-rw-r--r--gas/testsuite/ChangeLog8
-rw-r--r--gas/testsuite/gas/cr16/pic.exp6
-rw-r--r--gas/testsuite/gas/cr16/pic1.d18
-rw-r--r--gas/testsuite/gas/cr16/pic1.s23
-rw-r--r--gas/testsuite/gas/cr16/pic2.d18
-rw-r--r--gas/testsuite/gas/cr16/pic2.s23
6 files changed, 96 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index f95f1e1..60b8c90 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2008-11-27 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
+
+ * gas/cr16/pic-1.s: New.
+ * gas/cr16/pic-1.d: New.
+ * gas/cr16/pic-2.s: New.
+ * gas/cr16/pic-2.d: New.
+ * gas/cr16/pic.exp: Run pic tests.
+
2008-11-19 Hans-Peter Nilsson <hp@axis.com>
* gas/cris/rd-tls-1.d, gas/cris/rd-tls-1.s: Use a local thread
diff --git a/gas/testsuite/gas/cr16/pic.exp b/gas/testsuite/gas/cr16/pic.exp
new file mode 100644
index 0000000..1e420b6
--- /dev/null
+++ b/gas/testsuite/gas/cr16/pic.exp
@@ -0,0 +1,6 @@
+# CR16 PIC testcases (ie for pic and PIC)
+
+if [istarget cr16*-*] {
+ run_dump_test "pic1"
+ run_dump_test "pic2"
+}
diff --git a/gas/testsuite/gas/cr16/pic1.d b/gas/testsuite/gas/cr16/pic1.d
new file mode 100644
index 0000000..3e61d98
--- /dev/null
+++ b/gas/testsuite/gas/cr16/pic1.d
@@ -0,0 +1,18 @@
+#as:
+#objdump: -dr
+#name: pic1
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <_main>:
+ 0: 70 00 00 00 movd \$0x0:l,\(r1,r0\)
+ 4: 00 00
+ 0: R_CR16_IMM32 _text_pointer
+ 6: 70 00 00 00 movd \$0x0:l,\(r1,r0\)
+ a: 00 00
+ 6: R_CR16_IMM32a _text_address_1
+
+0000000c <_text_address_1>:
+ c: ee 0a jump \(ra\)
diff --git a/gas/testsuite/gas/cr16/pic1.s b/gas/testsuite/gas/cr16/pic1.s
new file mode 100644
index 0000000..23f0cc8
--- /dev/null
+++ b/gas/testsuite/gas/cr16/pic1.s
@@ -0,0 +1,23 @@
+ .section .text
+ .globl _text_pointer
+ .section .data.rel
+ .type _text_pointer, @object
+_text_pointer:
+ .long _text_address@c
+ .section .text
+ .globl _main
+ .type _main, @function
+_main:
+ ######################
+ # Data symbols
+ ######################
+ movd $_text_pointer@l, (r1,r0)
+ ######################
+ # Code symbol with cpic
+ ######################
+ movd $_text_address_1@cpic, (r1,r0)
+
+ .globl _text_address_1
+ .type _text_address_1, @function
+_text_address_1:
+ jump (ra)
diff --git a/gas/testsuite/gas/cr16/pic2.d b/gas/testsuite/gas/cr16/pic2.d
new file mode 100644
index 0000000..deacee4
--- /dev/null
+++ b/gas/testsuite/gas/cr16/pic2.d
@@ -0,0 +1,18 @@
+#as:
+#objdump: -dr
+#name: pic2
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+00000000 <_main>:
+ 0: 12 00 0c 90 loadd 0x0:l\(r12\),\(r1,r0\)
+ 4: 00 00
+ 0: R_CR16_GOT_REGREL20 _text_pointer
+ 6: 12 00 0c 90 loadd 0x0:l\(r12\),\(r1,r0\)
+ a: 00 00
+ 6: R_CR16_GOTC_REGREL20 _text_address_1
+
+0000000c <_text_address_1>:
+ c: ee 0a jump \(ra\)
diff --git a/gas/testsuite/gas/cr16/pic2.s b/gas/testsuite/gas/cr16/pic2.s
new file mode 100644
index 0000000..45b6403
--- /dev/null
+++ b/gas/testsuite/gas/cr16/pic2.s
@@ -0,0 +1,23 @@
+ .section .text
+ .globl _text_pointer
+ .section .data.rel
+ .type _text_pointer, @object
+_text_pointer:
+ .long _text_address@c
+ .section .text
+ .globl _main
+ .type _main, @function
+_main:
+ ######################
+ # Data symbol with GOT
+ ######################
+ loadd _text_pointer@GOT(r12), (r1,r0)
+ ######################
+ # Code symbol with cGOT
+ ######################
+ loadd _text_address_1@cGOT(r12), (r1,r0)
+
+ .globl _text_address_1
+ .type _text_address_1, @function
+_text_address_1:
+ jump (ra)