aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/rtasm
diff options
context:
space:
mode:
authorMichal Krol <michal@ubuntu-vbox.(none)>2008-04-28 18:50:27 +0200
committerMichal Krol <michal@ubuntu-vbox.(none)>2008-04-28 18:50:58 +0200
commit58d3dff0d3115ddd5397b7f77b5bcf4f9ca616b6 (patch)
tree03211346223ed2171d6269d0d6fccbb39bfa2230 /src/gallium/auxiliary/rtasm
parent7f5e9d3f07f6fbfa699bef4ffff85fe0b557584a (diff)
gallium: Generate SSE code to swizzle and unswizzle vs inputs and outputs.
Change SSE_SWIZZLES #define to 0 to disable it.
Diffstat (limited to 'src/gallium/auxiliary/rtasm')
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.c14
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.h2
2 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index e6cbe9967fa..d7e22305573 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -853,6 +853,20 @@ void sse_shufps( struct x86_function *p,
emit_1ub(p, shuf);
}
+void sse_unpckhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
+{
+ DUMP_RR( dst, src );
+ emit_2ub( p, X86_TWOB, 0x15 );
+ emit_modrm( p, dst, src );
+}
+
+void sse_unpcklps( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
+{
+ DUMP_RR( dst, src );
+ emit_2ub( p, X86_TWOB, 0x14 );
+ emit_modrm( p, dst, src );
+}
+
void sse_cmpps( struct x86_function *p,
struct x86_reg dst,
struct x86_reg src,
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
index 1962b07bc5b..ad79b1facf8 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
@@ -203,6 +203,8 @@ void sse_rsqrtps( 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,
unsigned char shuf );
+void sse_unpckhps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
+void sse_unpcklps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src );
void sse2_punpcklbw( struct x86_function *p, struct x86_reg dst, struct x86_reg src );