This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

language syntax

I am new to ARM assembly language and have few (probably basic) questions- this one for the beginning:
What is the meaning of cxsf "extension" in SPSR_cxsf, and what letters are permitted there ?
I also have "c" related question. Many times I saw declaration of function prototypes like: void __swi(0xFE) disable_isr (void);
What confuses me is where "__swi" part comes from ? When I cut one of two "__" compiler complains, as well as when I change some letter in name. It means "__swi" is somewhere already declared, but I can't find where. Still, disable_isr correctly leads code execution to SWI_Handler (declared in .s file of my project).

Parents
  • Hi,

    Please see here: stackoverflow.com/.../what-is-spsr-cxfs

    As to __swi() - it is either so called "intrinsic" function for your specific compiler (gcc, armcc... ) or a macro defined somewhere. ARM projects usually include a lot of .h files scattered in various locations. In C, this is a valid identifier and every character is significant (so __swi, _swi, swi all are different identifiers).

    - pa

Reply
  • Hi,

    Please see here: stackoverflow.com/.../what-is-spsr-cxfs

    As to __swi() - it is either so called "intrinsic" function for your specific compiler (gcc, armcc... ) or a macro defined somewhere. ARM projects usually include a lot of .h files scattered in various locations. In C, this is a valid identifier and every character is significant (so __swi, _swi, swi all are different identifiers).

    - pa

Children