Datasheet

ARM Compiler Reference
3-8 Copyright © 1999-2001 ARM Limited. All rights reserved. ARM DUI 0067D
real_num
Is the value passed in r12 to the SWI handler. You
can use this feature to implement indirect SWIs.
The SWI handler can use r12 to determine the
function to perform.
For example:
int __swi_indirect(0) ioctl(int swino, int fn,
void *argp);
This SWI can be called as follows:
ioctl(IOCTL+4, RESET, NULL);
It compiles to a SWI 0 with IOCTL+4 in r12.
To use the indirect SWI mechanism, your system SWI handlers must
make use of the r12 value to select the required operation.
__value_in_regs
This instructs the compiler to return a structure of up to four integer
words in integer registers or up to four floats or doubles in floating-point
registers rather than using memory, for example:
typedef struct int64_struct {
unsigned int lo;
unsigned int hi;
} int64_struct;
__value_in_regs extern
int64_struct mul64(unsigned a, unsigned b);
Declaring a function
__value_in_regs
can be useful when calling
assembler functions that return more than one result. See the AXD and
armsd Debuggers Guide for information on the default method of passing
and returning structures.
Note
A C++ function cannot return a
__value_in_regs
structure if the structure
requires copy constructing.
Function storage class modifiers
A storage class modifier is a subset of function declaration keywords, however they do
not affect the type of the function.
__inline
This instructs the compiler to compile a C function inline if it is sensible
to do so. The semantics of
__inline
are exactly the same as those of the
C++
inline
keyword: