From a6f3fc45ba0e923f45aa3f47ba6a58139138e418 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 5 Jan 2006 07:20:12 +0000 Subject: [PATCH] From Mike Frysinger and/or Gentoo: - libsdl-SDL_stretch-PIC.patch ignoring the general fact of how SDL_stretch relies on executing dynamic code, the inline asm should let gcc handle the a details for getting the actual address for _copy_row as it will do the right thing test case: http://dev.gentoo.org/~vapier/libsdl/sdl-stretch.tar.bz2 --- src/video/SDL_stretch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/video/SDL_stretch.c b/src/video/SDL_stretch.c index 80d529206..1535dd332 100644 --- a/src/video/SDL_stretch.c +++ b/src/video/SDL_stretch.c @@ -286,9 +286,9 @@ int SDL_SoftStretch(SDL_Surface *src, SDL_Rect *srcrect, default: #ifdef __GNUC__ __asm__ __volatile__ ( - "call _copy_row" + "call *%4" : "=&D" (u1), "=&S" (u2) - : "0" (dstp), "1" (srcp) + : "0" (dstp), "1" (srcp), "r" (&_copy_row) : "memory" ); #else #ifdef WIN32