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