This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: decl_conflicts_with_clobbers_p problem


On Thu, Mar 13, 2003 at 12:21:36PM +0100, Andreas Schwab wrote:
> To tell the compiler that _n1 is an output operand, which in fact it is.

Would this be legal (the 0x0xDEADBEAF is meant as a test)?

--cut--
#define LP1NR(offs, name, t1, v1, r1, bt, bn)			\
({								\
   t1 _##name##_v1 = (v1);					\
   {								\
      register int _d0 __asm("d0") = 0xDEADBEAF;		\
      register int _d1 __asm("d1") = 0xDEADBEAF;		\
      register int _a0 __asm("a0") = 0xDEADBEAF;		\
      register int _a1 __asm("a1") = 0xDEADBEAF;		\
      register void *const _##name##_bn __asm("a6") = (bn);	\
      register t1 _n1 __asm(#r1) = _##name##_v1;		\
      __asm volatile ("jsr a6@(-"#offs":W)"			\
      : "=r" (_d0), "=r" (_d1), "=r" (_a0), "=r" (_a1)		\
      : "r" (_##name##_bn), "rf"(_n1)				\
      : "fp0", "fp1", "cc", "memory");				\
   }								\
})
#define SendIO(ioRequest) \
	LP1NR(0x1ce, SendIO, void *, ioRequest, a1, \
	, EXEC_BASE_NAME)
--cut--

Gunther Nikl


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