Home | History | Annotate | Download | only in Arm
      1 //------------------------------------------------------------------------------
      2 //
      3 // Copyright (c) 2015, Linaro Limited. All rights reserved.
      4 //
      5 // This program and the accompanying materials
      6 // are licensed and made available under the terms and conditions of the BSD License
      7 // which accompanies this distribution.  The full text of the license may be found at
      8 // http://opensource.org/licenses/bsd-license.php
      9 //
     10 // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11 // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 //
     13 //------------------------------------------------------------------------------
     14 
     15     EXPORT      __aeabi_cfrcmple
     16     EXPORT      __aeabi_cfcmpeq
     17     EXPORT      __aeabi_cfcmple
     18     IMPORT      _softfloat_float32_eq
     19     IMPORT      _softfloat_float32_lt
     20 
     21     AREA        __aeabi_cfcmp, CODE, READONLY
     22     PRESERVE8
     23 
     24 __aeabi_cfrcmple
     25     MOV         IP, R0
     26     MOV         R0, R1
     27     MOV         R1, IP
     28 
     29 __aeabi_cfcmpeq
     30 __aeabi_cfcmple
     31     PUSH        {R0 - R3, IP, LR}
     32     BL          _softfloat_float32_eq
     33     SUB         IP, R0, #1
     34     CMP         IP, #0                  // sets C and Z if R0 == 1
     35     POPEQ       {R0 - R3, IP, PC}
     36 
     37     LDM         SP, {R0 - R1}
     38     BL          _softfloat_float32_lt
     39     SUB         IP, R0, #1
     40     CMP         IP, #1                  // sets C if R0 == 0
     41     POP         {R0 - R3, IP, PC}
     42 
     43     END
     44