title: ARM7TDMI does not support requested special purpose register
body: <p>I need to convert some code compiled with ARMASM to gcc(code sourcery GCC-4.6.2 eabi). I use a ARM7TDMI and my compilations arguments are </p>
  
  <pre><code>arm-none-eabi-gcc -c -march=armv4t -mcpu=arm7tdmi -mlittle-endian -g -O1 
  </code></pre>
  
  <p>(I omitted the -I and -D arguments...)</p>
  
  <p>In one of my files I have this code that won't compile :</p>
  
  <pre><code>extern inline void ngEnable( void)
  {
      int tmp;
      asm volatile(
          "msr %[tmp], CPSR\n\t"
          "bic %[tmp], %[tmp], #0xC0\n\t"
          "msr CPSR_c, %[tmp]"
          : [tmp] "+r" (tmp)
      );
  }
  </code></pre>
  
  <p>I get this error :</p>
  
  <pre><code>C:\DOCUME~1\MALLAR~1.ISC\LOCALS~1\Temp\ccA9cCgQ.s: Assembler messages:
  C:\DOCUME~1\MALLAR~1.ISC\LOCALS~1\Temp\ccA9cCgQ.s:267: Error: selected processor does not support requested special purpose register -- `msr r3,CPSR'
  make: *** [cdbini.o] Error 1
  </code></pre>
  
  <p>according to this post <a href="http://permalink.gmane.org/gmane.linux.linaro.devel/6500" rel="nofollow">Re: trouble building linux-linaro-3.0-2011.08-0</a>  (I build on windows, but the problem could be the same?) I'm already using the workaround of not using -march=all...</p>
  
  <p>Any idea of what my problem is?</p>