track total size of static array and Unit/Class/Func
[hiphop-php.git] / hphp / runtime / base / string-data-arm.S
blobbb901ec4b04903b4040f3395c00250ea286b7426
1 #include "hphp/runtime/base/string-data-macros.h"
2 #include "hphp/util/etch-helpers.h"
3 #include "hphp/util/hphp-config.h"
5 #if defined(ENABLE_AARCH64_CRC) && !defined(NO_HWCRC) && defined(NO_M_DATA) && \
6     !defined(_MSC_VER)
8         .file     "hphp/runtime/base/string-data-arm.S"
11  * HPHP::StringData::hashHelper() is defined here only when ENABLE_AARCH64_CRC
12  * is explicitly specified, and NO_M_DATA is used in StringData.
13  */
15 ETCH_SECTION(_ZNK4HPHP10StringData10hashHelperEv)
16 .globl    _ZNK4HPHP10StringData10hashHelperEv
17 ETCH_TYPE(_ZNK4HPHP10StringData10hashHelperEv, @function)
18 ETCH_ALIGN16
19 _ZNK4HPHP10StringData10hashHelperEv:
20         CFI(startproc)
21         ldr     w3, [x0, #SD_LEN]
22         add     x13, x0, #SD_HASH
23         mov     w9, #-1
24         ldr     w10, [x13]
25         cbz     x3, ETCH_LABEL(hend)
26         neg     x3, x3
27         add     x2, x0, #SD_DATA
28         mov     x11, #0xdfdfdfdfdfdfdfdf
29         b       ETCH_LABEL(hheader)
31 ETCH_LABEL(hloop):
32         crc32cx w9, w9, x1
33 ETCH_LABEL(hheader):
34         ldr     x12, [x2], #8
35         and     x1, x11, x12
36         adds    x3, x3, #8
37         bcc     ETCH_LABEL(hloop)
39         lsl     w3, w3, #3
40         lsl     x1, x1, x3
41         crc32cx w9, w9, x1
43 ETCH_LABEL(hend):
44         lsr     w0, w9, #1
45         orr     w10, w10, w0
46         str     w10, [x13]
47         ret
48         CFI(endproc)
49 ETCH_SIZE(_ZNK4HPHP10StringData10hashHelperEv)
51 #endif