Fix some typos
parent
c41f21412e
commit
9072011c32
|
@ -4,7 +4,7 @@ USING: alien.c-types arrays cpu.x86.assembler
|
||||||
cpu.x86.architecture cpu.x86.intrinsics cpu.x86.sse2
|
cpu.x86.architecture cpu.x86.intrinsics cpu.x86.sse2
|
||||||
cpu.x86.allot cpu.architecture kernel kernel.private math
|
cpu.x86.allot cpu.architecture kernel kernel.private math
|
||||||
namespaces sequences generator.registers generator.fixup system
|
namespaces sequences generator.registers generator.fixup system
|
||||||
alien ;
|
alien alien.compiler alien.structs slots splitting math.functions ;
|
||||||
IN: cpu.x86.64
|
IN: cpu.x86.64
|
||||||
|
|
||||||
PREDICATE: x86-backend amd64-backend
|
PREDICATE: x86-backend amd64-backend
|
||||||
|
@ -178,10 +178,10 @@ T{ x86-backend f 8 } compiler-backend set-global
|
||||||
|
|
||||||
! The ABI for passing structs by value is pretty messed up
|
! The ABI for passing structs by value is pretty messed up
|
||||||
"void*" c-type clone "__stack_value" define-primitive-type
|
"void*" c-type clone "__stack_value" define-primitive-type
|
||||||
T{ stack-regs } "__stack_value" c-type set-c-type-reg-class
|
T{ stack-params } "__stack_value" c-type set-c-type-reg-class
|
||||||
|
|
||||||
: struct-types&offset ( ctype -- pairs )
|
: struct-types&offset ( struct-type -- pairs )
|
||||||
c-type struct-type-fields [
|
struct-type-fields [
|
||||||
dup slot-spec-type swap slot-spec-offset 2array
|
dup slot-spec-type swap slot-spec-offset 2array
|
||||||
] map ;
|
] map ;
|
||||||
|
|
||||||
|
@ -192,14 +192,15 @@ T{ stack-regs } "__stack_value" c-type set-c-type-reg-class
|
||||||
|
|
||||||
: flatten-large-struct ( type -- )
|
: flatten-large-struct ( type -- )
|
||||||
heap-size cell align
|
heap-size cell align
|
||||||
cell /i "__stack_value" <repetition> % ;
|
cell /i "__stack_value" c-type <repetition> % ;
|
||||||
|
|
||||||
M: struct-type flatten-value-type ( type -- seq )
|
M: struct-type flatten-value-type ( type -- seq )
|
||||||
dup c-size 16 > [
|
dup heap-size 16 > [
|
||||||
flatten-large-struct
|
flatten-large-struct
|
||||||
] [
|
] [
|
||||||
struct-types&offset split-struct [
|
struct-types&offset split-struct [
|
||||||
[ c-type c-type-reg-class ] map
|
[ c-type c-type-reg-class ] map
|
||||||
T{ int-regs } swap member? "void*" "double" ? ,
|
T{ int-regs } swap member?
|
||||||
|
"void*" "double" ? c-type ,
|
||||||
] each
|
] each
|
||||||
] if ;
|
] if ;
|
||||||
|
|
Loading…
Reference in New Issue