summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/rtasm
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-27 21:09:45 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-04-27 21:09:45 +0900
commite3c415995706d2dda7c34a227e2e24d0745763ec (patch)
tree92f4fb8768299bd8c50ccbc749af0322bae2de38 /src/gallium/auxiliary/rtasm
parenta8e39b6f5a1fedf2f8719e1adb8802ebbfc09688 (diff)
rtasm: Implement x86_retw.
Diffstat (limited to 'src/gallium/auxiliary/rtasm')
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.c6
-rw-r--r--src/gallium/auxiliary/rtasm/rtasm_x86sse.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
index 3cd45d7dd9..e6cbe9967f 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.c
@@ -498,6 +498,12 @@ void x86_ret( struct x86_function *p )
emit_1ub(p, 0xc3);
}
+void x86_retw( struct x86_function *p, unsigned short imm )
+{
+ DUMP();
+ emit_3ub(p, 0xc2, imm & 0xff, (imm >> 8) & 0xff);
+}
+
void x86_sahf( struct x86_function *p )
{
DUMP();
diff --git a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
index 695a1cef4e..1962b07bc5 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
+++ b/src/gallium/auxiliary/rtasm/rtasm_x86sse.h
@@ -219,6 +219,7 @@ 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 );
void x86_ret( struct x86_function *p );
+void x86_retw( struct x86_function *p, unsigned short imm );
void x86_sub( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_test( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void x86_xor( struct x86_function *p, struct x86_reg dst, struct x86_reg src );