04.01.2015 Views

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

RealView Compilation Tools - ARM Information Center

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Compiler-specific Features<br />

Note<br />

This keyword has the #pragma equivalent #pragma __softfp_linkage.<br />

Usage<br />

Calls to the function pass floating-point arguments in integer registers. If the result is a<br />

floating-point value, the value is returned in integer registers. This duplicates the<br />

behavior of compilation targeting software floating-point.<br />

This keyword enables the same library to be used by sources compiled to use hardware<br />

and software floating-point.<br />

Note<br />

In C++, if a virtual function qualified with the __softfp keyword is to be overridden, the<br />

overriding function must also be declared as __softfp. If the functions do not match, the<br />

compiler generates an error.<br />

See also<br />

• --fpu=name on page 2-62<br />

• #pragma softfp_linkage, #pragma no_softfp_linkage on page 4-70<br />

• Floating-point computations and linkage on page 5-37 in the Compiler User<br />

Guide.<br />

4.1.15 __svc<br />

The __svc keyword declares a SuperVisor Call (SVC) function taking up to four<br />

integer-like arguments and returning up to four results in a value_in_regs structure.<br />

__svc is a function qualifier. It affects the type of a function.<br />

Syntax<br />

__svc(int svc_num) return-type function-name([argument-list]);<br />

Where:<br />

svc_num<br />

Is the immediate value used in the SVC instruction.<br />

It is an expression evaluating to an integer in the range:<br />

• 0 to 2 24 –1 (a 24-bit value) in an <strong>ARM</strong> instruction<br />

• 0-255 (an 8-bit value) in a 16-bit Thumb instruction.<br />

4-16 Copyright © 2007-2010 <strong>ARM</strong>. All rights reserved. <strong>ARM</strong> DUI 0348C<br />

Non-Confidential,<br />

ID101213

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!