From 2c3fde412ab29a21be2b71c47a33a466aaa05b57 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 1 Apr 2010 22:01:10 -0700 Subject: [PATCH] cpu.x86.32: add load-return-regs methods for stack-params so callbacks can box the struct return pointer --- basis/cpu/x86/32/32.factor | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/basis/cpu/x86/32/32.factor b/basis/cpu/x86/32/32.factor index 71439373c0..02f9380e01 100755 --- a/basis/cpu/x86/32/32.factor +++ b/basis/cpu/x86/32/32.factor @@ -99,6 +99,9 @@ M: int-regs param-regs GENERIC: load-return-reg ( src rep -- ) GENERIC: store-return-reg ( dst rep -- ) +M: stack-params load-return-reg drop EAX swap MOV ; +M: stack-params store-return-reg drop EAX MOV ; + M: int-rep load-return-reg drop EAX swap MOV ; M: int-rep store-return-reg drop EAX MOV ; @@ -363,6 +366,6 @@ M: long-long-type flatten-value-type (flatten-stack-type) ; M: c-type flatten-value-type dup rep>> int-rep? [ (flatten-int-type) ] [ (flatten-stack-type) ] if ; -M: x86.64 struct-return-pointer-type (stack-value) ; +M: x86.32 struct-return-pointer-type (stack-value) ; check-sse