]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm
ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
[mirror_edk2.git] / ArmPkg / Library / ArmSoftFloatLib / Arm / __aeabi_cdcmp.asm
1 //------------------------------------------------------------------------------
2 //
3 // Copyright (c) 2015, Linaro Limited. All rights reserved.
4 //
5 // SPDX-License-Identifier: BSD-2-Clause-Patent
6 //
7 //------------------------------------------------------------------------------
8
9 EXPORT __aeabi_cdrcmple
10 EXPORT __aeabi_cdcmpeq
11 EXPORT __aeabi_cdcmple
12 IMPORT _softfloat_float64_eq
13 IMPORT _softfloat_float64_lt
14
15 AREA __aeabi_cdcmp, CODE, READONLY
16 PRESERVE8
17
18 __aeabi_cdrcmple
19 MOV IP, R0
20 MOV R0, R2
21 MOV R2, IP
22
23 MOV IP, R1
24 MOV R1, R3
25 MOV R3, IP
26
27 __aeabi_cdcmpeq
28 __aeabi_cdcmple
29 PUSH {R0 - R3, IP, LR}
30 BL _softfloat_float64_eq
31 SUB IP, R0, #1
32 CMP IP, #0 // sets C and Z if R0 == 1
33 POPEQ {R0 - R3, IP, PC}
34
35 LDM SP, {R0 - R3}
36 BL _softfloat_float64_lt
37 SUB IP, R0, #1
38 CMP IP, #1 // sets C if R0 == 0
39 POP {R0 - R3, IP, PC}
40
41 END