RE: [PATCH] fixes for building kernel 2.5.45 using Intel compiler

Nakajima, Jun (jun.nakajima@intel.com)
Thu, 31 Oct 2002 08:37:48 -0800


> -----Original Message-----
> From: Alan Cox [mailto:alan@lxorguk.ukuu.org.uk]
>
> On Thu, 2002-10-31 at 03:17, Nakajima, Jun wrote:
> > asmlinkage int sys_iopl(unsigned long unused)
> > {
> > - struct pt_regs * regs = (struct pt_regs *) &unused;
> > + volatile struct pt_regs * regs = (struct pt_regs *) &unused;
>
> Why is this needed ?

Becaues the compiler optimization removes the following code without it.
regs->eflags = (regs->eflags & 0xffffcfff) | (level << 12);

The compiler provides access to the argument 'unused' in the stack
(asmlinkage,
i.e. __attribute__ ((regparm(0))), but it thinks modifying the stack
more than that is not effective anyway. So it elimites the code under
optimizations.

>
>
> > - IGNLABEL "HmacRxUc",
> > - IGNLABEL "HmacRxDiscard",
> > - IGNLABEL "HmacRxAccepted",
> > + IGNLABEL /* "HmacTxMc", */
> > + IGNLABEL /* "HmacTxBc", */
>
> You seem to be removing fields from the struct - have you
> tested this ?
>
No, it's not removing fields from there. The original definition of IGNLABLE
is
#define IGNLABEL 0&(int)
And
IGNLABEL "HmacRxUc",
simpile ends up 0, (in gcc). But this is just causing (a lot of) warnings,
so I take this out.

Jun

-
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/