Merge remote branch 'origin/master' into nv50-compiler
[mesa.git] / src / gallium / auxiliary / translate / translate_sse.c
index 5d555bbd98c8c1a9eb1aa06b72acc1eb717b7f09..f8bf5b46692762931c4e0391da738830d342acf0 100644 (file)
@@ -1224,6 +1224,7 @@ static boolean incr_inputs( struct translate_sse *p,
       }
    } 
    else {
+      x64_rexw(p->func);
       x86_lea(p->func, p->idx_ESI, x86_make_disp(p->idx_ESI, index_size));
    }
    
@@ -1254,6 +1255,9 @@ static boolean build_vertex_emit( struct translate_sse *p,
    int fixup, label;
    unsigned j;
 
+   memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const));
+   memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg));
+
    p->tmp_EAX       = x86_make_reg(file_REG32, reg_AX);
    p->idx_ESI       = x86_make_reg(file_REG32, reg_SI);
    p->outbuf_EBX    = x86_make_reg(file_REG32, reg_BX);
@@ -1439,10 +1443,7 @@ struct translate *translate_sse2_create( const struct translate_key *key )
    if (p == NULL) 
       goto fail;
    memset(p, 0, sizeof(*p));
-
    memcpy(p->consts, consts, sizeof(consts));
-   memset(p->reg_to_const, 0xff, sizeof(p->reg_to_const));
-   memset(p->const_to_reg, 0xff, sizeof(p->const_to_reg));
 
    p->translate.key = *key;
    p->translate.release = translate_sse_release;