* 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.
This commit is contained in:
M R Swami Reddy 2008-11-27 11:46:52 +00:00
parent e73521d6c7
commit 50e9934812
6 changed files with 96 additions and 0 deletions

View File

@ -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

View File

@ -0,0 +1,6 @@
# CR16 PIC testcases (ie for pic and PIC)
if [istarget cr16*-*] {
run_dump_test "pic1"
run_dump_test "pic2"
}

View File

@ -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\)

View File

@ -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)

View File

@ -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\)

View File

@ -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)