GCC and Linux

Richard B. Johnson (root@analogic.com)
Mon, 28 Apr 1997 17:47:34 -0400 (EDT)

Can anyone tell me why I can't define a macro that does:


Then later execute a macro that does:


And get the flags restored!! Instead, the kernel uses save_flags(x)
and restore_flags(x) macros with the contents of the flag register
saved in a 32-bit variable.

If I push the damn flags onto the stack, they damn-well be there
when I pop them off. Not so with the GCC Compiler. It looks as
though it secretly "levels" the stack and I don't know why. If
so, it is broken and should be fixed instead of work-arounds
everywhere in the code.

Dick Johnson
Richard B. Johnson
Project Engineer
Analogic Corporation
Voice : (508) 977-3000 ext. 3754
Fax : (508) 532-6097
Modem : (508) 977-6870
Ftp : ftp@boneserver.analogic.com
Email : rjohnson@analogic.com, johnson@analogic.com
Penguin : Linux version 2.1.35 on an i586 machine (66.15 BogoMips).
Warning : I read unsolicited mail for $350.00 per hour. Supply billing address.