From b88d219ff632485aa4e37de2f8172c6ff0bf8b10 Mon Sep 17 00:00:00 2001 From: Slava Date: Thu, 17 Jan 2008 04:03:09 -0500 Subject: [PATCH 1/3] Fix x86 --- core/cpu/x86/architecture/architecture.factor | 8 ++++---- core/kernel/kernel-tests.factor | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/cpu/x86/architecture/architecture.factor b/core/cpu/x86/architecture/architecture.factor index 96b2dcf1ec..cf2f5ee594 100755 --- a/core/cpu/x86/architecture/architecture.factor +++ b/core/cpu/x86/architecture/architecture.factor @@ -85,7 +85,7 @@ M: x86-backend %jump-label ( label -- ) JMP ; M: x86-backend %jump-t ( label -- ) "flag" operand f v>operand CMP JNE ; -: (%dispatch) ( -- operand ) +: (%dispatch) ( n -- operand ) ! Load jump table base. We use a temporary register ! since on AMD64 we have to load a 64-bit immediate. On ! x86, this is redundant. @@ -94,16 +94,16 @@ M: x86-backend %jump-t ( label -- ) ! Add jump table base "offset" operand HEX: ffffffff MOV rc-absolute-cell rel-here "n" operand "offset" operand ADD - "n" operand bootstrap-cell 8 = 14 9 ? [+] ; + "n" operand swap bootstrap-cell 8 = 14 9 ? + [+] ; M: x86-backend %call-dispatch ( word-table# -- ) - [ (%dispatch) CALL