We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Showing results for 
Search instead for 
Did you mean: 
Newbie aclaessen
Registered: ‎06-19-2015

In line assembler issue Xilinx XSDK for Zynq

I am trying to compile an application developed with the ARM DS-5 tools the Xilinx XSDK (14.04) IDE and compiler.

I have run into an in-line assembly code issue that seems to compile correctly on the ARM DS-5 ide but fails on the XSDK.


The module is in a directory “XilinxCode".

The code is in the file “xpseudo_asm_rvct.h” and has a 2009 Xilinx Copyright header.


The code segment in question:


static __inline unsigned long mfcpsr(void)


    register volatile unsigned int Reg __asm("cpsr");

    return Reg;



#define mtcpsr(v)        { register volatile unsigned int Reg __asm("cpsr");\

                                      Reg = v; }


The error message that I am getting is:

invalid register name for 'Reg'


I am new to low level bare metal programming and have no experience with in-line assembly. Anny help would be appreciated.

0 Kudos