diff options
author | Luca Barbieri <[email protected]> | 2010-08-18 04:14:43 +0200 |
---|---|---|
committer | Luca Barbieri <[email protected]> | 2010-08-18 04:21:46 +0200 |
commit | 547e88e70de16a3d0451c2aa33f87014adc8bb7c (patch) | |
tree | aa4393d4e313bc9c7901b6ef971df496c5067c15 /src | |
parent | ede67e307142000a408e40b637132700a4dc2808 (diff) |
translate_sse: don't overwrite source buffer pointer
We were putting the source pointer in a register used as a temporary,
breaking all paths that don't read the data in a single instruction.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/translate/translate_sse.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/translate/translate_sse.c b/src/gallium/auxiliary/translate/translate_sse.c index 56c5b36ce28..48e59590bc2 100644 --- a/src/gallium/auxiliary/translate/translate_sse.c +++ b/src/gallium/auxiliary/translate/translate_sse.c @@ -96,7 +96,7 @@ struct translate_sse { */ struct x86_reg tmp_EAX; struct x86_reg tmp2_EDX; - struct x86_reg tmp3_ECX; + struct x86_reg src_ECX; struct x86_reg idx_ESI; /* either start+i or &elt[i] */ struct x86_reg machine_EDI; struct x86_reg outbuf_EBX; @@ -1052,7 +1052,7 @@ static boolean init_inputs( struct translate_sse *p, if (varient->instance_divisor != 1) { struct x86_reg tmp_EDX = p->tmp2_EDX; - struct x86_reg tmp_ECX = p->tmp3_ECX; + struct x86_reg tmp_ECX = p->src_ECX; /* TODO: Add x86_shr() to rtasm and use it whenever * instance divisor is power of two. @@ -1108,7 +1108,7 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p, return p->idx_ESI; } else if (!index_size || p->buffer_varient[var_idx].instance_divisor) { - struct x86_reg ptr = p->tmp_EAX; + struct x86_reg ptr = p->src_ECX; struct x86_reg buf_ptr = x86_make_disp(p->machine_EDI, get_offset(p, &p->buffer_varient[var_idx].ptr)); @@ -1118,7 +1118,7 @@ static struct x86_reg get_buffer_ptr( struct translate_sse *p, return ptr; } else { - struct x86_reg ptr = p->tmp_EAX; + struct x86_reg ptr = p->src_ECX; const struct translate_buffer_varient *varient = &p->buffer_varient[var_idx]; struct x86_reg buf_stride = @@ -1226,7 +1226,7 @@ static boolean build_vertex_emit( struct translate_sse *p, p->machine_EDI = x86_make_reg(file_REG32, reg_DI); p->count_EBP = x86_make_reg(file_REG32, reg_BP); p->tmp2_EDX = x86_make_reg(file_REG32, reg_DX); - p->tmp3_ECX = x86_make_reg(file_REG32, reg_CX); + p->src_ECX = x86_make_reg(file_REG32, reg_CX); p->func = func; memset(&p->loaded_const, 0, sizeof(p->loaded_const)); |