cpu.ppc: fixes
parent
cc2cee1ae3
commit
423f9c607a
|
@ -3,8 +3,8 @@
|
||||||
USING: accessors assocs sequences kernel combinators
|
USING: accessors assocs sequences kernel combinators
|
||||||
classes.algebra byte-arrays make math math.order math.ranges
|
classes.algebra byte-arrays make math math.order math.ranges
|
||||||
system namespaces locals layouts words alien alien.accessors
|
system namespaces locals layouts words alien alien.accessors
|
||||||
alien.c-types alien.complex alien.data literals cpu.architecture
|
alien.c-types alien.complex alien.data alien.libraries
|
||||||
cpu.ppc.assembler cpu.ppc.assembler.backend
|
literals cpu.architecture cpu.ppc.assembler cpu.ppc.assembler.backend
|
||||||
compiler.cfg.registers compiler.cfg.instructions
|
compiler.cfg.registers compiler.cfg.instructions
|
||||||
compiler.cfg.comparisons compiler.codegen.fixup
|
compiler.cfg.comparisons compiler.codegen.fixup
|
||||||
compiler.cfg.intrinsics compiler.cfg.stack-frame
|
compiler.cfg.intrinsics compiler.cfg.stack-frame
|
||||||
|
@ -681,13 +681,13 @@ GENERIC: load-param ( reg src -- )
|
||||||
|
|
||||||
M: integer load-param int-rep %copy ;
|
M: integer load-param int-rep %copy ;
|
||||||
|
|
||||||
M: spill-slot load-param n>> spill@ LWZ ;
|
M: spill-slot load-param [ 1 ] dip n>> spill@ LWZ ;
|
||||||
|
|
||||||
GENERIC: store-param ( reg dst -- )
|
GENERIC: store-param ( reg dst -- )
|
||||||
|
|
||||||
M: integer store-param swap int-rep %copy ;
|
M: integer store-param swap int-rep %copy ;
|
||||||
|
|
||||||
M: spill-slot store-param n>> spill@ STW ;
|
M: spill-slot store-param [ 1 ] dip n>> spill@ STW ;
|
||||||
|
|
||||||
:: call-unbox-func ( src func -- )
|
:: call-unbox-func ( src func -- )
|
||||||
3 src load-param
|
3 src load-param
|
||||||
|
@ -710,7 +710,7 @@ M:: ppc %unbox-long-long ( src n func -- )
|
||||||
M:: ppc %unbox-large-struct ( src n c-type -- )
|
M:: ppc %unbox-large-struct ( src n c-type -- )
|
||||||
4 src load-param
|
4 src load-param
|
||||||
3 1 n local@ ADDI
|
3 1 n local@ ADDI
|
||||||
heap-size 5 LI
|
c-type heap-size 5 LI
|
||||||
"memcpy" "libc" load-library %alien-invoke ;
|
"memcpy" "libc" load-library %alien-invoke ;
|
||||||
|
|
||||||
M:: ppc %box ( dst n rep func -- )
|
M:: ppc %box ( dst n rep func -- )
|
||||||
|
@ -724,6 +724,7 @@ M:: ppc %box-long-long ( dst n func -- )
|
||||||
3 1 n local@ LWZ
|
3 1 n local@ LWZ
|
||||||
4 1 n cell + local@ LWZ
|
4 1 n cell + local@ LWZ
|
||||||
] when
|
] when
|
||||||
|
5 %load-vm-addr
|
||||||
func f %alien-invoke
|
func f %alien-invoke
|
||||||
3 dst store-param ;
|
3 dst store-param ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue