Commit 16070e45 by Andreas Tobler Committed by Andreas Tobler

004-09-02 Andreas Tobler <a.tobler@schweiz.ch>

	* src/powerpc/aix.S: Remove whitespaces.
	* src/powerpc/aix_closure.S: Likewise.
	* src/powerpc/asm.h: Likewise.
	* src/powerpc/ffi.c: Likewise.
	* src/powerpc/ffitarget.h: Likewise.
	* src/powerpc/linux64.S: Likewise.
	* src/powerpc/linux64_closure.S: Likewise.
	* src/powerpc/ppc_closure.S: Likewise.
	* src/powerpc/sysv.S: Likewise.

From-SVN: r86991
parent 19dc705e
2004-09-02 Andreas Tobler <a.tobler@schweiz.ch>
* src/powerpc/aix.S: Remove whitespaces.
* src/powerpc/aix_closure.S: Likewise.
* src/powerpc/asm.h: Likewise.
* src/powerpc/ffi.c: Likewise.
* src/powerpc/ffitarget.h: Likewise.
* src/powerpc/linux64.S: Likewise.
* src/powerpc/linux64_closure.S: Likewise.
* src/powerpc/ppc_closure.S: Likewise.
* src/powerpc/sysv.S: Likewise.
2004-08-30 Anthony Green <green@redhat.com>
* Makefile.am: Add frv support.
......
......@@ -24,62 +24,62 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
.set r0,0
.set r1,1
.set r2,2
.set r3,3
.set r4,4
.set r5,5
.set r6,6
.set r7,7
.set r8,8
.set r9,9
.set r10,10
.set r11,11
.set r12,12
.set r13,13
.set r14,14
.set r15,15
.set r16,16
.set r17,17
.set r18,18
.set r19,19
.set r20,20
.set r21,21
.set r22,22
.set r23,23
.set r24,24
.set r25,25
.set r26,26
.set r27,27
.set r28,28
.set r29,29
.set r30,30
.set r31,31
.set f0,0
.set f1,1
.set f2,2
.set f3,3
.set f4,4
.set f5,5
.set f6,6
.set f7,7
.set f8,8
.set f9,9
.set f10,10
.set f11,11
.set f12,12
.set f13,13
.set f14,14
.set f15,15
.set f16,16
.set f17,17
.set f18,18
.set f19,19
.set f20,20
.set f21,21
#define LIBFFI_ASM
.set r0,0
.set r1,1
.set r2,2
.set r3,3
.set r4,4
.set r5,5
.set r6,6
.set r7,7
.set r8,8
.set r9,9
.set r10,10
.set r11,11
.set r12,12
.set r13,13
.set r14,14
.set r15,15
.set r16,16
.set r17,17
.set r18,18
.set r19,19
.set r20,20
.set r21,21
.set r22,22
.set r23,23
.set r24,24
.set r25,25
.set r26,26
.set r27,27
.set r28,28
.set r29,29
.set r30,30
.set r31,31
.set f0,0
.set f1,1
.set f2,2
.set f3,3
.set f4,4
.set f5,5
.set f6,6
.set f7,7
.set f8,8
.set f9,9
.set f10,10
.set f11,11
.set f12,12
.set f13,13
.set f14,14
.set f15,15
.set f16,16
.set f17,17
.set f18,18
.set f19,19
.set f20,20
.set f21,21
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
#define JUMPTARGET(name) name
......@@ -104,7 +104,7 @@ ffi_call_AIX:
mr r8,r1
/* Allocate the stack space we need. */
stwux r1,r1,r4
stwux r1,r1,r4
/* Save registers we use. */
mflr r9
......@@ -130,7 +130,7 @@ ffi_call_AIX:
lwz r2,4(r12)
lwz r12,0(r12)
mtctr r12 // r12 holds address of _ffi_prep_args
bctrl
bctrl
lwz r2,20(r1)
/* Now do the call. */
......
/* -----------------------------------------------------------------------
aix_closure.S - Copyright (c) 2002 2003 Free Software Foundation, Inc.
based on darwin_closure.S
based on darwin_closure.S
PowerPC Assembly glue.
......@@ -119,10 +119,10 @@ ffi_closure_ASM:
in the parents outgoing area */
stw r3, 200(r1)
stw r4, 204(r1)
stw r5, 208(r1)
stw r5, 208(r1)
stw r6, 212(r1)
stw r7, 216(r1)
stw r8, 220(r1)
stw r8, 220(r1)
stw r9, 224(r1)
stw r10, 228(r1)
......@@ -135,11 +135,11 @@ ffi_closure_ASM:
stfd f6, 96(r1)
stfd f7, 104(r1)
stfd f8, 112(r1)
stfd f9, 120(r1)
stfd f10, 128(r1)
stfd f11, 136(r1)
stfd f12, 144(r1)
stfd f13, 152(r1)
stfd f9, 120(r1)
stfd f10, 128(r1)
stfd f11, 136(r1)
stfd f12, 144(r1)
stfd f13, 152(r1)
/* set up registers for the routine that actually does the work */
/* get the context pointer from the trampoline */
......@@ -191,7 +191,7 @@ L..60:
/* case double */
L..46:
L..46:
lfd f1,0(r5)
b L..44
......@@ -233,7 +233,7 @@ L..57:
b L..44
/* case unsigned int16 */
L..58:
L..58:
addi r5,r5,2
lhz r3,0(r5)
......
/* -----------------------------------------------------------------------
asm.h - Copyright (c) 1998 Geoffrey Keating
PowerPC Assembly glue.
$Id: asm.h,v 1.1.1.1 1998/11/29 16:48:16 green Exp $
PowerPC Assembly glue.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
......@@ -50,12 +48,12 @@
#ifdef PIC
#define CALL_MCOUNT \
.pushsection; \
.section ".data"; \
.section ".data"; \
.align ALIGNARG(2); \
0:.long 0; \
.previous; \
mflr %r0; \
stw %r0,4(%r1); \
stw %r0,4(%r1); \
bl _GLOBAL_OFFSET_TABLE_@local-4; \
mflr %r11; \
lwz %r0,0b@got(%r11); \
......@@ -67,8 +65,8 @@
0:.long 0; \
.previous; \
mflr %r0; \
lis %r11,0b@ha; \
stw %r0,4(%r1); \
lis %r11,0b@ha; \
stw %r0,4(%r1); \
addi %r0,%r11,0b@l; \
bl JUMPTARGET(_mcount);
#endif /* PIC */
......@@ -125,4 +123,3 @@
/* Local labels stripped out by the linker. */
#define L(x) .L##x
......@@ -88,4 +88,3 @@ struct ffi_aix_trampoline_struct {
#endif
#endif
/* -----------------------------------------------------------------------
sysv.h - Copyright (c) 2003 Jakub Jelinek <jakub@redhat.com>
PowerPC64 Assembly glue.
Permission is hereby granted, free of charge, to any person obtaining
......@@ -23,7 +23,7 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#define LIBFFI_ASM
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
......
......@@ -5,15 +5,15 @@
.file "linux64_closure.S"
#ifdef __powerpc64__
.hidden ffi_closure_LINUX64, .ffi_closure_LINUX64
.globl ffi_closure_LINUX64, .ffi_closure_LINUX64
.section ".opd","aw"
.align 3
.hidden ffi_closure_LINUX64, .ffi_closure_LINUX64
.globl ffi_closure_LINUX64, .ffi_closure_LINUX64
.section ".opd","aw"
.align 3
ffi_closure_LINUX64:
.quad .ffi_closure_LINUX64,.TOC.@tocbase,0
.size ffi_closure_LINUX64,24
.type .ffi_closure_LINUX64,@function
.text
.quad .ffi_closure_LINUX64,.TOC.@tocbase,0
.size ffi_closure_LINUX64,24
.type .ffi_closure_LINUX64,@function
.text
.ffi_closure_LINUX64:
.LFB1:
# save general regs into parm save area
......@@ -71,7 +71,7 @@ ffi_closure_LINUX64:
# so use it to look up in a table
# so we know how to deal with each type
# look up the proper starting point in table
# look up the proper starting point in table
# by using return type as offset
mflr %r4 # move address of .Lret to r4
sldi %r3, %r3, 4 # now multiply return type by 16
......
......@@ -3,7 +3,7 @@
#include <ffi.h>
#include <powerpc/asm.h>
.file "ppc_closure.S"
.file "ppc_closure.S"
#ifndef __powerpc64__
......@@ -17,14 +17,14 @@ ENTRY(ffi_closure_SYSV)
# we want to build up an areas for the parameters passed
# in registers (both floating point and integer)
# so first save gpr 3 to gpr 10 (aligned to 4)
stw %r3, 16(%r1)
stw %r4, 20(%r1)
stw %r5, 24(%r1)
stw %r5, 24(%r1)
stw %r6, 28(%r1)
stw %r7, 32(%r1)
stw %r8, 36(%r1)
stw %r8, 36(%r1)
stw %r9, 40(%r1)
stw %r10,44(%r1)
......@@ -41,29 +41,29 @@ ENTRY(ffi_closure_SYSV)
# set up registers for the routine that actually does the work
# get the context pointer from the trampoline
mr %r3,%r11
# now load up the pointer to the result storage
# now load up the pointer to the result storage
addi %r4,%r1,112
# now load up the pointer to the saved gpr registers
addi %r5,%r1,16
addi %r5,%r1,16
# now load up the pointer to the saved fpr registers */
addi %r6,%r1,48
# now load up the pointer to the saved fpr registers */
addi %r6,%r1,48
# now load up the pointer to the outgoing parameter
# now load up the pointer to the outgoing parameter
# stack in the previous frame
# i.e. the previous frame pointer + 8
addi %r7,%r1,152
# make the call
# make the call
bl JUMPTARGET(ffi_closure_helper_SYSV)
# now r3 contains the return type
# so use it to look up in a table
# so we know how to deal with each type
# look up the proper starting point in table
# look up the proper starting point in table
# by using return type as offset
addi %r5,%r1,112 # get pointer to results area
bl .Lget_ret_type0_addr # get pointer to .Lret_type0 into LR
......@@ -108,21 +108,21 @@ ENTRY(ffi_closure_SYSV)
# case FFI_TYPE_DOUBLE
.Lret_type3:
lfd %f1,0(%r5)
lfd %f1,0(%r5)
b .Lfinish
nop
nop
# case FFI_TYPE_LONGDOUBLE
.Lret_type4:
lfd %f1,0(%r5)
lfd %f1,0(%r5)
b .Lfinish
nop
nop
# case FFI_TYPE_UINT8
.Lret_type5:
lbz %r3,3(%r5)
lbz %r3,3(%r5)
b .Lfinish
nop
nop
......@@ -190,9 +190,9 @@ ENTRY(ffi_closure_SYSV)
nop
nop
# case done
# case done
.Lfinish:
lwz %r0,148(%r1)
mtlr %r0
addi %r1,%r1,144
......
/* -----------------------------------------------------------------------
sysv.h - Copyright (c) 1998 Geoffrey Keating
PowerPC Assembly glue.
$Id: sysv.S,v 1.1.1.1 1998/11/29 16:48:16 green Exp $
PowerPC Assembly glue.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
......@@ -25,7 +23,7 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
#define LIBFFI_ASM
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
#include <powerpc/asm.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment