diff --git a/library/compiler/intrinsics.factor b/library/compiler/intrinsics.factor index d6dc3aa92d..9e61e42fe5 100644 --- a/library/compiler/intrinsics.factor +++ b/library/compiler/intrinsics.factor @@ -215,7 +215,7 @@ sequences words ; \ fixnum-bitnot [ drop in-1 - 0 %fixnum-bitnot , + 0 0 %fixnum-bitnot , out-1 ] "intrinsic" set-word-prop @@ -225,7 +225,7 @@ sequences words ; 1 %dec-d , in-1 dup cell -8 * <= [ - drop 0 2 2 %fixnum-sgn , + drop 0 2 %fixnum-sgn , 2 0 %replace-d , ] [ neg 0 0 %fixnum>> , diff --git a/library/compiler/ppc/assembler.factor b/library/compiler/ppc/assembler.factor index c24b416099..9a3a9311f7 100644 --- a/library/compiler/ppc/assembler.factor +++ b/library/compiler/ppc/assembler.factor @@ -99,8 +99,8 @@ USING: compiler errors kernel math memory words ; : NOR 0 (NOR) ; : NOR. 1 (NOR) ; -: NOT over NOR ; -: NOT. over NOR. ; +: NOT dup NOR ; +: NOT. dup NOR. ; : ORI d-form 24 insn ; : ORIS d-form 25 insn ; @@ -181,6 +181,9 @@ USING: compiler errors kernel math memory words ; : RLWINM 0 (RLWINM) ; : RLWINM. 1 (RLWINM) ; +: SLWI 0 31 pick - RLWINM ; +: SLWI. 0 31 pick - RLWINM. ; + : LBZ d-form 34 insn ; : LBZU d-form 35 insn ; : LHA d-form 42 insn ; : LHAU d-form 43 insn ; : LHZ d-form 40 insn ; : LHZU d-form 41 insn ; diff --git a/library/compiler/ppc/fixnum.factor b/library/compiler/ppc/fixnum.factor index b9c54c738b..42ea912f24 100644 --- a/library/compiler/ppc/fixnum.factor +++ b/library/compiler/ppc/fixnum.factor @@ -16,11 +16,30 @@ namespaces words ; >r >r >3-vop< v>operand swap r> drop r> execute ] ifte ; inline +: simple-overflow ( vop inv word -- ) + >r >r +