On Tue, Apr 17, 2012 at 9:03 AM, David Brown <[email protected]> wrote:
> On 17/04/2012 13:44, Peter Bigot wrote:
>>
>> On Tue, Apr 17, 2012 at 5:02 AM, David Brown<[email protected]>
>>  wrote:
>>> With gcc for the msp430, there is also a "critical" function attribute -
>>> you can put your critical accesses within a small static inline
>>> "critical" function.
>>
>>
>> Interesting thought: I haven't tried to see whether the "critical"
>> attribute (which is expanded when the function prolog and epilog are
>> emitted) is preserved if a function is inlined.  Does that actually
>> work?
>>
>
> As far as I remember, it works fine.  However, I haven't actually used
> mspgcc much for the last few years, and the projects using it are all on an
> older gcc 3.x version - I can't comment about current versions.

As I'm working in this area now: current gcc declines to inline any
function that has a target-specific attribute, unless a special hook
is added to enable this feature.

The next revision will have this hook, but it'll only allow inline of
sr16, sr20, c16, and c20 functions.  At this time, the remaining
function attributes (signal, interrupt, naked, task, wakeup, critical,
reentrant, hosted) will continue to inhibit inlining.

Peter

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to