diff options
author | Roland Scheidegger <[email protected]> | 2006-06-01 22:56:40 +0000 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2006-06-01 22:56:40 +0000 |
commit | fe57ed4f2566e30384d0c786998842405d8e8990 (patch) | |
tree | dda940ef6088ccb5ffa89d760f15aebceaaacfa6 /src/mesa/x86 | |
parent | 4d3ab19abfc262070ff82443bf28fb8b8a616e18 (diff) |
Fix extended swizzling in vertex programs by introducing special swizzle instruction, extend the 2 bit rsw field to 3 bit like used in other places. While here, also fix up rsw (negation), dph and try to fix up rsq with negative values (doesn't work, bug seems elsewhere) in the sse codegen code.
Diffstat (limited to 'src/mesa/x86')
-rw-r--r-- | src/mesa/x86/rtasm/x86sse.c | 16 | ||||
-rw-r--r-- | src/mesa/x86/rtasm/x86sse.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/x86/rtasm/x86sse.c b/src/mesa/x86/rtasm/x86sse.c index 9f34004ba0c..6137aef8ece 100644 --- a/src/mesa/x86/rtasm/x86sse.c +++ b/src/mesa/x86/rtasm/x86sse.c @@ -424,6 +424,14 @@ void sse_maxps( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse_maxss( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_3ub(p, 0xF3, X86_TWOB, 0x5F); + emit_modrm( p, dst, src ); +} + void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) @@ -456,6 +464,14 @@ void sse_mulps( struct x86_function *p, emit_modrm( p, dst, src ); } +void sse_mulss( struct x86_function *p, + struct x86_reg dst, + struct x86_reg src ) +{ + emit_3ub(p, 0xF3, X86_TWOB, 0x59); + emit_modrm( p, dst, src ); +} + void sse_addps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h index 430cf2f939d..5ec54894311 100644 --- a/src/mesa/x86/rtasm/x86sse.h +++ b/src/mesa/x86/rtasm/x86sse.h @@ -156,6 +156,7 @@ void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ) void sse_andps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_cmpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src, GLubyte cc ); void sse_maxps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); +void sse_maxss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_minps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_movaps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_movhlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); @@ -165,6 +166,7 @@ void sse_movlps( struct x86_function *p, struct x86_reg dst, struct x86_reg src void sse_movss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_movups( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_mulps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); +void sse_mulss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_subps( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_rsqrtss( struct x86_function *p, struct x86_reg dst, struct x86_reg src ); void sse_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf ); |