diff --git a/TODO.FACTOR.txt b/TODO.FACTOR.txt index 36fad242af..78cdbb7e26 100644 --- a/TODO.FACTOR.txt +++ b/TODO.FACTOR.txt @@ -1,6 +1,5 @@ should fix in 0.82: -- test x86 set-slot - clean up fp-scratch - update amd64 backend - when generating a 32-bit image on a 64-bit system, large numbers which should diff --git a/library/compiler/x86/intrinsics.factor b/library/compiler/x86/intrinsics.factor index c4aea1c22d..d790835902 100644 --- a/library/compiler/x86/intrinsics.factor +++ b/library/compiler/x86/intrinsics.factor @@ -74,19 +74,19 @@ IN: compiler "obj" operand card-offset ADD rel-absolute-cell rel-cards "obj" operand [] card-mark OR ; -! \ set-slot [ -! "obj" operand untag -! ! turn tagged fixnum slot # into an offset -! "slot" operand fixnum>slot@ -! ! compute slot address -! "obj" operand "slot" operand ADD -! ! store new slot value -! "obj" operand [] "val" operand MOV -! generate-write-barrier -! ] H{ -! { +input { { f "val" } { f "obj" } { f "slot" } } } -! { +clobber { "obj" "slot" } } -! } define-intrinsic +\ set-slot [ + "obj" operand untag + ! turn tagged fixnum slot # into an offset + "slot" operand fixnum>slot@ + ! compute slot address + "slot" operand "obj" operand ADD + ! store new slot value + "slot" operand [] "val" operand MOV + generate-write-barrier +] H{ + { +input { { f "val" } { f "obj" } { f "slot" } } } + { +clobber { "obj" "slot" } } +} define-intrinsic \ char-slot [ EBX PUSH