From 42d262fa87203f848da6b81cfa3ecceb6e83c905 Mon Sep 17 00:00:00 2001 From: Dale Johannesen Date: Mon, 31 Jan 2005 18:03:46 +0000 Subject: [PATCH] darwin-tramp.asm (__trampoline_setup): Make work for 64 bit. 2005-01-31 Dale Johannesen * config/rs6000/darwin-tramp.asm (__trampoline_setup): Make work for 64 bit. From-SVN: r94486 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/darwin-tramp.asm | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 132be3f9e68..b7650f84b51 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-01-31 Dale Johannesen + + * config/rs6000/darwin-tramp.asm (__trampoline_setup): + Make work for 64 bit. + 2005-01-31 Roger Sayle Dale Johannesen diff --git a/gcc/config/rs6000/darwin-tramp.asm b/gcc/config/rs6000/darwin-tramp.asm index 6d0fab223d1..a8125527bfd 100644 --- a/gcc/config/rs6000/darwin-tramp.asm +++ b/gcc/config/rs6000/darwin-tramp.asm @@ -33,6 +33,8 @@ * executable file might be covered by the GNU General Public License. */ +/* APPLE LOCAL mainline throughout this file */ + #include "darwin-asm.h" /* Set up trampolines. */ @@ -68,11 +70,11 @@ LCF0: mflr r11 addis r7,r11,ha16(LTRAMP-LCF0) lg r7,lo16(LTRAMP-LCF0)(r7) - subi r7,r7,GPR_BYTES + subi r7,r7,4 li r8,trampoline_size /* verify trampoline big enough */ cmpg cr1,r8,r4 srwi r4,r4,2 /* # words to move (insns always 4-byte) */ - addi r9,r3,-GPR_BYTES /* adjust pointer for lgu */ + addi r9,r3,-4 /* adjust pointer for lgu */ mtctr r4 blt cr1,Labort @@ -80,8 +82,8 @@ LCF0: /* Copy the instructions to the stack */ Lmove: - lgu r10,GPR_BYTES(r7) - stgu r10,GPR_BYTES(r9) + lwzu r10,4(r7) + stwu r10,4(r9) bdnz Lmove /* Store correct function and static chain */ -- 2.30.2