diff --git a/core/cpu/architecture/architecture.factor b/core/cpu/architecture/architecture.factor index 65d1763ea8..8c9db6c7e8 100755 --- a/core/cpu/architecture/architecture.factor +++ b/core/cpu/architecture/architecture.factor @@ -56,7 +56,7 @@ HOOK: %call cpu ( word -- ) HOOK: %jump-label cpu ( label -- ) ! Test if vreg is 'f' or not -HOOK: %jump-t cpu ( label -- ) +HOOK: %jump-f cpu ( label -- ) HOOK: %dispatch cpu ( -- ) diff --git a/core/cpu/ppc/architecture/architecture.factor b/core/cpu/ppc/architecture/architecture.factor index 09ffead029..5bc6d0144d 100755 --- a/core/cpu/ppc/architecture/architecture.factor +++ b/core/cpu/ppc/architecture/architecture.factor @@ -106,8 +106,8 @@ M: ppc %call ( label -- ) BL ; M: ppc %jump-label ( label -- ) B ; -M: ppc %jump-t ( label -- ) - 0 "flag" operand f v>operand CMPI BNE ; +M: ppc %jump-f ( label -- ) + 0 "flag" operand f v>operand CMPI BE ; M: ppc %dispatch ( -- ) [ diff --git a/core/cpu/ppc/intrinsics/intrinsics.factor b/core/cpu/ppc/intrinsics/intrinsics.factor index d092473960..34e9900893 100755 --- a/core/cpu/ppc/intrinsics/intrinsics.factor +++ b/core/cpu/ppc/intrinsics/intrinsics.factor @@ -217,11 +217,11 @@ IN: cpu.ppc.intrinsics 2array define-if-intrinsics ; { - { fixnum< BLT } - { fixnum<= BLE } - { fixnum> BGT } - { fixnum>= BGE } - { eq? BEQ } + { fixnum< BGE } + { fixnum<= BGT } + { fixnum> BLE } + { fixnum>= BLT } + { eq? BNE } } [ first2 define-fixnum-jump ] each @@ -356,11 +356,11 @@ IN: cpu.ppc.intrinsics { { float "x" } { float "y" } } define-if-intrinsic ; { - { float< BLT } - { float<= BLE } - { float> BGT } - { float>= BGE } - { float= BEQ } + { float< BGE } + { float<= BGT } + { float> BLE } + { float>= BLT } + { float= BNE } } [ first2 define-float-jump ] each diff --git a/core/cpu/x86/32/32.factor b/core/cpu/x86/32/32.factor index cc3fceff23..f460dcfcf6 100755 --- a/core/cpu/x86/32/32.factor +++ b/core/cpu/x86/32/32.factor @@ -267,7 +267,7 @@ os windows? [ EDX 26 SHR EDX 1 AND { EAX EBX ECX EDX } [ POP ] each - JNE + JE ] { } define-if-intrinsic "-no-sse2" cli-args member? [ diff --git a/core/cpu/x86/architecture/architecture.factor b/core/cpu/x86/architecture/architecture.factor index 25bb3c6e07..4c2c506e9a 100755 --- a/core/cpu/x86/architecture/architecture.factor +++ b/core/cpu/x86/architecture/architecture.factor @@ -47,13 +47,13 @@ M: x86 stack-frame ( n -- i ) 3 cells + 16 align cell - ; M: x86 %save-word-xt ( -- ) - xt-reg 0 MOV rc-absolute-cell rel-this ; + temp-reg v>operand 0 MOV rc-absolute-cell rel-this ; : factor-area-size 4 cells ; M: x86 %prologue ( n -- ) dup cell + PUSH - xt-reg PUSH + temp-reg v>operand PUSH stack-reg swap 2 cells - SUB ; M: x86 %epilogue ( n -- ) @@ -76,8 +76,8 @@ M: x86 %call ( label -- ) CALL ; M: x86 %jump-label ( label -- ) JMP ; -M: x86 %jump-t ( label -- ) - "flag" operand f v>operand CMP JNE ; +M: x86 %jump-f ( label -- ) + "flag" operand f v>operand CMP JE ; : code-alignment ( -- n ) building get length dup cell align swap - ; diff --git a/core/cpu/x86/intrinsics/intrinsics.factor b/core/cpu/x86/intrinsics/intrinsics.factor index 80a786c9fa..c48f33b765 100755 --- a/core/cpu/x86/intrinsics/intrinsics.factor +++ b/core/cpu/x86/intrinsics/intrinsics.factor @@ -212,11 +212,11 @@ IN: cpu.x86.intrinsics 2array define-if-intrinsics ; { - { fixnum< JL } - { fixnum<= JLE } - { fixnum> JG } - { fixnum>= JGE } - { eq? JE } + { fixnum< JGE } + { fixnum<= JG } + { fixnum> JLE } + { fixnum>= JL } + { eq? JNE } } [ first2 define-fixnum-jump ] each diff --git a/core/cpu/x86/sse2/sse2.factor b/core/cpu/x86/sse2/sse2.factor index 9c477b4132..fb96649753 100755 --- a/core/cpu/x86/sse2/sse2.factor +++ b/core/cpu/x86/sse2/sse2.factor @@ -27,11 +27,11 @@ IN: cpu.x86.sse2 { { float "x" } { float "y" } } define-if-intrinsic ; { - { float< JB } - { float<= JBE } - { float> JA } - { float>= JAE } - { float= JE } + { float< JAE } + { float<= JA } + { float> JBE } + { float>= JB } + { float= JNE } } [ first2 define-float-jump ] each diff --git a/core/generator/generator.factor b/core/generator/generator.factor index 919e89d3c8..4eb2c0fe4e 100755 --- a/core/generator/generator.factor +++ b/core/generator/generator.factor @@ -131,14 +131,14 @@ M: #loop generate-node : generate-if ( node label -- next )