Use proper m68k defines from gcc SDL-1.2
authorPatrice Mandin <patmandin@gmail.com>
Sun, 28 Aug 2011 19:51:27 +0200
branchSDL-1.2
changeset 5657529d23724144
parent 5656 1458fd8edacd
child 5854 143d7c02d626
Use proper m68k defines from gcc
include/SDL_endian.h
src/audio/SDL_mixer.c
src/audio/SDL_mixer_m68k.c
src/audio/SDL_mixer_m68k.h
src/video/ataricommon/SDL_ataric2p.S
     1.1 --- a/include/SDL_endian.h	Sun Aug 28 19:33:40 2011 +0200
     1.2 +++ b/include/SDL_endian.h	Sun Aug 28 19:51:27 2011 +0200
     1.3 @@ -91,7 +91,7 @@
     1.4  	__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
     1.5  	return result;
     1.6  }
     1.7 -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
     1.8 +#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
     1.9  static __inline__ Uint16 SDL_Swap16(Uint16 x)
    1.10  {
    1.11  	__asm__("rorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
    1.12 @@ -126,7 +126,7 @@
    1.13  	__asm__("rlwimi %0,%2,24,0,7"   : "=&r" (result) : "0" (result),    "r" (x));
    1.14  	return result;
    1.15  }
    1.16 -#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
    1.17 +#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
    1.18  static __inline__ Uint32 SDL_Swap32(Uint32 x)
    1.19  {
    1.20  	__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
     2.1 --- a/src/audio/SDL_mixer.c	Sun Aug 28 19:33:40 2011 +0200
     2.2 +++ b/src/audio/SDL_mixer.c	Sun Aug 28 19:51:27 2011 +0200
     2.3 @@ -111,7 +111,7 @@
     2.4  	switch (format) {
     2.5  
     2.6  		case AUDIO_U8: {
     2.7 -#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES)
     2.8 +#if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
     2.9  			SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8);
    2.10  #else
    2.11  			Uint8 src_sample;
    2.12 @@ -144,7 +144,7 @@
    2.13  #endif
    2.14  #endif
    2.15  
    2.16 -#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES)
    2.17 +#if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
    2.18  			SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume);
    2.19  #else
    2.20  			{
    2.21 @@ -193,7 +193,7 @@
    2.22  #endif
    2.23  #endif
    2.24  
    2.25 -#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES)
    2.26 +#if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
    2.27  			SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
    2.28  #else
    2.29  			{
    2.30 @@ -226,7 +226,7 @@
    2.31  		break;
    2.32  
    2.33  		case AUDIO_S16MSB: {
    2.34 -#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES)
    2.35 +#if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
    2.36  			SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
    2.37  #else
    2.38  			Sint16 src1, src2;
     3.1 --- a/src/audio/SDL_mixer_m68k.c	Sun Aug 28 19:33:40 2011 +0200
     3.2 +++ b/src/audio/SDL_mixer_m68k.c	Sun Aug 28 19:51:27 2011 +0200
     3.3 @@ -27,7 +27,7 @@
     3.4  	Patrice Mandin
     3.5  */
     3.6  
     3.7 -#if defined(__M68000__) && !defined(__mcoldfire__) && defined(__GNUC__)
     3.8 +#if (defined(__m68k__) && !defined(__mcoldfire__)) && defined(__GNUC__)
     3.9  void SDL_MixAudio_m68k_U8(char* dst, char* src, long len, long volume, char* mix8)
    3.10  {
    3.11      __asm__ __volatile__ (
     4.1 --- a/src/audio/SDL_mixer_m68k.h	Sun Aug 28 19:33:40 2011 +0200
     4.2 +++ b/src/audio/SDL_mixer_m68k.h	Sun Aug 28 19:51:27 2011 +0200
     4.3 @@ -27,7 +27,7 @@
     4.4  	Patrice Mandin
     4.5  */
     4.6  
     4.7 -#if defined(__M68000__) && defined(__GNUC__)
     4.8 +#if (defined(__m68k__) && !defined(__mcoldfire__)) && defined(__GNUC__)
     4.9  void SDL_MixAudio_m68k_U8(char* dst,char* src, long len, long volume, char* mix8);
    4.10  void SDL_MixAudio_m68k_S8(char* dst,char* src, long len, long volume);
    4.11  
     5.1 --- a/src/video/ataricommon/SDL_ataric2p.S	Sun Aug 28 19:33:40 2011 +0200
     5.2 +++ b/src/video/ataricommon/SDL_ataric2p.S	Sun Aug 28 19:51:27 2011 +0200
     5.3 @@ -305,7 +305,7 @@
     5.4  	movel	c2p_dest,a1
     5.5  	lea	_SDL_Atari_table_c2p,a2
     5.6  	movel	#0x00070001,d3
     5.7 -#if defined(__M68020__)
     5.8 +#if defined(__mc68020__)
     5.9  	moveq	#0,d0
    5.10  #endif
    5.11  	
    5.12 @@ -326,7 +326,7 @@
    5.13  	moveq	#0,d1
    5.14  	moveq	#7,d5
    5.15  c2p4_bcl07:
    5.16 -#if defined(__M68020__)
    5.17 +#if defined(__mc68020__)
    5.18  	moveb	a0@+,d0
    5.19  	lea		a2@(0,d0:w:4),a3
    5.20  #else
    5.21 @@ -348,7 +348,7 @@
    5.22  	moveq	#0,d1
    5.23  	moveq	#7,d5
    5.24  c2p4_bcl815:
    5.25 -#if defined(__M68020__)
    5.26 +#if defined(__mc68020__)
    5.27  	moveb	a0@+,d0
    5.28  	lea		a2@(0,d0:w:4),a3
    5.29  #else