By default SES uses the GCC for compilation. In all of the Segger documentation and the GCC website, I can't find any discussion of what processor registers are used to store function parameters and return values when compiling for the Cortex-M4. I had thought I had seen in print that R3 was used for the return value, but I can't find what resource I had seen that in. Looking at compiled code, return values get copied between R0 and R3, so it is not clear which register is supposed to be the official location of the return value. Does anyone know where this information is officially stated?
What Cortex-M4 register holds function return values under GCC?
This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.
-
Share