Re: egcs 1.0.1 miscompiles Linux 2.0.33

Albert D. Cahalan (
Wed, 4 Mar 1998 19:21:01 -0500 (EST)

> Jeffrey A Law writes:
>>In message <>you write:

>> What we would like to do is:
>> - setup register ecx with (-1), esi with (cs).
>> - execute run the asm-statements
>> - tell gcc that ecx and esi do no longer contain the
>> values (-1) and (cs)
>> What would be the correct way to tell this to gcc if not by
>> inputs and clobbers?
> As folks have stated, the proper way to do this is to set up matching
> input/output operands with the output as an earlyclobber. The manual
> needs updating in this regard since it is ambigious.
> Any asm which sets up a case where a clobber must match an input
> is wrong. Plain and simple, it is wrong.

OK, this is a user interface issue. It seems most people want to
specify clobbered inputs. Why not support it? Just detect the case
and convert it to the way gcc wants to do things internally.

if is_input and is_clobber then ...

> By claiming its a dummy output the compiler will not
> try to use that register to hold any other values across
> the asm statement.

Dummy outputs are a way to hack around the problem.
Think about it. Doesn't it look gross to you?

> The need for the mechanism is obvious, the mechanism currently
> used by Linux is wrong.

Is it legal for any other purpose? If not, then nothing will break
when gcc does what most developers seem to expect.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to