Date: Mon, 10 Nov 2003 19:57:56 +0100
authorSam Lantinga <slouken@libsdl.org>
Fri, 14 Nov 2003 20:21:22 +0000
changeset 738 82b85b731fe3
parent 737 7e4347dd2f9c
child 739 22dbf364c017
Date: Mon, 10 Nov 2003 19:57:56 +0100 From: Stephane Marchesin <stephane.marchesin@wanadoo.fr> Subject: [SDL] SDL and gcc >= 3.3.1 fix Lately, I upgraded my gcc compiler and could trigger the error described in this thread : http://www.libsdl.org/pipermail/sdl/2003-September/056163.html SDL_RLEaccel.c: In function `RLEClipBlit': SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand SDL_RLEaccel.c:845: error: invalid `asm': invalid expression as operand The attached patch fixes this issue, and is smaller than the previous one, as I was able to trigger the issue, so I could narrow it.
src/video/mmx.h
--- a/src/video/mmx.h	Fri Nov 14 19:48:13 2003 +0000
+++ b/src/video/mmx.h	Fri Nov 14 20:21:22 2003 +0000
@@ -353,7 +353,7 @@
 #define	mmx_m2r(op, mem, reg) \
 	__asm__ __volatile__ (#op " %0, %%" #reg \
 			      : /* nothing */ \
-			      : "X" (mem))
+			      : "m" (mem))
 
 #define	mmx_r2m(op, reg, mem) \
 	__asm__ __volatile__ (#op " %%" #reg ", %0" \