This is the mail archive of the
mailing list for the GCC project.
predicated instructions in ARM
- From: Arvind Krishnaswamy <arvind at CS dot Arizona dot EDU>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 2 May 2002 14:03:10 -0700 (MST)
- Subject: predicated instructions in ARM
The following is a sequence of predicated instructions being generated by
gcc for the ARM:
rsble r3, r6, #0
movle r4, r3, asl #19
movle r4, r4, lsr #19
movgt r3, r6, asl #16
movgt r4, r3, asr #16
So for a given condition either the 3 instructions before .L11 will become
no-ops (if gt is true) else the 2 instructions between .L11 and .L12 will
be no-ops. Isn't it better to just use branches to the appropriate code
since branches will introduce just 1 stall in the pipeline?
One more question. In the above code, control is never transferred to .L11
or .L12. Why are these labels introduced?
Also where can find the arm and thumb specific code under the gcc source tree?