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_cdrcmple 16 EXPORT __aeabi_cdcmpeq 17 EXPORT __aeabi_cdcmple 18 IMPORT _softfloat_float64_eq 19 IMPORT _softfloat_float64_lt 20 21 AREA __aeabi_cdcmp, CODE, READONLY 22 PRESERVE8 23 24__aeabi_cdrcmple 25 MOV IP, R0 26 MOV R0, R2 27 MOV R2, IP 28 29 MOV IP, R1 30 MOV R1, R3 31 MOV R3, IP 32 33__aeabi_cdcmpeq 34__aeabi_cdcmple 35 PUSH {R0 - R3, IP, LR} 36 BL _softfloat_float64_eq 37 SUB IP, R0, #1 38 CMP IP, #0 // sets C and Z if R0 == 1 39 POPEQ {R0 - R3, IP, PC} 40 41 LDM SP, {R0 - R3} 42 BL _softfloat_float64_lt 43 SUB IP, R0, #1 44 CMP IP, #1 // sets C if R0 == 0 45 POP {R0 - R3, IP, PC} 46 47 END 48