| <html lang="en"> |
| <head> |
| <title>MIPS FP ABI Selection - Using as</title> |
| <meta http-equiv="Content-Type" content="text/html"> |
| <meta name="description" content="Using as"> |
| <meta name="generator" content="makeinfo 4.13"> |
| <link title="Top" rel="start" href="index.html#Top"> |
| <link rel="up" href="MIPS-FP-ABIs.html#MIPS-FP-ABIs" title="MIPS FP ABIs"> |
| <link rel="prev" href="MIPS-FP-ABI-Variants.html#MIPS-FP-ABI-Variants" title="MIPS FP ABI Variants"> |
| <link rel="next" href="MIPS-FP-ABI-Compatibility.html#MIPS-FP-ABI-Compatibility" title="MIPS FP ABI Compatibility"> |
| <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> |
| <!-- |
| This file documents the GNU Assembler "as". |
| |
| Copyright (C) 1991-2019 Free Software Foundation, Inc. |
| |
| Permission is granted to copy, distribute and/or modify this document |
| under the terms of the GNU Free Documentation License, Version 1.3 |
| or any later version published by the Free Software Foundation; |
| with no Invariant Sections, with no Front-Cover Texts, and with no |
| Back-Cover Texts. A copy of the license is included in the |
| section entitled ``GNU Free Documentation License''. |
| |
| --> |
| <meta http-equiv="Content-Style-Type" content="text/css"> |
| <style type="text/css"><!-- |
| pre.display { font-family:inherit } |
| pre.format { font-family:inherit } |
| pre.smalldisplay { font-family:inherit; font-size:smaller } |
| pre.smallformat { font-family:inherit; font-size:smaller } |
| pre.smallexample { font-size:smaller } |
| pre.smalllisp { font-size:smaller } |
| span.sc { font-variant:small-caps } |
| span.roman { font-family:serif; font-weight:normal; } |
| span.sansserif { font-family:sans-serif; font-weight:normal; } |
| --></style> |
| </head> |
| <body> |
| <div class="node"> |
| <a name="MIPS-FP-ABI-Selection"></a> |
| <p> |
| Next: <a rel="next" accesskey="n" href="MIPS-FP-ABI-Compatibility.html#MIPS-FP-ABI-Compatibility">MIPS FP ABI Compatibility</a>, |
| Previous: <a rel="previous" accesskey="p" href="MIPS-FP-ABI-Variants.html#MIPS-FP-ABI-Variants">MIPS FP ABI Variants</a>, |
| Up: <a rel="up" accesskey="u" href="MIPS-FP-ABIs.html#MIPS-FP-ABIs">MIPS FP ABIs</a> |
| <hr> |
| </div> |
| |
| <h5 class="subsubsection">9.27.9.3 Automatic selection of FP ABI</h5> |
| |
| <p><a name="index-g_t_0040code_007b_002emodule-fp_003d_0040var_007bnn_007d_007d-directive_002c-MIPS-1595"></a>In order to simplify and add safety to the process of selecting the |
| correct floating-point ABI, the assembler will automatically infer the |
| correct <code>.gnu_attribute 4, </code><var>n</var> directive based on command-line |
| options and <code>.module</code> overrides. Where an explicit |
| <code>.gnu_attribute 4, </code><var>n</var> directive has been seen then a warning |
| will be raised if it does not match an inferred setting. |
| |
| <p>The floating-point ABI is inferred as follows. If ‘<samp><span class="samp">-msoft-float</span></samp>’ |
| has been used the module will be marked as soft-float. If |
| ‘<samp><span class="samp">-msingle-float</span></samp>’ has been used then the module will be marked as |
| single-precision. The remaining ABIs are then selected based |
| on the FP register width. Double-precision is selected if the width |
| of GP and FP registers match and the special double-precision variants |
| for 32-bit ABIs are then selected depending on ‘<samp><span class="samp">-mfpxx</span></samp>’, |
| ‘<samp><span class="samp">-mfp64</span></samp>’ and ‘<samp><span class="samp">-mno-odd-spreg</span></samp>’. |
| |
| </body></html> |
| |