summaryrefslogtreecommitdiffstats
path: root/src/mesa/x86
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/x86')
-rw-r--r--src/mesa/x86/assyntax.h11
-rw-r--r--src/mesa/x86/mmx_blend.S15
-rw-r--r--src/mesa/x86/mmx_blendtmp.h31
3 files changed, 34 insertions, 23 deletions
diff --git a/src/mesa/x86/assyntax.h b/src/mesa/x86/assyntax.h
index ebe9c57460d..13f980d57da 100644
--- a/src/mesa/x86/assyntax.h
+++ b/src/mesa/x86/assyntax.h
@@ -78,9 +78,11 @@
#endif
#if (defined(__STDC__) && !defined(UNIXCPP)) || (defined (sun) && defined (i386) && defined (SVR4) && defined (__STDC__) && !defined (__GNUC__))
-#define CONCAT(x, y) x ## y
+#define CONCAT(x, y) x ## y
+#define CONCAT3(x, y, z) x ## y ## z
#else
-#define CONCAT(x, y) x/**/y
+#define CONCAT(x, y) x/**/y
+#define CONCAT3(x, y, z) x/**/y/**/z
#endif
#ifdef ACK_ASSEMBLER
@@ -862,7 +864,8 @@
#define P_XMM6 xmm6
#define P_XMM7 xmm7
-#define CONCAT(x, y) x ## y
+#define CONCAT(x, y) x ## y
+#define CONCAT3(x, y, z) x ## y ## z
#if defined(NASM_ASSEMBLER)
@@ -1689,8 +1692,10 @@ SECTION _DATA public align=16 class=DATA use32 flat
/* Added by BrianP for FreeBSD (per David Dawes) */
#if !defined(NASM_ASSEMBLER) && !defined(MASM_ASSEMBLER) && !defined(__bsdi__)
#define LLBL(a) CONCAT(.L,a)
+#define LLBL2(a,b) CONCAT3(.L,a,b)
#else
#define LLBL(a) a
+#define LLBL2(a,b) CONCAT(a,b)
#endif
/* Segment overrides */
diff --git a/src/mesa/x86/mmx_blend.S b/src/mesa/x86/mmx_blend.S
index 9fe3e717961..d049aa12bee 100644
--- a/src/mesa/x86/mmx_blend.S
+++ b/src/mesa/x86/mmx_blend.S
@@ -254,7 +254,8 @@ const_80:
/* Blend transparency function
*/
-#define TAG(x) x##_transparency
+#define TAG(x) CONCAT(x,_transparency)
+#define LLTAG(x) LLBL2(x,_transparency)
#define INIT \
PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */
@@ -275,7 +276,8 @@ const_80:
* FIXME: Add some loop unrolling here...
*/
-#define TAG(x) x##_add
+#define TAG(x) CONCAT(x,_add)
+#define LLTAG(x) LLBL2(x,_add)
#define INIT
@@ -295,7 +297,8 @@ TWO(MOVQ ( MM1, REGIND(rgba) ))
/* Blend min function
*/
-#define TAG(x) x##_min
+#define TAG(x) CONCAT(x,_min)
+#define LLTAG(x) LLBL2(x,_min)
#define INIT \
MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
@@ -318,7 +321,8 @@ TWO(MOVQ ( MM1, REGIND(rgba) ))
/* Blend max function
*/
-#define TAG(x) x##_max
+#define TAG(x) CONCAT(x,_max)
+#define LLTAG(x) LLBL2(x,_max)
#define INIT \
MOVQ ( CONTENT(const_80), MM7 ) /* 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80| 0x80*/
@@ -341,7 +345,8 @@ TWO(MOVQ ( MM1, REGIND(rgba) ))
/* Blend modulate function
*/
-#define TAG(x) x##_modulate
+#define TAG(x) CONCAT(x,_modulate)
+#define LLTAG(x) LLBL2(x,_modulate)
#define INIT \
PXOR ( MM0, MM0 ) /* 0x0000 | 0x0000 | 0x0000 | 0x0000 */ ;\
diff --git a/src/mesa/x86/mmx_blendtmp.h b/src/mesa/x86/mmx_blendtmp.h
index 1a8190355e4..5d22f288a03 100644
--- a/src/mesa/x86/mmx_blendtmp.h
+++ b/src/mesa/x86/mmx_blendtmp.h
@@ -24,7 +24,7 @@ GLNAME( TAG(_mesa_mmx_blend) ):
MOV_L ( REGOFF(12, EBP), ECX ) /* n */
CMP_L ( CONST(0), ECX)
- JE ( LLBL ( TAG(GMB_return) ) )
+ JE ( LLTAG(GMB_return) )
MOV_L ( REGOFF(16, EBP), EBX ) /* mask */
MOV_L ( REGOFF(20, EBP), EDI ) /* rgba */
@@ -33,10 +33,10 @@ GLNAME( TAG(_mesa_mmx_blend) ):
INIT
TEST_L ( CONST(4), EDI ) /* align rgba on an 8-byte boundary */
- JZ ( LLBL ( TAG(GMB_align_end) ) )
+ JZ ( LLTAG(GMB_align_end) )
CMP_B ( CONST(0), REGIND(EBX) ) /* *mask == 0 */
- JE ( LLBL ( TAG(GMB_align_continue) ) )
+ JE ( LLTAG(GMB_align_continue) )
/* runin */
#define ONE(x) x
@@ -45,23 +45,23 @@ GLNAME( TAG(_mesa_mmx_blend) ):
#undef ONE
#undef TWO
-LLBL ( TAG(GMB_align_continue) ):
+LLTAG(GMB_align_continue):
DEC_L ( ECX ) /* n -= 1 */
INC_L ( EBX ) /* mask += 1 */
ADD_L ( CONST(4), EDI ) /* rgba += 1 */
ADD_L ( CONST(4), ESI ) /* dest += 1 */
-LLBL ( TAG(GMB_align_end) ):
+LLTAG(GMB_align_end):
CMP_L ( CONST(2), ECX)
- JB ( LLBL ( TAG(GMB_loop_end) ) )
+ JB ( LLTAG(GMB_loop_end) )
ALIGNTEXT16
-LLBL ( TAG(GMB_loop_begin) ):
+LLTAG(GMB_loop_begin):
CMP_W ( CONST(0), REGIND(EBX) ) /* *mask == 0 && *(mask + 1) == 0 */
- JE ( LLBL ( TAG(GMB_loop_continue) ) )
+ JE ( LLTAG(GMB_loop_continue) )
/* main loop */
#define ONE(x)
@@ -70,7 +70,7 @@ LLBL ( TAG(GMB_loop_begin) ):
#undef ONE
#undef TWO
-LLBL ( TAG(GMB_loop_continue) ):
+LLTAG(GMB_loop_continue):
DEC_L ( ECX )
DEC_L ( ECX ) /* n -= 2 */
@@ -78,15 +78,15 @@ LLBL ( TAG(GMB_loop_continue) ):
ADD_L ( CONST(8), EDI ) /* rgba += 2 */
ADD_L ( CONST(8), ESI ) /* dest += 2 */
CMP_L ( CONST(2), ECX )
- JAE ( LLBL ( TAG(GMB_loop_begin) ) )
+ JAE ( LLTAG(GMB_loop_begin) )
-LLBL ( TAG(GMB_loop_end) ):
+LLTAG(GMB_loop_end):
CMP_L ( CONST(1), ECX )
- JB ( LLBL ( TAG(GMB_done) ) )
+ JB ( LLTAG(GMB_done) )
CMP_B ( CONST(0), REGIND(EBX) ) /* *mask == 0 */
- JE ( LLBL ( TAG(GMB_done) ) )
+ JE ( LLTAG(GMB_done) )
/* runout */
#define ONE(x) x
@@ -95,11 +95,11 @@ LLBL ( TAG(GMB_loop_end) ):
#undef ONE
#undef TWO
-LLBL ( TAG(GMB_done) ):
+LLTAG(GMB_done):
EMMS
-LLBL ( TAG(GMB_return) ):
+LLTAG(GMB_return):
POP_L ( EBX )
POP_L ( EDI )
@@ -109,5 +109,6 @@ LLBL ( TAG(GMB_return) ):
RET
#undef TAG
+#undef LLTAG
#undef INIT
#undef MAIN