summaryrefslogtreecommitdiff
path: root/src/mesa/x86/rtasm/x86sse.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/x86/rtasm/x86sse.h')
-rw-r--r--src/mesa/x86/rtasm/x86sse.h49
1 files changed, 24 insertions, 25 deletions
diff --git a/src/mesa/x86/rtasm/x86sse.h b/src/mesa/x86/rtasm/x86sse.h
index 63b9a36392..c1ca06088b 100644
--- a/src/mesa/x86/rtasm/x86sse.h
+++ b/src/mesa/x86/rtasm/x86sse.h
@@ -4,22 +4,24 @@
#if defined(__i386__) || defined(__386__)
+#include "glheader.h"
+
/* It is up to the caller to ensure that instructions issued are
* suitable for the host cpu. There are no checks made in this module
* for mmx/sse/sse2 support on the cpu.
*/
struct x86_reg {
- unsigned file:3;
- unsigned idx:3;
- unsigned mod:2; /* mod_REG if this is just a register */
- int disp:24; /* only +/- 23bits of offset - should be enough... */
+ GLuint file:3;
+ GLuint idx:3;
+ GLuint mod:2; /* mod_REG if this is just a register */
+ GLint disp:24; /* only +/- 23bits of offset - should be enough... */
};
struct x86_function {
- unsigned char *store;
- unsigned char *csr;
- unsigned stack_offset;
- int need_emms;
+ GLubyte *store;
+ GLubyte *csr;
+ GLuint stack_offset;
+ GLint need_emms;
const char *fn;
};
@@ -79,7 +81,7 @@ enum sse_cc {
void x86_init_func( struct x86_function *p );
-void x86_init_func_size( struct x86_function *p, unsigned code_size );
+void x86_init_func_size( struct x86_function *p, GLuint code_size );
void x86_release_func( struct x86_function *p );
void (*x86_get_func( struct x86_function *p ))( void );
@@ -91,7 +93,7 @@ struct x86_reg x86_make_reg( enum x86_reg_file file,
enum x86_reg_name idx );
struct x86_reg x86_make_disp( struct x86_reg reg,
- int disp );
+ GLint disp );
struct x86_reg x86_deref( struct x86_reg reg );
@@ -100,23 +102,23 @@ struct x86_reg x86_get_base_reg( struct x86_reg reg );
/* Labels, jumps and fixup:
*/
-unsigned char *x86_get_label( struct x86_function *p );
+GLubyte *x86_get_label( struct x86_function *p );
void x86_jcc( struct x86_function *p,
enum x86_cc cc,
- unsigned char *label );
+ GLubyte *label );
-unsigned char *x86_jcc_forward( struct x86_function *p,
+GLubyte *x86_jcc_forward( struct x86_function *p,
enum x86_cc cc );
-unsigned char *x86_jmp_forward( struct x86_function *p);
+GLubyte *x86_jmp_forward( struct x86_function *p);
-unsigned char *x86_call_forward( struct x86_function *p);
+GLubyte *x86_call_forward( struct x86_function *p);
void x86_fixup_fwd_jump( struct x86_function *p,
- unsigned char *fixup );
+ GLubyte *fixup );
-void x86_jmp( struct x86_function *p, unsigned char *label );
+void x86_jmp( struct x86_function *p, GLubyte *label );
void x86_call( struct x86_function *p, void (*label)() );
@@ -124,7 +126,7 @@ void x86_call( struct x86_function *p, void (*label)() );
* Temporary. As I need immediate operands, and dont want to mess with the codegen,
* I load the immediate into general purpose register and use it.
*/
-void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, int imm );
+void x86_mov_reg_imm( struct x86_function *p, struct x86_reg dst, GLint imm );
/* Macro for sse_shufps() and sse2_pshufd():
@@ -145,8 +147,7 @@ void sse2_movd( struct x86_function *p, struct x86_reg dst, struct x86_reg src )
void sse2_packssdw( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void sse2_packsswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void sse2_packuswb( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
-void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0,
- unsigned char shuf );
+void sse2_pshufd( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
void sse2_rcpps( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void sse2_rcpss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
@@ -156,8 +157,7 @@ void sse_cvtps2pi( struct x86_function *p, struct x86_reg dst, struct x86_reg sr
void sse_divss( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
void sse_andnps( 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,
- unsigned char cc );
+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 );
@@ -175,8 +175,7 @@ void sse_xorps( 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_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_shufps( struct x86_function *p, struct x86_reg dest, struct x86_reg arg0, GLubyte shuf );
void sse_pmovmskb( struct x86_function *p, struct x86_reg dest, struct x86_reg src );
void x86_add( struct x86_function *p, struct x86_reg dst, struct x86_reg src );
@@ -248,7 +247,7 @@ void x87_fucom( struct x86_function *p, struct x86_reg arg );
* account any push/pop activity. Note - doesn't track explict
* manipulation of ESP by other instructions.
*/
-struct x86_reg x86_fn_arg( struct x86_function *p, unsigned arg );
+struct x86_reg x86_fn_arg( struct x86_function *p, GLuint arg );
#endif
#endif