This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
reordering of asm insns
- From: Sanjiv Kumar Gupta <sanjivg at noida dot hcltech dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 10 Dec 2001 18:24:26 +0530
- Subject: reordering of asm insns
Hi,
I guess -O2 may do reordering of _asm_ statements. refer below
---
Note that even a volatile `asm' instruction can be moved in ways
that appear insignificant to the compiler, such as across jump
instructions. You can't expect a sequence of volatile `asm'
instructions to remain perfectly consecutive. If you want consecutive
output, use a single `asm'.
---
is there any way by which, I can avoid this while still using other features
of -O2.
regards
Sanjiv