AMD64 fix, Cocoa UI memory leak fix
parent
916ded94c4
commit
489bea18d5
|
@ -1,4 +1,3 @@
|
|||
- amd64 crash
|
||||
- make-frame should compile
|
||||
|
||||
- httpd search tools
|
||||
|
|
|
@ -114,7 +114,7 @@ M: object load-literal ( literal vreg -- )
|
|||
! Untag and multiply to get a jump table offset
|
||||
"n" operand fixnum>slot@
|
||||
! Add to jump table base. We use a temporary register since
|
||||
! on AMD4 we have to load a 64-bit immediate. On x86, this
|
||||
! on AMD64 we have to load a 64-bit immediate. On x86, this
|
||||
! is redundant.
|
||||
"scratch" operand HEX: ffffffff MOV "end" get absolute-cell
|
||||
"n" operand "scratch" operand ADD
|
||||
|
|
|
@ -190,8 +190,16 @@ M: register displacement drop f ;
|
|||
( Utilities )
|
||||
UNION: operand register indirect ;
|
||||
|
||||
: rex.w? ( reg mod-r/m rex.w -- ? )
|
||||
[ register-64? ] 2apply or and ;
|
||||
: operand-64? ( operand -- ? )
|
||||
dup indirect? [
|
||||
dup indirect-base register-64?
|
||||
swap indirect-index register-64? or
|
||||
] [
|
||||
register-64?
|
||||
] if ;
|
||||
|
||||
: rex.w? ( rex.w reg mod-r/m -- ? )
|
||||
[ operand-64? ] [ operand-64? ] ?if and ;
|
||||
|
||||
: lhs-prefix
|
||||
extended? [ BIN: 00000100 bitor ] when ;
|
||||
|
|
|
@ -88,15 +88,18 @@ IN: compiler
|
|||
{ +clobber { "obj" "slot" } }
|
||||
} define-intrinsic
|
||||
|
||||
: char-reg cell 8 = RBX EBX ? ; inline
|
||||
: char-reg-16 BX ; inline
|
||||
|
||||
\ char-slot [
|
||||
EBX PUSH
|
||||
char-reg PUSH
|
||||
"n" operand 2 SHR
|
||||
EBX dup XOR
|
||||
char-reg dup XOR
|
||||
"obj" operand "n" operand ADD
|
||||
BX "obj" operand string-offset [+] MOV
|
||||
EBX tag-bits SHL
|
||||
"obj" operand EBX MOV
|
||||
EBX POP
|
||||
char-reg-16 "obj" operand string-offset [+] MOV
|
||||
char-reg tag-bits SHL
|
||||
"obj" operand char-reg MOV
|
||||
char-reg POP
|
||||
] H{
|
||||
{ +input { { f "n" } { f "obj" } } }
|
||||
{ +output { "obj" } }
|
||||
|
@ -104,13 +107,13 @@ IN: compiler
|
|||
} define-intrinsic
|
||||
|
||||
\ set-char-slot [
|
||||
EBX PUSH
|
||||
char-reg PUSH
|
||||
"val" operand tag-bits SHR
|
||||
"slot" operand 2 SHR
|
||||
"obj" operand "slot" operand ADD
|
||||
EBX "val" operand MOV
|
||||
"obj" operand string-offset [+] BX MOV
|
||||
EBX POP
|
||||
char-reg "val" operand MOV
|
||||
"obj" operand string-offset [+] char-reg-16 MOV
|
||||
char-reg POP
|
||||
] H{
|
||||
{ +input { { f "val" } { f "slot" } { f "obj" } } }
|
||||
{ +clobber { "val" "slot" "obj" } }
|
||||
|
@ -223,13 +226,13 @@ IN: compiler
|
|||
! save EDX since its volatile.
|
||||
remainder-reg PUSH
|
||||
! Align the stack -- only needed on Mac OS X
|
||||
ESP 12 SUB
|
||||
stack-reg 16 cell - SUB
|
||||
"s48_long_to_bignum" f
|
||||
"y" operand 1array compile-c-call*
|
||||
! An untagged pointer to the bignum is now in EAX; tag it
|
||||
T{ int-regs } return-reg bignum-tag OR
|
||||
! Align the stack -- only needed on Mac OS X
|
||||
ESP 12 ADD
|
||||
stack-reg 16 cell - ADD
|
||||
! the remainder is now in EDX
|
||||
remainder-reg POP
|
||||
"end" get save-xt ;
|
||||
|
|
|
@ -63,7 +63,7 @@ opengl sequences ;
|
|||
|
||||
: send-key-event ( view event quot -- )
|
||||
>r event>gesture r> call swap window world-focus
|
||||
handle-gesture ; inline
|
||||
handle-gesture drop ; inline
|
||||
|
||||
: send-user-input ( view event -- )
|
||||
-> characters CF>string swap window world-focus user-input ;
|
||||
|
|
Loading…
Reference in New Issue