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 e69251f072099d2501c9f4470d1b7290d6e16363..4e036d9032c8514f69620ab53f444bc63ab826fc 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;
 }