Re: longjmp question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jurij Smakov <jurij@xxxxxxxxx>
Date: Sun, 23 Oct 2011 14:47:27 +0100

> On Sat, Oct 22, 2011 at 06:54:05PM -0400, David Miller wrote:
>>
>> Just let the compiler do it for you, please... the compiler absolutely cannot
>> optimize away a function that uses a volatile asm statement.  And it absolutely
>> cannot make a function that clobbers %o7 a leaf function.
> 
> That's not what I see. I tried writing up a patch for Ruby using this, 
> and here's what I get:
> 
> 1. Preprocessed source of cont.c contains flush_register_windows 
> definition:
> 
> # 219 "./include/ruby/defines.h"
> static void
> flush_register_windows(void)
> {
>     asm __volatile__ ("flushw" : : : "o7");
> }

You can't put it in a header file, GCC will inline it.  You have to
put it in a function in a seperate C file, and this is what I said to
do the other week in my original email.

You're only other option is to explicitly mark this
__attribute__((__noinline__))
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux