2016-09-16 12:25:52 +02:00
|
|
|
//
|
|
|
|
// Copyright (c) 2016, Linaro Limited
|
|
|
|
// All rights reserved.
|
2020-08-04 20:46:44 +02:00
|
|
|
// SPDX-License-Identifier: BSD-2-Clause-Patent
|
2016-09-16 12:25:52 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
.text
|
|
|
|
.thumb
|
|
|
|
.syntax unified
|
|
|
|
.align 5
|
2018-12-12 11:04:44 +01:00
|
|
|
.type ASM_PFX(InternalMemCompareGuid), %function
|
2016-09-16 12:25:52 +02:00
|
|
|
ASM_GLOBAL ASM_PFX(InternalMemCompareGuid)
|
|
|
|
ASM_PFX(InternalMemCompareGuid):
|
|
|
|
push {r4, lr}
|
|
|
|
ldr r2, [r0]
|
|
|
|
ldr r3, [r0, #4]
|
|
|
|
ldr r4, [r0, #8]
|
|
|
|
ldr r0, [r0, #12]
|
|
|
|
cbz r1, 1f
|
|
|
|
ldr ip, [r1]
|
|
|
|
ldr lr, [r1, #4]
|
|
|
|
cmp r2, ip
|
|
|
|
it eq
|
2016-09-27 00:55:05 +02:00
|
|
|
cmpeq.n r3, lr
|
2016-09-16 12:25:52 +02:00
|
|
|
beq 0f
|
|
|
|
movs r0, #0
|
|
|
|
pop {r4, pc}
|
|
|
|
|
|
|
|
0: ldr r2, [r1, #8]
|
|
|
|
ldr r3, [r1, #12]
|
|
|
|
cmp r4, r2
|
|
|
|
it eq
|
2016-09-27 00:55:05 +02:00
|
|
|
cmpeq.n r0, r3
|
2016-09-16 12:25:52 +02:00
|
|
|
bne 2f
|
|
|
|
movs r0, #1
|
|
|
|
pop {r4, pc}
|
|
|
|
|
|
|
|
1: orrs r2, r2, r3
|
|
|
|
orrs r4, r4, r0
|
|
|
|
movs r0, #1
|
|
|
|
orrs r2, r2, r4
|
|
|
|
2: it ne
|
2016-09-27 00:55:05 +02:00
|
|
|
movne.n r0, #0
|
2016-09-16 12:25:52 +02:00
|
|
|
pop {r4, pc}
|