rtasm: learn another version of push
authorKeith Whitwell <keith@tungstengraphics.com>
Thu, 1 May 2008 19:44:41 +0000 (20:44 +0100)
committerKeith Whitwell <keith@tungstengraphics.com>
Thu, 1 May 2008 19:49:45 +0000 (20:49 +0100)
src/gallium/auxiliary/rtasm/rtasm_x86sse.c

index e69251f..4e036d9 100644 (file)
@@ -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;
 }