That doesn't appear to do anything. None of the processed code (outside the code I've written) references ExecBase. There are some references to SysBase, but I think those are fine.
EDIT: I've tried compiling other "known good" code and get similar errors, so I'm guessing I've got issues with my inlines?
EDIT2: OK. I know how to make the error go away, but I don't know what else it might break (I need to read up on gcc's inline assembler). For example, ObtainSemaphore(&mb->mb_Semaphore) expands to this:
(
{
struct SignalSemaphore * _ObtainSemaphore_v1 = (&mb->mb_Semaphore); {
register struct Library *const _ObtainSemaphore_bn __asm("a6") = (struct Library*)(SysBase);
register struct SignalSemaphore * _n1 __asm("a0") = _ObtainSemaphore_v1;
__asm volatile ("jsr a6@(-""0x234"":W)" : : "r" (_ObtainSemaphore_bn), "rf"(_n1) : "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory");
}
}
);
Notice how variable _n1 is stored in a0 (__asm("a0")). If you remove "a0" from the next line (I'm assuming this is the "clobber" list), the error goes away:
(
{
struct SignalSemaphore * _ObtainSemaphore_v1 = (&mb->mb_Semaphore); {
register struct Library *const _ObtainSemaphore_bn __asm("a6") = (struct Library*)(SysBase);
register struct SignalSemaphore * _n1 __asm("a0") = _ObtainSemaphore_v1;
__asm volatile ("jsr a6@(-""0x234"":W)" : : "r" (_ObtainSemaphore_bn), "rf"(_n1) : "d0", "d1", "a1", "fp0", "fp1", "cc", "memory");
}
}
);
Any gcc inline assembler gurus out there? Should fd2inline be patched to fix this? Actually, an update to inline/macros.h should suffice. It looks like "d0", "d1", "a0", "a1", "fp0", "fp1", "cc", "memory" is the clobber list used throughout macros.h. The main problem lies with passing register names to the inline macros--the macro can't know which regsiters to add to the clobber list if it doesn't know which registers will be used as inputs and outputs. Per gcc docs, input and output registers can't appear in the clobber list. I gues it's time for a more clever way to produce gcc inlines (or just change the clobber list for all inline macros to "cc", "memory" unless a macro uses more than a jmp instruction). I guess I could start writing custom inlines as I need them. Eventually, I'll end up with a complete set of working inlines . . . but I don't think I want to write out inlines for every public API. Is fd2pragma more intelligent when it comes to producing inlines? Or does it use generic macros as well?
EDIT3: And it just occurred to me that gcc was optimizing away the functions when they weren't being referenced by the globals, which is why I wasn't getting the errors before (any why I shouldn't have optimizations turned on during development).
Trev