This is the mail archive of the 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: [PATCH] MIPS function attributes for interrupt handlers

Mark Mitchell <> writes:
> Richard Sandiford wrote:
>>> For example, writing:
>>>   void mylock()
>>>     __attribute__((hidden))
>>>     __attribute__((naked)) {
>>>     ARCH_MYLOCK;
>>>   }
>>> where ARCH_MYLOCK is a macro that expands to the CPU-specific assembly
>>> implementation of a locking primitive seems likely to be useful.  Much
>>> better than lots of #ifdef __linux__ and #ifdef __mips__ goo in a pure
>>> assembler file.
>> I'm not convinced by this example.  GCC already provides a much
>> more powerful way of doing this: extended asms.  Such an extended
>> asm has many benefits over naked functions:
> Sure, but it has one serious drawback: you can't use a non-standard
> calling convention.

Is that really an issue?  You wouldn't be able to call the function
from GCC in that case either, so why tell GCC about it at all?

> What is the harm in allowing it for MIPS?

I think at this point we're going round in circles ;)  I don't think
I can explain it any better than I already have.


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