This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Changes for a `m68k-motorola-sysv'


	* config/m68k/m68k.h (MACHINE_STATE_SAVE): #ifdef USE_GAS use
	`%' as	prefix for register names.

Rather than add more cases, I have modified the existing cases to use
the %# (IMMEDATE_PREFIX) and %/ (REGISTER_PREFIX) modifiers, which means
that they should now be correct for any assembler.
	
Mon Sep  8 18:26:35 1997  Jim Wilson  <wilson@cygnus.com>

	* m68k.h (MACHINE_STATE_SAVE, MACHINE_STATE_RESTORE): In MOTOROLA
	cases, add %# and %/, and add : to make them into extended asms.

Index: m68k.h
===================================================================
RCS file: /cvs/cvsfiles/egcs/gcc/config/m68k/m68k.h,v
retrieving revision 1.4
diff -p -r1.4 m68k.h
*** m68k.h	1997/09/08 02:06:55	1.4
--- m68k.h	1997/09/09 01:26:11
*************** while(0)
*** 1081,1103 ****
  #if defined(__mcf5200__)
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("subl 20,sp");		\
!       asm ("movml d0/d1/a0/a1,sp@(4)");	\
!       asm ("movew cc,d0");		\
!       asm ("movml d0,sp@");		\
      }
  #else /* !__mcf5200__ */
  #if defined(MACHINE_STATE_m68010_up)
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("movew cc,sp@-");		\
!       asm ("moveml d0/d1/a0/a1,sp@-");	\
      }
  #else /* !MACHINE_STATE_m68010_up */
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("movew sr,sp@-");		\
!       asm ("moveml d0/d1/a0/a1,sp@-");	\
      }
  #endif /* MACHINE_STATE_m68010_up */
  #endif /* __mcf5200__ */
--- 1081,1103 ----
  #if defined(__mcf5200__)
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("subl %#20,%/sp" : );	\
!       asm ("movml %/d0/%/d1/%/a0/%/a1,%/sp@(4)" : ); \
!       asm ("movew %/cc,%/d0" : );	\
!       asm ("movml %/d0,%/sp@" : );	\
      }
  #else /* !__mcf5200__ */
  #if defined(MACHINE_STATE_m68010_up)
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("movew %/cc,%/sp@-" : );	\
!       asm ("moveml %/d0/%/d1/%/a0/%/a1,%/sp@-" : ); \
      }
  #else /* !MACHINE_STATE_m68010_up */
  #define MACHINE_STATE_SAVE(id)		\
      {					\
!       asm ("movew %/sr,%/sp@-" : );	\
!       asm ("moveml %/d0/%/d1/%/a0/%/a1,%/sp@-" : ); \
      }
  #endif /* MACHINE_STATE_m68010_up */
  #endif /* __mcf5200__ */
*************** while(0)
*** 1134,1149 ****
  #if defined(__mcf5200__)
  #define MACHINE_STATE_RESTORE(id)	\
      {					\
!       asm ("movml sp@,d0");		\
!       asm ("movew d0,cc");		\
!       asm ("movml sp@(4),d0/d1/a0/a1");	\
!       asm ("addl 20,sp");		\
      }
  #else /* !__mcf5200__ */
  #define MACHINE_STATE_RESTORE(id)	\
      {					\
!       asm ("moveml sp@+,d0/d1/a0/a1");	\
!       asm ("movew sp@+,cc");		\
      }
  #endif /* __mcf5200__ */
  #endif /* MOTOROLA */
--- 1134,1149 ----
  #if defined(__mcf5200__)
  #define MACHINE_STATE_RESTORE(id)	\
      {					\
!       asm ("movml %/sp@,%/d0" : );	\
!       asm ("movew %/d0,%/cc" : );	\
!       asm ("movml %/sp@(4),%/d0/%/d1/%/a0/%/a1" : ); \
!       asm ("addl %#20,%/sp" : );	\
      }
  #else /* !__mcf5200__ */
  #define MACHINE_STATE_RESTORE(id)	\
      {					\
!       asm ("moveml %/sp@+,%/d0/%/d1/%/a0/%/a1" : ); \
!       asm ("movew %/sp@+,%/cc" : );	\
      }
  #endif /* __mcf5200__ */
  #endif /* MOTOROLA */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]