github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/internal/native/neon/validate_utf8_fast_arm64.s (about) 1 // +build !noasm !appengine 2 // Code generated by asm2asm, DO NOT EDIT. 3 4 #include "go_asm.h" 5 #include "funcdata.h" 6 #include "textflag.h" 7 8 TEXT ·__validate_utf8_fast_entry__(SB), NOSPLIT, $32 9 NO_LOCAL_POINTERS 10 WORD $0x100000a0 // adr x0, .+20 11 MOVD R0, ret(FP) 12 RET 13 // .p2align 2, 0x00 14 _validate_utf8_fast: 15 WORD $0xd100c3ff // sub sp, sp, #48 16 WORD $0xa901fbfd // stp fp, lr, [sp, #24] 17 WORD $0xa93ffbfd // stp fp, lr, [sp, #-8] 18 WORD $0xd10023fd // sub fp, sp, #8 19 WORD $0xa9402408 // ldp x8, x9, [x0] 20 WORD $0x8b090109 // add x9, x8, x9 21 WORD $0xd1000d2b // sub x11, x9, #3 22 WORD $0xeb0b011f // cmp x8, x11 23 WORD $0x54000622 // b.hs LBB0_13 $196(%rip) 24 WORD $0x52981e0c // mov w12, #49392 25 WORD $0x72a0180c // movk w12, #192, lsl #16 26 WORD $0x52901c0d // mov w13, #32992 27 WORD $0x72a0100d // movk w13, #128, lsl #16 28 WORD $0x528401ee // mov w14, #8207 29 WORD $0x528401af // mov w15, #8205 30 WORD $0x52981c10 // mov w16, #49376 31 WORD $0x52901811 // mov w17, #32960 32 WORD $0x52981f00 // mov w0, #49400 33 WORD $0x72b81800 // movk w0, #49344, lsl #16 34 WORD $0x528600e1 // mov w1, #12295 35 WORD $0x52901e02 // mov w2, #33008 36 WORD $0x72b01002 // movk w2, #32896, lsl #16 37 WORD $0x52860063 // mov w3, #12291 38 WORD $0xaa0803ea // mov x10, x8 39 WORD $0x14000005 // b LBB0_4 $20(%rip) 40 LBB0_2: 41 WORD $0x52800025 // mov w5, #1 42 LBB0_3: 43 WORD $0x8b05014a // add x10, x10, x5 44 WORD $0xeb0b015f // cmp x10, x11 45 WORD $0x540003c2 // b.hs LBB0_14 $120(%rip) 46 LBB0_4: 47 WORD $0x39c00144 // ldrsb w4, [x10] 48 WORD $0x36ffff64 // tbz w4, #31, LBB0_2 $-20(%rip) 49 WORD $0xb9400144 // ldr w4, [x10] 50 WORD $0x0a0c0085 // and w5, w4, w12 51 WORD $0x6b0d00bf // cmp w5, w13 52 WORD $0x0a0e0085 // and w5, w4, w14 53 WORD $0x7a4f00a4 // ccmp w5, w15, #4, eq 54 WORD $0x7a4018a4 // ccmp w5, #0, #4, ne 55 WORD $0x54000241 // b.ne LBB0_12 $72(%rip) 56 WORD $0x0a100085 // and w5, w4, w16 57 WORD $0x121f0c86 // and w6, w4, #0x1e 58 WORD $0x6b1100bf // cmp w5, w17 59 WORD $0x7a4008c4 // ccmp w6, #0, #4, eq 60 WORD $0x54000161 // b.ne LBB0_11 $44(%rip) 61 WORD $0x0a000085 // and w5, w4, w0 62 WORD $0x6b0200bf // cmp w5, w2 63 WORD $0x54000981 // b.ne LBB0_30 $304(%rip) 64 WORD $0x0a010085 // and w5, w4, w1 65 WORD $0x34000945 // cbz w5, LBB0_30 $296(%rip) 66 WORD $0x52800085 // mov w5, #4 67 WORD $0x3617fd24 // tbz w4, #2, LBB0_3 $-92(%rip) 68 WORD $0x0a030084 // and w4, w4, w3 69 WORD $0x34fffce4 // cbz w4, LBB0_3 $-100(%rip) 70 WORD $0x14000045 // b LBB0_30 $276(%rip) 71 LBB0_11: 72 WORD $0x52800045 // mov w5, #2 73 WORD $0x17ffffe4 // b LBB0_3 $-112(%rip) 74 LBB0_12: 75 WORD $0x52800065 // mov w5, #3 76 WORD $0x17ffffe2 // b LBB0_3 $-120(%rip) 77 LBB0_13: 78 WORD $0xaa0803ea // mov x10, x8 79 LBB0_14: 80 WORD $0xeb09015f // cmp x10, x9 81 WORD $0x54000742 // b.hs LBB0_29 $232(%rip) 82 WORD $0x52981e0b // mov w11, #49392 83 WORD $0x72a0180b // movk w11, #192, lsl #16 84 WORD $0x52901c0c // mov w12, #32992 85 WORD $0x72a0100c // movk w12, #128, lsl #16 86 WORD $0x528401ed // mov w13, #8207 87 WORD $0x528401ae // mov w14, #8205 88 WORD $0x52981c0f // mov w15, #49376 89 WORD $0x52901810 // mov w16, #32960 90 WORD $0x14000004 // b LBB0_18 $16(%rip) 91 LBB0_16: 92 WORD $0x9100054a // add x10, x10, #1 93 LBB0_17: 94 WORD $0xeb09015f // cmp x10, x9 95 WORD $0x540005c2 // b.hs LBB0_29 $184(%rip) 96 LBB0_18: 97 WORD $0x39c00151 // ldrsb w17, [x10] 98 WORD $0x36ffff91 // tbz w17, #31, LBB0_16 $-16(%rip) 99 WORD $0x390053ff // strb wzr, [sp, #20] 100 WORD $0x39004bff // strb wzr, [sp, #18] 101 WORD $0xcb0a0122 // sub x2, x9, x10 102 WORD $0xf1000844 // subs x4, x2, #2 103 WORD $0x540001a3 // b.lo LBB0_22 $52(%rip) 104 WORD $0x39400151 // ldrb w17, [x10] 105 WORD $0x39400540 // ldrb w0, [x10, #1] 106 WORD $0x390053f1 // strb w17, [sp, #20] 107 WORD $0x91000943 // add x3, x10, #2 108 WORD $0x91004be1 // add x1, sp, #18 109 WORD $0xaa0403e2 // mov x2, x4 110 WORD $0xb4000164 // cbz x4, LBB0_23 $44(%rip) 111 LBB0_21: 112 WORD $0x39400071 // ldrb w17, [x3] 113 WORD $0x39000031 // strb w17, [x1] 114 WORD $0x394053f1 // ldrb w17, [sp, #20] 115 WORD $0x39404be1 // ldrb w1, [sp, #18] 116 WORD $0x14000007 // b LBB0_24 $28(%rip) 117 LBB0_22: 118 WORD $0x52800011 // mov w17, #0 119 WORD $0x52800000 // mov w0, #0 120 WORD $0x910053e1 // add x1, sp, #20 121 WORD $0xaa0a03e3 // mov x3, x10 122 WORD $0xb5fffee2 // cbnz x2, LBB0_21 $-36(%rip) 123 LBB0_23: 124 WORD $0x52800001 // mov w1, #0 125 LBB0_24: 126 WORD $0x53185c00 // lsl w0, w0, #8 127 WORD $0x2a014000 // orr w0, w0, w1, lsl #16 128 WORD $0x2a110000 // orr w0, w0, w17 129 WORD $0x0a0b0001 // and w1, w0, w11 130 WORD $0x6b0c003f // cmp w1, w12 131 WORD $0x0a0d0001 // and w1, w0, w13 132 WORD $0x7a4e0024 // ccmp w1, w14, #4, eq 133 WORD $0x7a401824 // ccmp w1, #0, #4, ne 134 WORD $0x54000121 // b.ne LBB0_28 $36(%rip) 135 WORD $0x721f0e3f // tst w17, #0x1e 136 WORD $0x540001c0 // b.eq LBB0_30 $56(%rip) 137 WORD $0x0a0f0011 // and w17, w0, w15 138 WORD $0x6b10023f // cmp w17, w16 139 WORD $0x54000161 // b.ne LBB0_30 $44(%rip) 140 WORD $0x52800051 // mov w17, #2 141 WORD $0x8b11014a // add x10, x10, x17 142 WORD $0x17ffffd5 // b LBB0_17 $-172(%rip) 143 LBB0_28: 144 WORD $0x52800071 // mov w17, #3 145 WORD $0x8b11014a // add x10, x10, x17 146 WORD $0x17ffffd2 // b LBB0_17 $-184(%rip) 147 LBB0_29: 148 WORD $0xd2800000 // mov x0, #0 149 WORD $0xa941fbfd // ldp fp, lr, [sp, #24] 150 WORD $0x9100c3ff // add sp, sp, #48 151 WORD $0xd65f03c0 // ret 152 LBB0_30: 153 WORD $0xaa2a03e9 // mvn x9, x10 154 WORD $0x8b080120 // add x0, x9, x8 155 WORD $0xa941fbfd // ldp fp, lr, [sp, #24] 156 WORD $0x9100c3ff // add sp, sp, #48 157 WORD $0xd65f03c0 // ret 158 // .p2align 2, 0x00 159 _MASK_USE_NUMBER: 160 WORD $0x00000002 // .long 2 161 162 TEXT ·__validate_utf8_fast(SB), NOSPLIT, $0-16 163 NO_LOCAL_POINTERS 164 165 _entry: 166 MOVD 16(g), R16 167 SUB $112, RSP, R17 168 CMP R16, R17 169 BLS _stack_grow 170 171 _validate_utf8_fast: 172 MOVD s+0(FP), R0 173 MOVD ·_subr__validate_utf8_fast(SB), R11 174 WORD $0x1000005e // adr x30, .+8 175 JMP (R11) 176 MOVD R0, ret+8(FP) 177 RET 178 179 _stack_grow: 180 MOVD R30, R3 181 CALL runtime·morestack_noctxt<>(SB) 182 JMP _entry