summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2008-05-01 20:44:41 +0100
committerKeith Whitwell <[email protected]>2008-05-01 20:49:45 +0100
commit2c89b75e36fd35d5a003107d1d2f97b537321f95 (patch)
tree7fb2901b5c380cec61926f90ef7768748dd4c6a0
parent2004b8a769110456e66d040398eacf25c8592710 (diff)
rtasm: learn another version of push
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index e69251f0720..4e036d9032c 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -449,8 +449,15 @@ void x86_push( struct x86_function *p,
struct x86_reg reg )
{
DUMP_R( reg );
- assert(reg.mod == mod_REG);
- emit_1ub(p, 0x50 + reg.idx);
+ if (reg.mod == mod_REG)
+ emit_1ub(p, 0x50 + reg.idx);
+ else
+ {
+ emit_1ub(p, 0xff);
+ emit_modrm_noreg(p, 6, reg);
+ }
+
+
p->stack_offset += 4;
}