]>
Commit | Line | Data |
---|---|---|
217b3ac0 AB |
1 | //\r |
2 | // Copyright (c) 2016, Linaro Limited\r | |
3 | // All rights reserved.\r | |
4 | //\r | |
5 | // Redistribution and use in source and binary forms, with or without\r | |
6 | // modification, are permitted provided that the following conditions are met:\r | |
7 | // * Redistributions of source code must retain the above copyright\r | |
8 | // notice, this list of conditions and the following disclaimer.\r | |
9 | // * Redistributions in binary form must reproduce the above copyright\r | |
10 | // notice, this list of conditions and the following disclaimer in the\r | |
11 | // documentation and/or other materials provided with the distribution.\r | |
12 | // * Neither the name of the Linaro nor the\r | |
13 | // names of its contributors may be used to endorse or promote products\r | |
14 | // derived from this software without specific prior written permission.\r | |
15 | //\r | |
16 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r | |
17 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r | |
18 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r | |
19 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r | |
20 | // HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r | |
21 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r | |
22 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r | |
23 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r | |
24 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r | |
25 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r | |
26 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r | |
27 | //\r | |
28 | \r | |
29 | .text\r | |
30 | .thumb\r | |
31 | .syntax unified\r | |
32 | .align 5\r | |
33 | ASM_GLOBAL ASM_PFX(InternalMemCompareGuid)\r | |
34 | ASM_PFX(InternalMemCompareGuid):\r | |
35 | push {r4, lr}\r | |
36 | ldr r2, [r0]\r | |
37 | ldr r3, [r0, #4]\r | |
38 | ldr r4, [r0, #8]\r | |
39 | ldr r0, [r0, #12]\r | |
40 | cbz r1, 1f\r | |
41 | ldr ip, [r1]\r | |
42 | ldr lr, [r1, #4]\r | |
43 | cmp r2, ip\r | |
44 | it eq\r | |
eab26788 | 45 | cmpeq.n r3, lr\r |
217b3ac0 AB |
46 | beq 0f\r |
47 | movs r0, #0\r | |
48 | pop {r4, pc}\r | |
49 | \r | |
50 | 0: ldr r2, [r1, #8]\r | |
51 | ldr r3, [r1, #12]\r | |
52 | cmp r4, r2\r | |
53 | it eq\r | |
eab26788 | 54 | cmpeq.n r0, r3\r |
217b3ac0 AB |
55 | bne 2f\r |
56 | movs r0, #1\r | |
57 | pop {r4, pc}\r | |
58 | \r | |
59 | 1: orrs r2, r2, r3\r | |
60 | orrs r4, r4, r0\r | |
61 | movs r0, #1\r | |
62 | orrs r2, r2, r4\r | |
63 | 2: it ne\r | |
eab26788 | 64 | movne.n r0, #0\r |
217b3ac0 | 65 | pop {r4, pc}\r |