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: [m68k] asm regression with 3.3/3.4/3.5


"Dave Korn" <dk@artimi.com> writes:

>> For me this is a serious bug which could be triggered at 
>> random places.
>> I would appriciate any help finding this bug.
>
>   I suspect the answer is going to be that your inline asm is faulty.

I don't think so.

>
>> #define osfunc(v1,v2)					\
>> ({							\
>>  int _v1 = (v1);					\
>>  int _v2 = (v2);					\
>>  {							\
>>    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 _bn __asm("a6") = (base);	\
>>    register int __v1 __asm("d0") = (_v1);		\
>>    register int __v2 __asm("a0") = (_v2);		\
>>    __asm volatile ("jsr a6@(-0x84:W)"			\
>>    : "=r" (_d0), "=r" (_d1), "=r" (_a0), "=r" (_a1)	\
>>    : "r" (_bn), "rf" (__v1), "rf" (__v2)		\
>>    : "fp0", "fp1", "cc", "memory");			\
>>   }							\
>> })
>
>   The register ... _asm("...") construct doesn't actually tell gcc anything
> useful about clobbers and usage.  It's actually not a terribly useful
> construction.

I don't see how clobber can help here, there does not seem to be any
omissions.

>   I'm also curious why isn't a6 in the list of clobbers along with fp0/1, cc
> and memory?

You can't have a register both as input and as clobber.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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