Re: [patch] Prevent dead code/data removal with gcc 3.4

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

 



Jun Sun wrote:
> On Sat, Feb 14, 2004 at 03:17:40AM +0100, Thiemo Seufer wrote:
> > Ralf Baechle wrote:
> > [snip]
> > > Anyway, gcc could load next weeks lucky lottery numbers into the
> > > s-registers after saving them.  That'd break save_static but not the
> > > ABI which only promises to restore the old values in s-registers on
> > > return.
> > 
> > Ok, it could, but adding such insns to the prologue wouldn't make
> > sense at all, so this is unlikely to happen.
> > 
> 
> OS people who have been around long enough know "unlikely" things
> always end up happening. :)
[snip]
> sys_sigsuspend(struct pt_regs regs)
> {
>     8008e280:   27bdffc0        addiu   $sp,$sp,-64
>     8008e284:   afb00030        sw      $s0,48($sp)
>         sigset_t *uset, saveset, newset;
> 
>         save_static(&regs);

Which is a compiler bug, because it schedules around __asm__ __volatile__,
but not a breakage caused by the prologue.

There's no way to be safe from broken compilers.


Thiemo


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux