Fix conflict

db4
unknown 2008-11-08 21:41:33 -06:00
commit 7a6a280b5c
6 changed files with 27 additions and 16 deletions

View File

@ -1,6 +1,7 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors system kernel alien.c-types cpu.architecture cpu.ppc ; USING: accessors system kernel layouts
alien.c-types cpu.architecture cpu.ppc ;
IN: cpu.ppc.linux IN: cpu.ppc.linux
<< <<
@ -8,11 +9,11 @@ t "longlong" c-type (>>stack-align?)
t "ulonglong" c-type (>>stack-align?) t "ulonglong" c-type (>>stack-align?)
>> >>
M: linux reserved-area-size 2 ; M: linux reserved-area-size 2 cells ;
M: linux lr-save 1 ; M: linux lr-save 1 cells ;
M: float-regs param-regs { 1 2 3 4 5 6 7 8 } ; M: float-regs param-regs drop { 1 2 3 4 5 6 7 8 } ;
M: ppc value-structs? f ; M: ppc value-structs? f ;

View File

@ -1,6 +1,7 @@
! Copyright (C) 2008 Slava Pestov. ! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors system kernel alien.c-types cpu.architecture cpu.ppc ; USING: accessors system kernel layouts
alien.c-types cpu.architecture cpu.ppc ;
IN: cpu.ppc.macosx IN: cpu.ppc.macosx
<< <<
@ -9,11 +10,11 @@ IN: cpu.ppc.macosx
4 "double" c-type (>>align) 4 "double" c-type (>>align)
>> >>
M: macosx reserved-area-size 6 ; M: macosx reserved-area-size 6 cells ;
M: macosx lr-save 2 ; M: macosx lr-save 2 cells ;
M: float-regs param-regs { 1 2 3 4 5 6 7 8 9 10 11 12 13 } ; M: float-regs param-regs drop { 1 2 3 4 5 6 7 8 9 10 11 12 13 } ;
M: ppc value-structs? t ; M: ppc value-structs? t ;

View File

@ -349,12 +349,17 @@ M: ppc %gc
"end" resolve-label ; "end" resolve-label ;
M: ppc %prologue ( n -- ) M: ppc %prologue ( n -- )
0 scratch-reg LOAD32 rc-absolute-ppc-2/2 rel-this #! We use a volatile register (r11) here for scratch. Because
#! callback bodies have a prologue too, we cannot assume
#! that c_to_factor saved all non-volatile registers, so
#! we have to respect the C calling convention. Also, we
#! cannot touch any param-regs either.
0 11 LOAD32 rc-absolute-ppc-2/2 rel-this
0 MFLR 0 MFLR
1 1 pick neg ADDI 1 1 pick neg ADDI
scratch-reg 1 pick xt-save STW 11 1 pick xt-save STW
dup scratch-reg LI dup 11 LI
scratch-reg 1 pick next-save STW 11 1 pick next-save STW
0 1 rot lr-save + STW ; 0 1 rot lr-save + STW ;
M: ppc %epilogue ( n -- ) M: ppc %epilogue ( n -- )

View File

@ -271,17 +271,21 @@ check_os_arch_word() {
set_build_info() { set_build_info() {
check_os_arch_word check_os_arch_word
MAKE_TARGET=$OS-$ARCH-$WORD
if [[ $OS == macosx && $ARCH == ppc ]] ; then if [[ $OS == macosx && $ARCH == ppc ]] ; then
MAKE_IMAGE_TARGET=macosx-ppc MAKE_IMAGE_TARGET=macosx-ppc
MAKE_TARGET=macosx-ppc
elif [[ $OS == linux && $ARCH == ppc ]] ; then elif [[ $OS == linux && $ARCH == ppc ]] ; then
MAKE_IMAGE_TARGET=linux-ppc MAKE_IMAGE_TARGET=linux-ppc
MAKE_TARGET=linux-ppc
elif [[ $OS == winnt && $ARCH == x86 && $WORD == 64 ]] ; then elif [[ $OS == winnt && $ARCH == x86 && $WORD == 64 ]] ; then
MAKE_IMAGE_TARGET=winnt-x86.64 MAKE_IMAGE_TARGET=winnt-x86.64
MAKE_TARGET=winnt-x86-64
elif [[ $ARCH == x86 && $WORD == 64 ]] ; then elif [[ $ARCH == x86 && $WORD == 64 ]] ; then
MAKE_IMAGE_TARGET=unix-x86.64 MAKE_IMAGE_TARGET=unix-x86.64
else MAKE_TARGET=$OS-x86-64
else
MAKE_IMAGE_TARGET=$ARCH.$WORD MAKE_IMAGE_TARGET=$ARCH.$WORD
MAKE_TARGET=$OS-$ARCH-$WORD
fi fi
BOOT_IMAGE=boot.$MAKE_IMAGE_TARGET.image BOOT_IMAGE=boot.$MAKE_IMAGE_TARGET.image
} }

View File

@ -117,7 +117,7 @@ CELL frame_executing(F_STACK_FRAME *frame)
F_STACK_FRAME *frame_successor(F_STACK_FRAME *frame) F_STACK_FRAME *frame_successor(F_STACK_FRAME *frame)
{ {
if(frame->size == 0) if(frame->size == 0)
critical_error("Stack frame has zero size",frame); critical_error("Stack frame has zero size",(CELL)frame);
return (F_STACK_FRAME *)((CELL)frame - frame->size); return (F_STACK_FRAME *)((CELL)frame - frame->size);
} }

View File

@ -10,7 +10,7 @@ and the callstack top is passed in EDX */
#define DS_REG %esi #define DS_REG %esi
#define RETURN_REG %eax #define RETURN_REG %eax
#define NV_TEMP_REG %rbx #define NV_TEMP_REG %ebx
#define CELL_SIZE 4 #define CELL_SIZE 4
#define STACK_PADDING 12 #define STACK_PADDING 12