[MPlayer-cvslog] CVS: main mmx.h,1.2,1.3

Reimar Döffinger CVS syncmail at mplayerhq.hu
Thu Jun 23 18:44:54 CEST 2005


CVS change done by Reimar Döffinger CVS

Update of /cvsroot/mplayer/main
In directory mail:/var2/tmp/cvs-serv13793

Modified Files:
	mmx.h 
Log Message:
fix asm constraints, tested on x86 and x86_64.


Index: mmx.h
===================================================================
RCS file: /cvsroot/mplayer/main/mmx.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mmx.h	2 Jun 2005 20:54:01 -0000	1.2
+++ mmx.h	23 Jun 2005 16:44:52 -0000	1.3
@@ -246,15 +246,15 @@
 		printf(#op "_i2r(" #imm "=0x%08x%08x, ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ ("movq %%" #reg ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#reg "=0x%08x%08x) => ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ (#op " %0, %%" #reg \
 				      : /* nothing */ \
-				      : "X" (imm)); \
+				      : "i" (imm)); \
 		__asm__ __volatile__ ("movq %%" #reg ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#reg "=0x%08x%08x\n", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -267,7 +267,7 @@
 		printf(#op "_m2r(" #mem "=0x%08x%08x, ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ ("movq %%" #reg ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#reg "=0x%08x%08x) => ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -275,7 +275,7 @@
 				      : /* nothing */ \
 				      : "X" (mem)); \
 		__asm__ __volatile__ ("movq %%" #reg ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#reg "=0x%08x%08x\n", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -285,7 +285,7 @@
 	{ \
 		mmx_t mmx_trace; \
 		__asm__ __volatile__ ("movq %%" #reg ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#op "_r2m(" #reg "=0x%08x%08x, ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -293,7 +293,7 @@
 		printf(#mem "=0x%08x%08x) => ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ (#op " %%" #reg ", %0" \
-				      : "=X" (mem) \
+				      : "=m" (mem) \
 				      : /* nothing */ ); \
 		mmx_trace = (mem); \
 		printf(#mem "=0x%08x%08x\n", \
@@ -304,18 +304,18 @@
 	{ \
 		mmx_t mmx_trace; \
 		__asm__ __volatile__ ("movq %%" #regs ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#op "_r2r(" #regs "=0x%08x%08x, ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ ("movq %%" #regd ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#regd "=0x%08x%08x) => ", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
 		__asm__ __volatile__ (#op " %" #regs ", %" #regd); \
 		__asm__ __volatile__ ("movq %%" #regd ", %0" \
-				      : "=X" (mmx_trace) \
+				      : "=m" (mmx_trace) \
 				      : /* nothing */ ); \
 		printf(#regd "=0x%08x%08x\n", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -333,8 +333,8 @@
 		__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
 				      #op " %1, %%mm0\n\t" \
 				      "movq %%mm0, %0" \
-				      : "=X" (memd) \
-				      : "X" (mems)); \
+				      : "=m" (memd) \
+				      : "m" (mems)); \
 		mmx_trace = (memd); \
 		printf(#memd "=0x%08x%08x\n", \
 			mmx_trace.d[1], mmx_trace.d[0]); \
@@ -348,7 +348,7 @@
 #define	mmx_i2r(op, imm, reg) \
 	__asm__ __volatile__ (#op " %0, %%" #reg \
 			      : /* nothing */ \
-			      : "X" (imm) )
+			      : "i" (imm) )
 
 #define	mmx_m2r(op, mem, reg) \
 	__asm__ __volatile__ (#op " %0, %%" #reg \
@@ -357,7 +357,7 @@
 
 #define	mmx_r2m(op, reg, mem) \
 	__asm__ __volatile__ (#op " %%" #reg ", %0" \
-			      : "=X" (mem) \
+			      : "=m" (mem) \
 			      : /* nothing */ )
 
 #define	mmx_r2r(op, regs, regd) \
@@ -367,8 +367,8 @@
 	__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
 			      #op " %1, %%mm0\n\t" \
 			      "movq %%mm0, %0" \
-			      : "=X" (memd) \
-			      : "X" (mems))
+			      : "=m" (memd) \
+			      : "m" (mems))
 
 #endif
 
@@ -383,8 +383,8 @@
 #define	movq(vars, vard) \
 	__asm__ __volatile__ ("movq %1, %%mm0\n\t" \
 			      "movq %%mm0, %0" \
-			      : "=X" (vard) \
-			      : "X" (vars))
+			      : "=m" (vard) \
+			      : "m" (vars))
 
 
 /*	1x32 MOVe Doubleword
@@ -398,8 +398,8 @@
 #define	movd(vars, vard) \
 	__asm__ __volatile__ ("movd %1, %%mm0\n\t" \
 			      "movd %%mm0, %0" \
-			      : "=X" (vard) \
-			      : "X" (vars))
+			      : "=m" (vard) \
+			      : "m" (vars))
 
 
 /*	2x32, 4x16, and 8x8 Parallel ADDs




More information about the MPlayer-cvslog mailing list