diff options
author | Richard Henderson <rth@twiddle.net> | 2015-01-16 11:40:33 -0800 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2015-01-16 11:40:33 -0800 |
commit | d68c8aed19d459a9fef0847f316dd9473ef263ad (patch) | |
tree | 12a1e1980ebb6e874f715ce700c60e2be6cad11e /src/sparc | |
parent | b740ab7cc955fc2888325e6387207f34400a6c45 (diff) | |
download | libffi-d68c8aed19d459a9fef0847f316dd9473ef263ad.tar.gz |
sparc: Solaris fixes, part 2
/bin/as seems to only understand single-digit labels
/bin/as knows nothing about .rept/.endr
Diffstat (limited to 'src/sparc')
-rw-r--r-- | src/sparc/v8.S | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/src/sparc/v8.S b/src/sparc/v8.S index 3b5bab2..f675151 100644 --- a/src/sparc/v8.S +++ b/src/sparc/v8.S @@ -177,7 +177,7 @@ E(SPARC_RET_F_2) restore E(SP_V8_RET_CPLX8) stb %o0, [%i2+1] - b 10f + b 0f srl %o0, 8, %o0 E(SPARC_RET_F_1) st %f0, [%i2] @@ -189,7 +189,7 @@ E(SPARC_RET_F_1) ret restore .align 8 -10: stb %o0, [%i2] +0: stb %o0, [%i2] ret restore @@ -202,17 +202,35 @@ E(SPARC_RET_F_1) sll %l1, 2, %l0 ! size * 4 1: sll %l1, 4, %l1 ! size * 16 add %l0, %l1, %l0 ! size * 20 - add %o7, %l0, %o7 ! o7 = 0b + size*20 + add %o7, %l0, %o7 ! o7 = 8b + size*20 jmp %o7+(2f-8b) mov %i5, %g2 ! load static chain 2: -.rept 0x1000 - call %i1 - nop - unimp (. - 2b) / 20 - ret + +/* The Sun assembler doesn't understand .rept 0x1000. */ +#define rept1 \ + call %i1; \ + nop; \ + unimp (. - 2b) / 20; \ + ret; \ restore -.endr + +#define rept16 \ + rept1; rept1; rept1; rept1; \ + rept1; rept1; rept1; rept1; \ + rept1; rept1; rept1; rept1; \ + rept1; rept1; rept1; rept1 + +#define rept256 \ + rept16; rept16; rept16; rept16; \ + rept16; rept16; rept16; rept16; \ + rept16; rept16; rept16; rept16; \ + rept16; rept16; rept16; rept16 + + rept256; rept256; rept256; rept256 + rept256; rept256; rept256; rept256 + rept256; rept256; rept256; rept256 + rept256; rept256; rept256; rept256 cfi_endproc .size C(ffi_call_v8),. - C(ffi_call_v8) |