src/video/SDL_stretch.c
changeset 1233 228c94f0b5dc
parent 1228 f4a3a4129d04
child 1234 73676c1f56ee
equal deleted inserted replaced
1232:0aa0000081d5 1233:228c94f0b5dc
    56 #define RETURN		0xC3
    56 #define RETURN		0xC3
    57 #else
    57 #else
    58 #error Need assembly opcodes for this architecture
    58 #error Need assembly opcodes for this architecture
    59 #endif
    59 #endif
    60 
    60 
    61 #if defined(__ELF__) && defined(__GNUC__)
       
    62 extern unsigned char _copy_row[4096] __attribute__ ((alias ("copy_row")));
       
    63 #endif
       
    64 static unsigned char copy_row[4096];
    61 static unsigned char copy_row[4096];
    65 
    62 
    66 static int generate_rowbytes(int src_w, int dst_w, int bpp)
    63 static int generate_rowbytes(int src_w, int dst_w, int bpp)
    67 {
    64 {
    68 	static struct {
    65 	static struct {
   286 		    default:
   283 		    default:
   287 #ifdef __GNUC__
   284 #ifdef __GNUC__
   288 			__asm__ __volatile__ (
   285 			__asm__ __volatile__ (
   289 			"call *%4"
   286 			"call *%4"
   290 			: "=&D" (u1), "=&S" (u2)
   287 			: "=&D" (u1), "=&S" (u2)
   291 			: "0" (dstp), "1" (srcp), "r" (&_copy_row)
   288 			: "0" (dstp), "1" (srcp), "r" (&copy_row)
   292 			: "memory" );
   289 			: "memory" );
   293 #else
   290 #else
   294 #ifdef WIN32
   291 #ifdef WIN32
   295 		{ void *code = &copy_row;
   292 		{ void *code = &copy_row;
   296 			__asm {
   293 			__asm {