Comment 3 for bug 1720993

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) wrote :

BTW, the reason is that GCC does not understand what is inside the inline assembly statement. This means it does not realize there is two instructions and one happens before the other. Anyway for some architecture one could imagine that two consecutive instructions would happen together and have no impact on each other.

Therefore GCC will assume that the input and output will not overlap, ie. the input will be read before the output happens just like what happens for a single instruction(ie add r3, r3, r3 where r3 is read before it is written). This is why we need to tell GCC that there is an overlap (output happens before input is consumed).

Best regards.