Fixed bug 1278. SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Tue, 06 Sep 2011 22:45:58 -0400
branchSDL-1.2
changeset 5872819e85555d4d
parent 5867 94e0116059f4
child 5877 090d764c56e4
Fixed bug 1278.

From http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50111:
Andrew Pinski 2011-08-18 02:25:15 UTC
I really doubt this is a bug in GCC but rather SDL's inline-asm.

"=X" (mmx_trace)

'X'
Any operand whatsoever is allowed.

They most likely want:
y
Any MMX register.
src/video/mmx.h
     1.1 --- a/src/video/mmx.h	Sat Sep 03 09:52:45 2011 +0200
     1.2 +++ b/src/video/mmx.h	Tue Sep 06 22:45:58 2011 -0400
     1.3 @@ -244,15 +244,15 @@
     1.4  		printf(#op "_i2r(" #imm "=0x%08x%08x, ", \
     1.5  			mmx_trace.d[1], mmx_trace.d[0]); \
     1.6  		__asm__ __volatile__ ("movq %%" #reg ", %0" \
     1.7 -				      : "=X" (mmx_trace) \
     1.8 +				      : "=y" (mmx_trace) \
     1.9  				      : /* nothing */ ); \
    1.10  		printf(#reg "=0x%08x%08x) => ", \
    1.11  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.12  		__asm__ __volatile__ (#op " %0, %%" #reg \
    1.13  				      : /* nothing */ \
    1.14 -				      : "X" (imm)); \
    1.15 +				      : "y" (imm)); \
    1.16  		__asm__ __volatile__ ("movq %%" #reg ", %0" \
    1.17 -				      : "=X" (mmx_trace) \
    1.18 +				      : "=y" (mmx_trace) \
    1.19  				      : /* nothing */ ); \
    1.20  		printf(#reg "=0x%08x%08x\n", \
    1.21  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.22 @@ -265,15 +265,15 @@
    1.23  		printf(#op "_m2r(" #mem "=0x%08x%08x, ", \
    1.24  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.25  		__asm__ __volatile__ ("movq %%" #reg ", %0" \
    1.26 -				      : "=X" (mmx_trace) \
    1.27 +				      : "=y" (mmx_trace) \
    1.28  				      : /* nothing */ ); \
    1.29  		printf(#reg "=0x%08x%08x) => ", \
    1.30  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.31  		__asm__ __volatile__ (#op " %0, %%" #reg \
    1.32  				      : /* nothing */ \
    1.33 -				      : "X" (mem)); \
    1.34 +				      : "y" (mem)); \
    1.35  		__asm__ __volatile__ ("movq %%" #reg ", %0" \
    1.36 -				      : "=X" (mmx_trace) \
    1.37 +				      : "=y" (mmx_trace) \
    1.38  				      : /* nothing */ ); \
    1.39  		printf(#reg "=0x%08x%08x\n", \
    1.40  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.41 @@ -283,7 +283,7 @@
    1.42  	{ \
    1.43  		mmx_t mmx_trace; \
    1.44  		__asm__ __volatile__ ("movq %%" #reg ", %0" \
    1.45 -				      : "=X" (mmx_trace) \
    1.46 +				      : "=y" (mmx_trace) \
    1.47  				      : /* nothing */ ); \
    1.48  		printf(#op "_r2m(" #reg "=0x%08x%08x, ", \
    1.49  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.50 @@ -291,7 +291,7 @@
    1.51  		printf(#mem "=0x%08x%08x) => ", \
    1.52  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.53  		__asm__ __volatile__ (#op " %%" #reg ", %0" \
    1.54 -				      : "=X" (mem) \
    1.55 +				      : "=y" (mem) \
    1.56  				      : /* nothing */ ); \
    1.57  		mmx_trace = (mem); \
    1.58  		printf(#mem "=0x%08x%08x\n", \
    1.59 @@ -302,18 +302,18 @@
    1.60  	{ \
    1.61  		mmx_t mmx_trace; \
    1.62  		__asm__ __volatile__ ("movq %%" #regs ", %0" \
    1.63 -				      : "=X" (mmx_trace) \
    1.64 +				      : "=y" (mmx_trace) \
    1.65  				      : /* nothing */ ); \
    1.66  		printf(#op "_r2r(" #regs "=0x%08x%08x, ", \
    1.67  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.68  		__asm__ __volatile__ ("movq %%" #regd ", %0" \
    1.69 -				      : "=X" (mmx_trace) \
    1.70 +				      : "=y" (mmx_trace) \
    1.71  				      : /* nothing */ ); \
    1.72  		printf(#regd "=0x%08x%08x) => ", \
    1.73  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.74  		__asm__ __volatile__ (#op " %" #regs ", %" #regd); \
    1.75  		__asm__ __volatile__ ("movq %%" #regd ", %0" \
    1.76 -				      : "=X" (mmx_trace) \
    1.77 +				      : "=y" (mmx_trace) \
    1.78  				      : /* nothing */ ); \
    1.79  		printf(#regd "=0x%08x%08x\n", \
    1.80  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.81 @@ -331,8 +331,8 @@
    1.82  		__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
    1.83  				      #op " %1, %%mm0\n\t" \
    1.84  				      "movq %%mm0, %0" \
    1.85 -				      : "=X" (memd) \
    1.86 -				      : "X" (mems)); \
    1.87 +				      : "=y" (memd) \
    1.88 +				      : "y" (mems)); \
    1.89  		mmx_trace = (memd); \
    1.90  		printf(#memd "=0x%08x%08x\n", \
    1.91  			mmx_trace.d[1], mmx_trace.d[0]); \
    1.92 @@ -346,7 +346,7 @@
    1.93  #define	mmx_i2r(op, imm, reg) \
    1.94  	__asm__ __volatile__ (#op " %0, %%" #reg \
    1.95  			      : /* nothing */ \
    1.96 -			      : "X" (imm) )
    1.97 +			      : "y" (imm) )
    1.98  
    1.99  #define	mmx_m2r(op, mem, reg) \
   1.100  	__asm__ __volatile__ (#op " %0, %%" #reg \
   1.101 @@ -365,8 +365,8 @@
   1.102  	__asm__ __volatile__ ("movq %0, %%mm0\n\t" \
   1.103  			      #op " %1, %%mm0\n\t" \
   1.104  			      "movq %%mm0, %0" \
   1.105 -			      : "=X" (memd) \
   1.106 -			      : "X" (mems))
   1.107 +			      : "=y" (memd) \
   1.108 +			      : "y" (mems))
   1.109  
   1.110  #endif
   1.111  
   1.112 @@ -381,8 +381,8 @@
   1.113  #define	movq(vars, vard) \
   1.114  	__asm__ __volatile__ ("movq %1, %%mm0\n\t" \
   1.115  			      "movq %%mm0, %0" \
   1.116 -			      : "=X" (vard) \
   1.117 -			      : "X" (vars))
   1.118 +			      : "=y" (vard) \
   1.119 +			      : "y" (vars))
   1.120  
   1.121  
   1.122  /*	1x32 MOVe Doubleword
   1.123 @@ -396,8 +396,8 @@
   1.124  #define	movd(vars, vard) \
   1.125  	__asm__ __volatile__ ("movd %1, %%mm0\n\t" \
   1.126  			      "movd %%mm0, %0" \
   1.127 -			      : "=X" (vard) \
   1.128 -			      : "X" (vars))
   1.129 +			      : "=y" (vard) \
   1.130 +			      : "y" (vars))
   1.131  
   1.132  
   1.133  /*	2x32, 4x16, and 8x8 Parallel ADDs