diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index b640008f3a..50835affb0 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -56,20 +56,6 @@ M: x86.32 %mark-deck rc-absolute-cell rel-decks-offset building get push ; -M:: x86.32 %dispatch ( src temp -- ) - ! Load jump table base. - temp src HEX: ffffffff [+] LEA - building get length :> start - 0 rc-absolute-cell rel-here - ! Go - temp HEX: 7f [+] JMP - building get length :> end - ! Fix up the displacement above - cell alignment - [ end start - + building get dup pop* push ] - [ (align-code) ] - bi ; - M: x86.32 pic-tail-reg EDX ; M: x86.32 reserved-stack-space 0 ; diff --git a/basis/cpu/x86/64/64.factor b/basis/cpu/x86/64/64.factor index fb53b6fcbb..65acdfbeb9 100644 --- a/basis/cpu/x86/64/64.factor +++ b/basis/cpu/x86/64/64.factor @@ -81,21 +81,6 @@ M: x86.64 %mark-deck dup load-decks-offset [+] card-mark MOV ; -M:: x86.64 %dispatch ( src temp -- ) - ! Load jump table base. - temp HEX: ffffffff MOV - building get length :> start - 0 rc-absolute-cell rel-here - ! Add jump table base - temp src ADD - temp HEX: 7f [+] JMP - building get length :> end - ! Fix up the displacement above - cell alignment - [ end start - + building get dup pop* push ] - [ (align-code) ] - bi ; - M:: x86.64 %load-reg-param ( dst reg rep -- ) dst reg rep %copy ; diff --git a/basis/cpu/x86/x86.factor b/basis/cpu/x86/x86.factor index b8911f9127..05251818b5 100644 --- a/basis/cpu/x86/x86.factor +++ b/basis/cpu/x86/x86.factor @@ -570,6 +570,20 @@ M:: x86 %compare-imm-branch ( label src1 src2 cc -- ) src1 src2 (%compare-imm) label cc %branch ; +M:: x86 %dispatch ( src temp -- ) + ! Load jump table base. + temp HEX: ffffffff MOV + building get length :> start + 0 rc-absolute-cell rel-here + ! Add jump table base + temp src HEX: 7f [++] JMP + building get length :> end + ! Fix up the displacement above + cell alignment + [ end start - + building get dup pop* push ] + [ (align-code) ] + bi ; + M:: x86 %spill ( src rep dst -- ) dst src rep %copy ;