* config/tc-sparc.c (sparc_ip): Handle 'i' + r<0..31>
	in addition to 'i' + [goli]<0..7>.

gas/testsuite/

	* gas/sparc/imm-plus-rreg.[sd]: New test.
	* gas/sparc/sparc.exp: Run new test.
This commit is contained in:
David S. Miller 2011-09-08 16:56:10 +00:00
parent cdf492019f
commit f124dd4f3f
6 changed files with 34 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-09-08 Mark Fortescue <mark@mtfhpc.demon.co.uk>
* config/tc-sparc.c (sparc_ip): Handle 'i' + r<0..31>
in addition to 'i' + [goli]<0..7>.
2011-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* cgen.c (gas_cgen_pcrel_r_type): New function.

View File

@ -2408,8 +2408,10 @@ sparc_ip (char *str, const struct sparc_opcode **pinsn)
{
if (s1[-2] == '%' && s1[-3] == '+')
s1 -= 3;
else if (strchr ("goli0123456789", s1[-2]) && s1[-3] == '%' && s1[-4] == '+')
else if (strchr ("golir0123456789", s1[-2]) && s1[-3] == '%' && s1[-4] == '+')
s1 -= 4;
else if (s1[-3] == 'r' && s1[-4] == '%' && s1[-5] == '+')
s1 -= 5;
else
s1 = NULL;
if (s1)

View File

@ -1,3 +1,8 @@
2011-09-08 Mark Fortescue <mark@mtfhpc.demon.co.uk>
* gas/sparc/imm-plus-rreg.[sd]: New test.
* gas/sparc/sparc.exp: Run new test.
2011-09-08 David S. Miller <davem@davemloft.net>
* gas/sparc/hpcvis3.s: Correct pdistn test.

View File

@ -0,0 +1,13 @@
#as: -Av8
#objdump: -dr
#name: address: simm13 + rreg
.*: +file format .*
Disassembly of section .text:
00000000 <foo>:
0: c2 02 20 0a ld \[ %o0 \+ 0xa \], %g1
4: c4 04 a0 0a ld \[ %l2 \+ 0xa \], %g2
8: c4 22 20 0a st %g2, \[ %o0 \+ 0xa \]
c: c2 24 a0 0a st %g1, \[ %l2 \+ 0xa \]

View File

@ -0,0 +1,7 @@
! simm13 + regrs1 address using r<0..31> instead of [goli]<0..7>
.text
foo:
ld [10+%r8], %r1
ld [10+%r18], %r2
st %r2, [10+%r8]
st %r1, [10+%r18]

View File

@ -50,6 +50,7 @@ if [istarget sparc*-*-*] {
run_dump_test "plt64"
run_dump_test "gotop64"
}
run_dump_test "imm-plus-rreg"
run_dump_test "v9branch1"
run_dump_test "v9branch2"
run_dump_test "v9branch3"