From: Slava Pestov Date: Mon, 28 Sep 2009 00:29:50 +0000 (-0500) Subject: Merge branch 'master' into more_aggressive_coalescing X-Git-Tag: 0.97~5471 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=f757b454ccae405255e94a97518365bdc98f63ec Merge branch 'master' into more_aggressive_coalescing --- f757b454ccae405255e94a97518365bdc98f63ec diff --cc basis/cpu/x86/x86.factor index 3a41b331d9,51b5cef23a..e78519b9e0 --- a/basis/cpu/x86/x86.factor +++ b/basis/cpu/x86/x86.factor @@@ -142,16 -135,23 +142,19 @@@ M: double-2-rep copy-register* drop MOV M: vector-rep copy-register* drop MOVDQU ; M: x86 %copy ( dst src rep -- ) - 2over eq? [ 3drop ] [ copy-register* ] if ; + 2over eq? [ 3drop ] [ + [ [ dup spill-slot? [ n>> spill@ ] when ] bi@ ] dip + copy-register* + ] if ; -:: overflow-template ( label dst src1 src2 insn -- ) - src1 src2 insn call - label JO ; inline - M: x86 %fixnum-add ( label dst src1 src2 -- ) - [ ADD ] overflow-template ; + int-rep two-operand ADD JO ; M: x86 %fixnum-sub ( label dst src1 src2 -- ) - [ SUB ] overflow-template ; + int-rep two-operand SUB JO ; M: x86 %fixnum-mul ( label dst src1 src2 -- ) - [ swap IMUL2 ] overflow-template ; + int-rep two-operand swap IMUL2 JO ; : bignum@ ( reg n -- op ) cells bignum tag-number - [+] ; inline