Re: egcs 1.0.1 miscompiles Linux 2.0.33

Albert D. Cahalan (acahalan@cs.uml.edu)
Tue, 10 Mar 1998 17:07:43 -0500 (EST)


Jeffrey A Law writes:

> I will update the egcs docs as soon as we've agreed on the technical
> details about how to handle these situations.
>
> I think we're close, but I don't want to start changing the docs then
> find out y'all don't agree with the direction I'm heading.

> * Clarify that overlapping inputs and clobbers are wrong.
>
> * Clarify that a clobbered reg can not be used for an input
> operand or the address of any operand.
>
> * Clarify that earlyclobbered outputs with a matching input
> is the right way to handle this situation.

I don't see why the following is not acceptable:

1. gcc detects a clobbered input
2. gcc translates that into an earlyclobbered output with a matching input

If done as soon as the inline assembly is parsed, this wouldn't
affect very much of the compiler at all. It would certainly not
affect the way gcc allocates registers, since the constraints
would be already converted.

Computers should do work for humans, not the other way around.
Since this is such a mechanical translation from otherwise invalid
input, gcc can handle it. People wouldn't keep using clobbered inputs
if it wasn't the humanly natural way to express such constraints.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu