Datasheet

ARM Compiler Reference
ARM DUI 0067D Copyright © 1999-2001 ARM Limited. All rights reserved. 3-7
__pure void (*h(void))(void); /* declares 'h' as a (pure?)
function that returns a pointer to a (pure?) function. It is
ambiguous which of the two function types is pure. */
void (*h1(void) __pure)(void); /* 'h1' is a pure function
returning a pointer to a (normal) function */
__softfp
This asserts that a function uses software floating-point linkage. Calls to
the function pass floating-point arguments in integer registers. If the
result is a floating-point value, the value is returned in integer registers.
This duplicates the behavior of compilation targeting software
floating-point.
This keyword allows an identical library to be used by sources compiled
to use hardware and software floating-point.
__swi
This declares a SWI function taking up to four integer-like arguments and
returning up to four results in a
value_in_regs
structure. This causes
function invocations to be compiled inline as an ATPCS compliant SWI
that behaves similarly to a normal call to a function.
For a SWI returning no results use:
void __swi(swi_num) swi_name(int arg1,…, int argn);
For example:
void __swi(42) terminate_proc(int procnum);
For a SWI returning one result, use:
int __swi(swi_num) swi_name(int arg1,…, int argn);
For a SWI returning more than 1 result use:
typedef struct res_type { int res1,…,resn;} res_type;
res_type __value_in_regs __swi(swi_num) swi_name(
int arg1,…,int argn);
The
__value_in_regs
qualifier is used to specify that a small structure of
up to four words (16 bytes) is returned in registers, rather than by the
usual structure-passing mechanism defined in the ATPCS.
See the chapter on Handling Processor Exceptions in the ADS Developer
Guide for detailed information.
__swi_indirect
This passes an operation code to the SWI handler in r12:
int __swi_indirect(swi_num)
swi_name(int real_num,
int arg1, … argn);
where:
swi_num
Is the SWI number used in the SWI instruction.