Re: [PATCH] take 2 of the tr-based current

From: Benjamin LaHaise (bcrl@redhat.com)
Date: Sat Nov 10 2001 - 20:01:13 EST


On Sun, Nov 11, 2001 at 11:01:08AM +1100, Anton Blanchard wrote:
> static inline struct Paca *get_paca(void) __attribute__ ((pure));
> static inline struct Paca *get_paca(void)
> {
> struct Paca *rval;
> __asm__ ("mfspr %0,0x113" : "=r" (rval));
> return rval;
> }
>
> Alan Modra came to the rescue and found that gcc was optimising too much
> and since the function did not touch any global variables, it would
> upgrade the pure to const. This was on gcc 3.0.X.

Hmmm. Would adding a fake global input help with that? Something like a
"g" (aligned_data) input.

                -ben

-- 
Fish.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Nov 15 2001 - 21:00:25 EST