Use proper m68k defines from gcc

--HG--
branch : SDL-1.2
This commit is contained in:
Patrice Mandin 2011-08-28 19:51:27 +02:00
parent 129a38c101
commit cb32c5aed4
5 changed files with 11 additions and 11 deletions

View file

@ -91,7 +91,7 @@ static __inline__ Uint16 SDL_Swap16(Uint16 x)
__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x)); __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
return result; return result;
} }
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) #elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint16 SDL_Swap16(Uint16 x) static __inline__ Uint16 SDL_Swap16(Uint16 x)
{ {
__asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc"); __asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc");
@ -126,7 +126,7 @@ static __inline__ Uint32 SDL_Swap32(Uint32 x)
__asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x)); __asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x));
return result; return result;
} }
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__) #elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
static __inline__ Uint32 SDL_Swap32(Uint32 x) static __inline__ Uint32 SDL_Swap32(Uint32 x)
{ {
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc"); __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc");

View file

@ -111,7 +111,7 @@ void SDL_MixAudio (Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
switch (format) { switch (format) {
case AUDIO_U8: { case AUDIO_U8: {
#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES) #if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8); SDL_MixAudio_m68k_U8((char*)dst,(char*)src,(unsigned long)len,(long)volume,(char *)mix8);
#else #else
Uint8 src_sample; Uint8 src_sample;
@ -144,7 +144,7 @@ void SDL_MixAudio (Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
#endif #endif
#endif #endif
#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES) #if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume); SDL_MixAudio_m68k_S8((char*)dst,(char*)src,(unsigned long)len,(long)volume);
#else #else
{ {
@ -193,7 +193,7 @@ void SDL_MixAudio (Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
#endif #endif
#endif #endif
#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES) #if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume); SDL_MixAudio_m68k_S16LSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
#else #else
{ {
@ -226,7 +226,7 @@ void SDL_MixAudio (Uint8 *dst, const Uint8 *src, Uint32 len, int volume)
break; break;
case AUDIO_S16MSB: { case AUDIO_S16MSB: {
#if defined(__GNUC__) && defined(__M68000__) && !defined(__mcoldfire__) && defined(SDL_ASSEMBLY_ROUTINES) #if defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__)) && defined(SDL_ASSEMBLY_ROUTINES)
SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume); SDL_MixAudio_m68k_S16MSB((short*)dst,(short*)src,(unsigned long)len,(long)volume);
#else #else
Sint16 src1, src2; Sint16 src1, src2;

View file

@ -27,7 +27,7 @@
Patrice Mandin Patrice Mandin
*/ */
#if defined(__M68000__) && !defined(__mcoldfire__) && defined(__GNUC__) #if (defined(__m68k__) && !defined(__mcoldfire__)) && defined(__GNUC__)
void SDL_MixAudio_m68k_U8(char* dst, char* src, long len, long volume, char* mix8) void SDL_MixAudio_m68k_U8(char* dst, char* src, long len, long volume, char* mix8)
{ {
__asm__ __volatile__ ( __asm__ __volatile__ (

View file

@ -27,7 +27,7 @@
Patrice Mandin Patrice Mandin
*/ */
#if defined(__M68000__) && defined(__GNUC__) #if (defined(__m68k__) && !defined(__mcoldfire__)) && defined(__GNUC__)
void SDL_MixAudio_m68k_U8(char* dst,char* src, long len, long volume, char* mix8); void SDL_MixAudio_m68k_U8(char* dst,char* src, long len, long volume, char* mix8);
void SDL_MixAudio_m68k_S8(char* dst,char* src, long len, long volume); void SDL_MixAudio_m68k_S8(char* dst,char* src, long len, long volume);

View file

@ -305,7 +305,7 @@ _SDL_Atari_C2pConvert4:
movel c2p_dest,a1 movel c2p_dest,a1
lea _SDL_Atari_table_c2p,a2 lea _SDL_Atari_table_c2p,a2
movel #0x00070001,d3 movel #0x00070001,d3
#if defined(__M68020__) #if defined(__mc68020__)
moveq #0,d0 moveq #0,d0
#endif #endif
@ -326,7 +326,7 @@ c2p4_bclx:
moveq #0,d1 moveq #0,d1
moveq #7,d5 moveq #7,d5
c2p4_bcl07: c2p4_bcl07:
#if defined(__M68020__) #if defined(__mc68020__)
moveb a0@+,d0 moveb a0@+,d0
lea a2@(0,d0:w:4),a3 lea a2@(0,d0:w:4),a3
#else #else
@ -348,7 +348,7 @@ c2p4_bcl07:
moveq #0,d1 moveq #0,d1
moveq #7,d5 moveq #7,d5
c2p4_bcl815: c2p4_bcl815:
#if defined(__M68020__) #if defined(__mc68020__)
moveb a0@+,d0 moveb a0@+,d0
lea a2@(0,d0:w:4),a3 lea a2@(0,d0:w:4),a3
#else #else