Stop inc-not-f and dec-not-f, etc
parent
bb7777e0cf
commit
2ee51f50e2
|
@ -12,25 +12,19 @@ SYMBOL: struct-return-area
|
|||
|
||||
SYMBOLS: int-reg-reps float-reg-reps ;
|
||||
|
||||
<PRIVATE
|
||||
|
||||
: inc-not-f ( variable -- ) dup get [ inc ] [ drop ] if ; inline
|
||||
|
||||
: dec-not-f ( variable -- ) dup get [ dec ] [ drop ] if ; inline
|
||||
|
||||
PRIVATE>
|
||||
|
||||
: record-reg-reps ( reps -- reps )
|
||||
dup [
|
||||
dup second not [ ! on-stack?: f
|
||||
first int-rep? int-reg-reps float-reg-reps ? inc-not-f
|
||||
first int-rep? int-reg-reps float-reg-reps ?
|
||||
dup get [ inc ] [ drop ] if
|
||||
] [ drop ] if
|
||||
] each ;
|
||||
|
||||
: unrecord-reg-reps ( reps -- reps )
|
||||
dup [
|
||||
dup second not [ ! on-stack?: f
|
||||
first int-rep? int-reg-reps float-reg-reps ? dec-not-f
|
||||
first int-rep? int-reg-reps float-reg-reps ?
|
||||
dup get [ dec ] [ drop ] if
|
||||
] [ drop ] if
|
||||
] each ;
|
||||
|
||||
|
|
|
@ -27,7 +27,8 @@ M: x86.64 reserved-stack-space 0 ;
|
|||
:: flatten-small-struct ( c-type -- seq )
|
||||
c-type struct-types&offset split-struct [
|
||||
[ lookup-c-type c-type-rep reg-class-of ] map
|
||||
int-regs swap member? int-rep double-rep ? f f 3array
|
||||
int-regs swap member? int-rep double-rep ?
|
||||
f f 3array
|
||||
] map :> reps
|
||||
int-reg-reps get float-reg-reps get and [
|
||||
0 :> int-mems!
|
||||
|
|
Loading…
Reference in New Issue