diff --git a/basis/cpu/x86/64/64.factor b/basis/cpu/x86/64/64.factor index 72a98fe181..9e2ee5e11d 100644 --- a/basis/cpu/x86/64/64.factor +++ b/basis/cpu/x86/64/64.factor @@ -112,7 +112,7 @@ M: x86.64 %end-callback ( -- ) param-reg-0 vm-reg MOV "end_callback" f f %c-invoke ; -M: x86.64 %prepare-var-args ( -- ) RAX RAX XOR ; +M: x86.64 %prepare-var-args ( -- ) EAX EAX XOR ; M: x86.64 stack-cleanup 3drop 0 ; diff --git a/basis/cpu/x86/64/unix/unix.factor b/basis/cpu/x86/64/unix/unix.factor index dfd61abfce..84a34988e0 100644 --- a/basis/cpu/x86/64/unix/unix.factor +++ b/basis/cpu/x86/64/unix/unix.factor @@ -44,5 +44,3 @@ M: x86.64 dummy-stack-params? f ; M: x86.64 dummy-int-params? f ; M: x86.64 dummy-fp-params? f ; - -M: x86.64 %prepare-var-args RAX RAX XOR ; diff --git a/basis/cpu/x86/x86-tests.factor b/basis/cpu/x86/x86-tests.factor index 5e61d3c34c..56fc27372b 100644 --- a/basis/cpu/x86/x86-tests.factor +++ b/basis/cpu/x86/x86-tests.factor @@ -2,7 +2,8 @@ USING: compiler.cfg.debugger compiler.cfg.instructions compiler.cfg.registers compiler.codegen.gc-maps compiler.codegen.relocation cpu.architecture cpu.x86 cpu.x86.assembler cpu.x86.assembler.operands cpu.x86.features kernel kernel.private -layouts make math math.libm namespaces sequences system tools.test ; +layouts literals make math math.libm namespaces sequences system +tools.test ; IN: cpu.x86.tests { } [ @@ -79,6 +80,13 @@ cpu x86.64? [ [ RCX 0 %load-immediate ] B{ } make ] unit-test +! %prepare-varargs +${ + cpu x86.64? B{ 49 192 } B{ } ? +} [ + [ %prepare-var-args ] B{ } make +] unit-test + ! %prologue { t } [ [ 2 cells %prologue ] B{ } make