More x86 fixes

slava 2006-02-24 07:26:08 +00:00
parent 6e76d076ca
commit ae697d92ae
3 changed files with 12 additions and 11 deletions

View File

@ -2,6 +2,9 @@
- x86 SIB addressing modes
- "localhost" 50 <client> won't fail
- compiled gc check slows things down
- delegating generic words with a non-standard picker
- pass an integer stack pos instead of a quotation
- yield in a loop starves i/o
+ portability:
@ -13,7 +16,6 @@
- stream server can hang because of exception handler limitations
- better i/o scheduler
- out of memory error when printing global namespace
- yield in a loop starves i/o
+ objective C/cocoa:
@ -61,7 +63,5 @@
- code walker & exceptions
- slice: if sequence or seq start is changed, abstraction violation
- delegating generic words with a non-standard picker
- pass an integer stack pos instead of a quotation
- make 3.4 bits>double an error
- colorcoded prettyprinting for vocabularies

View File

@ -142,9 +142,10 @@ M: register sib-present? drop f ;
GENERIC: r/m
M: indirect r/m ( indirect -- r/m )
dup sib-present? [ drop ESP ] [ indirect-base ] if ;
dup sib-present?
[ drop ESP reg-code ] [ indirect-base* ] if ;
M: register r/m ( reg -- r/m ) ;
M: register r/m ( reg -- r/m ) reg-code ;
: byte? -128 127 between? ;
@ -160,8 +161,7 @@ M: indirect modifier
M: register modifier drop BIN: 11 ;
: mod-r/m ( reg# indirect -- byte )
dup modifier 6 shift rot 3 shift
rot r/m reg-code bitor bitor ;
dup modifier 6 shift rot 3 shift rot r/m bitor bitor ;
: sib ( indirect -- byte )
dup sib-present? [

View File

@ -25,7 +25,8 @@ math math-internals memory namespaces words ;
! Compute a result, this time it will fit.
r> execute
! Create a bignum.
"s48_long_to_bignum" f 0 output-operand [] compile-c-call*
"s48_long_to_bignum" f 0 output-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
"end" get save-xt ; inline
@ -45,11 +46,11 @@ M: %fixnum* generate-node ( vop -- )
<label> "end" set
"end" get JNO
"s48_fixnum_pair_to_bignum" f
1 input-operand remainder-reg [+] compile-c-call*
1 input-operand remainder-reg 2array compile-c-call*
! now we have to shift it by three bits to remove the second
! tag
"s48_bignum_arithmetic_shift" f
1 input-operand tag-bits neg [+] compile-c-call*
1 input-operand tag-bits neg 2array compile-c-call*
! an untagged pointer to the bignum is now in EAX; tag it
T{ int-regs } return-reg bignum-tag OR
"end" get save-xt ;
@ -79,7 +80,7 @@ M: %fixnum-mod generate-node ( vop -- )
! save EDX since its volatile.
remainder-reg PUSH
"s48_long_to_bignum" f
0 input-operand [] compile-c-call*
0 input-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
! the remainder is now in EDX