swap instruction generation

naga raj gnuuser.raj@gmail.com
Mon Apr 18 13:21:00 GMT 2011


Hi,

  I need to emit a swap instruction from a embedded target which is
using Gcc-4.1.2.

  I am trying to emit a instruction which will perform following operation

  R0=0x12345678;

  swap R1,R0

  Then after this R1 should contain R1= 0x00007856;


 As there is no bswap rtl expression in Gcc-4.1.2 I have tried various
alternatives like:

 1. Used rotate rtl expression

  2. ashift,ashiftrt and or to generate the above instruction


 but compiler is not generating(emitting) swap instruction.


Please help me..


Thanks,
Nagaraju



More information about the Gcc-help mailing list