mips16 and nomips16

reed kotler rkotler@mips.com
Tue Jan 15 00:53:00 GMT 2013


On 01/14/2013 04:50 PM, David Daney wrote:
> On 01/14/2013 04:32 PM, reed kotler wrote:
>> I'm not understanding why mips16 and nomips16 are not simple inheritable
>> attributes.
>
> The mips16ness of a function must be known by the caller so that the 
> appropriate version of the JAL/JALX instruction can be emitted
>
>
>>
>> i..e you should be able to say:
>>
>> void foo();
>> void __attribute((nomips16)) foo();
>>
>>
>> or
>>
>> void goo();
>
> Any call here would assume nomips16
>
>> void __attribute((mips16)) goo();
>
> A call here would assume mips16.
>
> Which is it?  If you allow it to change, one case will always be 
> incorrect.
>
> Or perhaps I misunderstand the question.
>
> David Daney
>
I would assume that foo would be nomips16 and goo would be mips16.

The definition of plain foo() or goo() says that nothing is specified.

What is not clear then?

This is how all such other attributes in gcc are handled.





More information about the Gcc mailing list