Index: extras/Mesa/src/mesa/x86/glapi_x86.S =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/x86/glapi_x86.S,v retrieving revision 1.1.1.5 diff -u -p -r1.1.1.5 glapi_x86.S --- extras/Mesa/src/mesa/x86/glapi_x86.S 31 Jul 2005 16:46:39 -0000 1.1.1.5 +++ extras/Mesa/src/mesa/x86/glapi_x86.S 22 Aug 2005 23:49:09 -0000 @@ -67,6 +67,11 @@ # define THREADS #endif +GL_PREFIX(get_eip, get_eip): + /* store eip in eax */ + MOV_L( REGIND(ESP), EAX ) + RET + #ifdef GLX_USE_TLS # define GL_STUB(fn,off,fn_alt) \ @@ -82,7 +87,10 @@ GL_PREFIX(fn, fn_alt): \ ALIGNTEXT16; \ GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_DispatchTSD)), EAX) ; \ + CALL(GL_PREFIX(get_eip, get_eip)) ; \ + ADD_L(CONST(_GLOBAL_OFFSET_TABLE_), EAX) ; \ + LEA_L(REGOFF(GLNAME(_glapi_DispatchTSD)@GOT, EAX), EAX) ; \ + MOV_L(REGIND(EAX), EAX) ; \ TEST_L(EAX, EAX) ; \ JE(1f) ; \ JMP(GL_OFFSET(off)) ; \ @@ -93,7 +101,9 @@ GL_PREFIX(fn, fn_alt): \ ALIGNTEXT16; \ GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_DispatchTSD)), EAX) ; \ + CALL(GL_PREFIX(get_eip, get_eip)) ; \ + ADD_L(CONST(_GLOBAL_OFFSET_TABLE_), EAX) ; \ + MOV_L(REGOFF(GLNAME(_glapi_DispatchTSD)@GOTOFF, EAX), EAX) ; \ TEST_L(EAX, EAX) ; \ JE(1f) ; \ JMP(GL_OFFSET(off)) ; \ @@ -104,7 +114,10 @@ GL_PREFIX(fn, fn_alt): \ ALIGNTEXT16; \ GLOBL_FN(GL_PREFIX(fn, fn_alt)); \ GL_PREFIX(fn, fn_alt): \ - MOV_L(CONTENT(GLNAME(_glapi_Dispatch)), EAX) ; \ + CALL(GL_PREFIX(get_eip, get_eip)) ; \ + ADD_L(CONST(_GLOBAL_OFFSET_TABLE_), EAX) ; \ + LEA_L(REGOFF(GLNAME(_glapi_Dispatch)@GOT, EAX), EAX) ; \ + MOV_L(REGIND(EAX), EAX) ; \ JMP(GL_OFFSET(off)) #endif Index: extras/Mesa/src/mesa/x86/mmx_blend.S =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/x86/mmx_blend.S,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 mmx_blend.S --- extras/Mesa/src/mesa/x86/mmx_blend.S 16 Jun 2004 09:19:36 -0000 1.1.1.1 +++ extras/Mesa/src/mesa/x86/mmx_blend.S 22 Aug 2005 23:49:09 -0000 @@ -302,8 +302,10 @@ TWO(MOVQ ( MM1, REGIND(rgba) )) #define TAG(x) CONCAT(x,_min) #define LLTAG(x) LLBL2(x,_min) +//MOV_L ( REGOFF(xxxxx@GOT, EDX), EDX ) + #define INIT \ - MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ + MOVQ ( CONTENT ( REGOFF(const_80@GOTOFF, EDX) ), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ #define MAIN( rgba, dest ) \ GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ @@ -327,7 +329,7 @@ TWO(MOVQ ( MM1, REGIND(rgba) )) #define LLTAG(x) LLBL2(x,_max) #define INIT \ - MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ + MOVQ ( CONTENT ( REGOFF(const_80@GOTOFF, EDX) ), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/ #define MAIN( rgba, dest ) \ GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ @@ -352,7 +354,7 @@ TWO(MOVQ ( MM1, REGIND(rgba) )) #define INIT \ PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\ - MOVQ ( CONTENT(const_0080), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ + MOVQ ( CONTENT (REGOFF(const_0080@GOTOFF, EDX) ), MM7 ) /* 0x0080 | 0x0080 | 0x0080 | 0x0080 */ #define MAIN( rgba, dest ) \ GMB_LOAD( rgba, dest, MM1, MM2 ) ;\ Index: extras/Mesa/src/mesa/x86/mmx_blendtmp.h =================================================================== RCS file: /cvs/xorg/xc/extras/Mesa/src/mesa/x86/mmx_blendtmp.h,v retrieving revision 1.1.1.2 diff -u -p -r1.1.1.2 mmx_blendtmp.h --- extras/Mesa/src/mesa/x86/mmx_blendtmp.h 31 Jul 2005 16:46:40 -0000 1.1.1.2 +++ extras/Mesa/src/mesa/x86/mmx_blendtmp.h 22 Aug 2005 23:49:09 -0000 @@ -13,6 +13,12 @@ */ ALIGNTEXT16 GLOBL GLNAME( TAG(_mesa_mmx_blend) ) + +LLBL( TAG(mesa_mmx_blend_get_eip) ): + /* store eip in edx */ + MOV_L ( REGIND(ESP), EDX ) + RET + HIDDEN( TAG(_mesa_mmx_blend) ) GLNAME( TAG(_mesa_mmx_blend) ): @@ -30,6 +36,9 @@ GLNAME( TAG(_mesa_mmx_blend) ): MOV_L ( REGOFF(20, EBP), EDI ) /* rgba */ MOV_L ( REGOFF(24, EBP), ESI ) /* dest */ + CALL ( LLBL( TAG(mesa_mmx_blend_get_eip) ) ) + ADD_L ( CONST(_GLOBAL_OFFSET_TABLE_), EDX ) + INIT TEST_L ( CONST(4), EDI ) /* align rgba on an 8-byte boundary */