Skip to content
Snippets Groups Projects
Commit acbdb39a authored by andreast's avatar andreast
Browse files

2004-09-05 Andreas Tobler <a.tobler@schweiz.ch>

	* src/powerpc/darwin.S: Fix comments and identation.
	* src/powerpc/darwin_closure.S: Likewise.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87090 138bc75d-0d04-0410-961f-82ee72b054a4
parent e715d92e
No related merge requests found
2004-09-05 Andreas Tobler <a.tobler@schweiz.ch>
* src/powerpc/darwin.S: Fix comments and identation.
* src/powerpc/darwin_closure.S: Likewise.
2004-09-02 Andreas Tobler <a.tobler@schweiz.ch> 2004-09-02 Andreas Tobler <a.tobler@schweiz.ch>
* src/powerpc/ffi_darwin.c: Add flag for longdouble return values. * src/powerpc/ffi_darwin.c: Add flag for longdouble return values.
......
...@@ -40,8 +40,8 @@ ...@@ -40,8 +40,8 @@
.align 2 .align 2
_ffi_call_DARWIN: _ffi_call_DARWIN:
LFB0: LFB0:
mr r12,r8 /* We only need r12 until the call, mr r12,r8 /* We only need r12 until the call,
so it doesn't have to be saved... */ so it doesn't have to be saved. */
LFB1: LFB1:
/* Save the old stack pointer as AP. */ /* Save the old stack pointer as AP. */
mr r8,r1 mr r8,r1
...@@ -52,16 +52,16 @@ LCFI0: ...@@ -52,16 +52,16 @@ LCFI0:
/* Save registers we use. */ /* Save registers we use. */
mflr r9 mflr r9
stw r28,-16(r8) stw r28,-16(r8)
stw r29,-12(r8) stw r29,-12(r8)
stw r30, -8(r8) stw r30,-8(r8)
stw r31, -4(r8) stw r31,-4(r8)
stw r9, 8(r8) stw r9,8(r8)
stw r2, 20(r1) stw r2,20(r1)
LCFI1: LCFI1:
/* Save arguments over call... */ /* Save arguments over call. */
mr r31,r5 /* flags, */ mr r31,r5 /* flags, */
mr r30,r6 /* rvalue, */ mr r30,r6 /* rvalue, */
mr r29,r7 /* function address, */ mr r29,r7 /* function address, */
...@@ -71,7 +71,7 @@ LCFI2: ...@@ -71,7 +71,7 @@ LCFI2:
mr r4,r1 mr r4,r1
li r9,0 li r9,0
mtctr r12 // r12 holds address of _ffi_prep_args mtctr r12 /* r12 holds address of _ffi_prep_args. */
bctrl bctrl
lwz r2,20(r1) lwz r2,20(r1)
...@@ -82,19 +82,19 @@ LCFI2: ...@@ -82,19 +82,19 @@ LCFI2:
mtctr r29 mtctr r29
/* Load all those argument registers. /* Load all those argument registers.
We have set up a nice stack frame, just load it into registers. */ We have set up a nice stack frame, just load it into registers. */
lwz r3, 20+(1*4)(r1) lwz r3,20+(1*4)(r1)
lwz r4, 20+(2*4)(r1) lwz r4,20+(2*4)(r1)
lwz r5, 20+(3*4)(r1) lwz r5,20+(3*4)(r1)
lwz r6, 20+(4*4)(r1) lwz r6,20+(4*4)(r1)
nop nop
lwz r7, 20+(5*4)(r1) lwz r7,20+(5*4)(r1)
lwz r8, 20+(6*4)(r1) lwz r8,20+(6*4)(r1)
lwz r9, 20+(7*4)(r1) lwz r9,20+(7*4)(r1)
lwz r10,20+(8*4)(r1) lwz r10,20+(8*4)(r1)
L1: L1:
/* Load all the FP registers. */ /* Load all the FP registers. */
bf 6,L2 // 2f + 0x18 bf 6,L2 /* No floats to load. */
lfd f1,-16-(13*8)(r28) lfd f1,-16-(13*8)(r28)
lfd f2,-16-(12*8)(r28) lfd f2,-16-(12*8)(r28)
lfd f3,-16-(11*8)(r28) lfd f3,-16-(11*8)(r28)
...@@ -113,8 +113,8 @@ L1: ...@@ -113,8 +113,8 @@ L1:
lfd f13,-16-(1*8)(r28) lfd f13,-16-(1*8)(r28)
L2: L2:
mr r12,r29 /* Put the target address in r12 as specified. */ mr r12,r29 /* Put the target address in r12 as specified. */
mtctr r12 mtctr r12
nop nop
nop nop
/* Make the call. */ /* Make the call. */
...@@ -129,14 +129,14 @@ L2: ...@@ -129,14 +129,14 @@ L2:
bf 28,L(done_return_value) bf 28,L(done_return_value)
stw r4,4(r30) stw r4,4(r30)
/* Fall through... */ /* Fall through. */
L(done_return_value): L(done_return_value):
/* Restore the registers we used and return. */ /* Restore the registers we used and return. */
lwz r9, 8(r28) lwz r9,8(r28)
lwz r31, -4(r28) lwz r31,-4(r28)
mtlr r9 mtlr r9
lwz r30, -8(r28) lwz r30,-8(r28)
lwz r29,-12(r28) lwz r29,-12(r28)
lwz r28,-16(r28) lwz r28,-16(r28)
lwz r1,0(r1) lwz r1,0(r1)
......
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
.align 2 .align 2
_ffi_closure_ASM: _ffi_closure_ASM:
LFB1: LFB1:
mflr r0 /* extract return address */ mflr r0 /* extract return address */
stw r0, 8(r1) /* save the return address */ stw r0,8(r1) /* save the return address */
LCFI0: LCFI0:
/* 24 Bytes (Linkage Area) /* 24 Bytes (Linkage Area)
32 Bytes (outgoing parameter area, always reserved) 32 Bytes (outgoing parameter area, always reserved)
...@@ -53,29 +53,29 @@ LCFI1: ...@@ -53,29 +53,29 @@ LCFI1:
/* We store gpr 3 to gpr 10 (aligned to 4) /* We store gpr 3 to gpr 10 (aligned to 4)
in the parents outgoing area. */ in the parents outgoing area. */
stw r3, 200(r1) stw r3,200(r1)
stw r4, 204(r1) stw r4,204(r1)
stw r5, 208(r1) stw r5,208(r1)
stw r6, 212(r1) stw r6,212(r1)
stw r7, 216(r1) stw r7,216(r1)
stw r8, 220(r1) stw r8,220(r1)
stw r9, 224(r1) stw r9,224(r1)
stw r10, 228(r1) stw r10,228(r1)
/* We save fpr 1 to fpr 13. (aligned to 8) */ /* We save fpr 1 to fpr 13. (aligned to 8) */
stfd f1, 56(r1) stfd f1,56(r1)
stfd f2, 64(r1) stfd f2,64(r1)
stfd f3, 72(r1) stfd f3,72(r1)
stfd f4, 80(r1) stfd f4,80(r1)
stfd f5, 88(r1) stfd f5,88(r1)
stfd f6, 96(r1) stfd f6,96(r1)
stfd f7, 104(r1) stfd f7,104(r1)
stfd f8, 112(r1) stfd f8,112(r1)
stfd f9, 120(r1) stfd f9,120(r1)
stfd f10, 128(r1) stfd f10,128(r1)
stfd f11, 136(r1) stfd f11,136(r1)
stfd f12, 144(r1) stfd f12,144(r1)
stfd f13, 152(r1) stfd f13,152(r1)
/* Set up registers for the routine that actually does the work /* Set up registers for the routine that actually does the work
get the context pointer from the trampoline. */ get the context pointer from the trampoline. */
...@@ -226,9 +226,9 @@ Lret_type14: ...@@ -226,9 +226,9 @@ Lret_type14:
/* case done */ /* case done */
Lfinish: Lfinish:
addi r1,r1,176 /* Restore stack pointer. */ addi r1,r1,176 /* Restore stack pointer. */
lwz r0,8(r1) /* Get return address. */ lwz r0,8(r1) /* Get return address. */
mtlr r0 /* Reset link register. */ mtlr r0 /* Reset link register. */
blr blr
/* END(ffi_closure_ASM) */ /* END(ffi_closure_ASM) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment