Keil™, An ARM® Company

RealView Compiler Reference Guide

Technical Support

On-Line Manuals

RealView Compiler Reference Guide

Preface
Introduction
Compiler Command-line Options
Command-line options
‑Aopt
‑‑[no_]alternative_tokens
‑‑[no_]anachronisms
--apcs=qualifer...qualifier
‑‑arm
‑‑asm
‑‑[no_]autoinline
‑‑bigend
‑‑[no_]brief_diagnostics
--bss_threshold=num
‑c
‑C
‑‑c90
‑‑c99
‑‑[no_]code_gen
--[no_]compile_all_input
‑‑cpp
‑‑create_pch=filename
‑Dname[(parm-list)][=def]
‑‑[no_]data_reorder
‑‑[no_]debug
‑‑[no_]debug_macros
‑‑default_extension=ext
‑‑[no_]dep_name
‑‑depend=filename
‑‑depend_format=string
--[no_]depend_system_headers
‑‑device=list
‑‑device=name
--device_opt=option
‑‑diag_error=tag[,tag,...]
‑‑diag_remark=tag[,tag,... ]
‑‑diag_style={arm|ide|gnu}
‑‑diag_suppress=tag[,tag,...]
--diag_suppress=optimizations
‑‑diag_warning=tag[,tag,...]
--diag_warning=optimizations
‑‑[no_]dollar
‑‑dwarf2
‑‑dwarf3
‑E
‑‑enum_is_int
‑‑errors=filename
‑‑[no_]exceptions
‑‑[no_]exceptions_unwind
‑‑[no_]export_all_vtbl
‑‑[no_]export_defs_implicitly
--[no_]extended_initializers
‑‑feedback=filename
--[no_]force_new_nothrow
‑‑forceinline
‑‑fpmode=model
‑‑fpu=list
‑‑fpu=name
‑‑[no_]friend_injection
‑‑gnu
‑‑[no_]guiding_decls
‑‑help
‑‑[no_]hide_all
‑Idir[,dir,...]
‑‑[no_]implicit_include
--[no_]implicit_include_searches
‑‑[no_]implicit_typename
‑‑info=totals
‑‑[no_]inline
‑‑interleave
‑Jdir[,dir,...]
‑‑kandr_include
‑Lopt
‑‑library_interface=lib
--library_type=lib
‑‑list
‑‑littleend
‑‑locale=lang_country
‑‑loose_implicit_cast
‑‑[no_]lower_ropi
‑‑[no_]lower_rwpi
‑M
‑‑md
‑‑message_locale=lang_country[.codepage]
‑‑min_array_alignment=opt
‑‑[no_]multibyte_chars
‑‑[no_]multifile
‑‑[no_]nonstd_qualifier_deduction
‑o filename
‑Onum
‑‑[no_]old_specializations
-‑omf_browse
‑Ospace
‑Otime
‑‑[no_]parse_templates
‑‑pch
‑‑pch_dir=dir
‑‑[no_]pch_messages
‑‑[no_]pch_verbose
‑‑pending_instantiations=n
‑‑pointer_alignment=num
--[no_]project=filename
‑‑preinclude=filename
--[no_]reduce_paths
--reinitialize_workdir
‑‑remarks
‑‑[no_]restrict
‑‑[no_]rtti
‑S
‑‑[un]signed_bitfields
‑‑[un]signed_chars
‑‑show_cmdline
‑‑split_ldm
‑‑split_sections
‑‑[no_]strict
‑‑strict_warnings
‑‑sys_include
‑‑thumb
‑Uname
‑‑[no_]unaligned_access
‑‑use_pch=filename
‑‑[no_]using_std
‑‑[no_]vfe
‑‑via=filename
--[no_]vla
‑‑vsn
‑W
--wchar16
--wchar32
--workdir=directory
‑‑[no_]wrap_diagnostics
Language Extensions
Compiler-specific Features
C and C++ Implementation Details
Via File Syntax
Standard C Implementation Definition
Standard C++ Implementation Definition
C and C++ Compiler Implementation Limits

‑‑fpmode=model

2.1.52. ‑‑fpmode=model

This option specifies the floating‑point conformance, and sets library attributes and floating‑point optimizations.

Syntax

--fpmode=model

Where model is one of:

ieee_full

All facilities, operations, and representations guaranteed by the IEEE standard are available in single and double‑precision. Modes of operation can be selected dynamically at runtime.

This defines the symbols:

__FP_IEEE
__FP_FENV_EXCEPTIONS
__FP_FENV_ROUNDING
__FP_INEXACT_EXCEPTION
ieee_fixed

IEEE standard with round‑to‑nearest and no inexact exceptions.

This defines the symbols:

__FP_IEEE
__FP_FENV_EXCEPTIONS
ieee_no_fenv

IEEE standard with round‑to‑nearest and no exceptions. This mode is stateless and is compatible with the Java floating‑point arithmetic model.

This defines the symbol __FP_IEEE.

std

IEEE finite values with denormals flushed to zero, round‑to‑nearest, and no exceptions. This is compatible with standard C and C++ and is the default option.

Normal finite values are as predicted by the IEEE standard. However:

  • NaNs and infinities might not be produced in all circumstances defined by the IEEE model. When they are produced, they might not have the same sign.

  • The sign of zero might not be that predicted by the IEEE model.

fast

Perform more aggressive floating‑point optimizations that might cause a small loss of accuracy to provide a significant performance increase. This option defines the symbol __FP_FAST.

This option results in behavior that is not fully compliant with the ISO C or C++ standard. However, numerically robust floating‑point programs are expected to behave correctly.

A number of transformations might be performed, including:

  • Double‑precision math functions might be converted to single precision equivalents if all floating‑point arguments can be exactly represented as single precision values, and the result is immediately converted to a single‑precision value.

    This transformation is only performed when the selected library contains the single‑precision equivalent functions, for example, when the selected library is rvct.

    For example:

    float f(float a)
    {
        return sqrt(a);
    }
    

    is transformed to

    float f(float a)
    {
        return sqrtf(a);
    }.
    
  • Double‑precision floating‑point expressions that are narrowed to single‑precision are evaluated in single‑precision when it is beneficial to do so. For example, float y = (float)(x + 1.0) is evaluated as float y = (float)x + 1.0f.

  • Division by a floating‑point constant is replaced by multiplication with the inverse. For example, x / 3.0 is evaluated as x * (1.0 / 3.0).

  • It is not guaranteed that the value of errno is compliant with the ISO C or C++ standard after math functions have been called. This enables the compiler to inline the VFP square root instructions in place of calls to sqrt() or sqrtf().

See also

  • The --fpmode option in the Compiler User Guide

  • ARM Application Note 133 ‑ Using VFP with RVDS.

Copyright © 2007 ARM Limited. All rights reserved.ARM DUI 0376A