summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/rtasm
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2008-04-18 18:30:41 +0100
committerKeith Whitwell <keith@tungstengraphics.com>2008-04-18 18:32:37 +0100
commit363f7abf2000c1cf5993ae8f83ba81b2054bf6e0 (patch)
treec436b939fbf790ebfa465dba34a3dfa267bcd115 /src/gallium/auxiliary/rtasm
parentc5f0158a9179463593d63b33cf3b5490167faac9 (diff)
rtasm: add x86_imul
Diffstat (limited to 'src/gallium/auxiliary/rtasm')
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.c11
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index 5c25fa155d..7f8cc23d15 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -422,11 +422,20 @@ void x86_add( struct x86_function *p,
void x86_mul( struct x86_function *p,
struct x86_reg src )
{
-// assert (src.file == file_REG32 && src.mod == mod_REG);
emit_1ub(p, 0xf7);
emit_modrm_noreg(p, 4, src );
}
+
+void x86_imul( struct x86_function *p,
+ struct x86_reg dst,
+ struct x86_reg src )
+{
+ emit_2ub(p, X86_TWOB, 0xAF);
+ emit_modrm(p, dst, src);
+}
+
+
void x86_sub( 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 dfde661f46..5e99ceea70 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
@@ -213,6 +213,7 @@ void x86_inc( struct x86_function *p, struct x86_reg reg );
void x86_lea( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_mov( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_mul( struct x86_function *p, struct x86_reg src );
+void x86_imul( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_or( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_pop( struct x86_function *p, struct x86_reg reg );
void x86_push( struct x86_function *p, struct x86_reg reg );