This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [m68k] asm regression with 3.3/3.4/3.5
- From: "Dave Korn" <dk at artimi dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Wed, 12 May 2004 17:04:08 +0100
- Subject: RE: [m68k] asm regression with 3.3/3.4/3.5
> -----Original Message-----
> From: gcc-owner On Behalf Of Gunther Nikl
> Sent: 12 May 2004 16:44
> with m68k-amigaos A6 is a free register and A5 is the framepointer)
'Free' ? I'd have said it was fairly seriously reserved for the OS
myself!
> 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.
> #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'm also curious why isn't a6 in the list of clobbers along with fp0/1, cc
and memory?
cheers,
DaveK
--
Can't think of a witty .sigline today....