validate_utf8_arm64.s raw

   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_entry__(SB), NOSPLIT, $48
   9  	NO_LOCAL_POINTERS
  10  	WORD $0x100000a0 // adr x0, .+20
  11  	MOVD R0, ret(FP)
  12  	RET
  13  	  // .p2align 2, 0x00
  14  _validate_utf8:
  15  	WORD $0xd10103ff  // sub	sp, sp, #64
  16  	WORD $0xa901cff4  // stp	x20, x19, [sp, #24]
  17  	WORD $0xa902fbfd  // stp	fp, lr, [sp, #40]
  18  	WORD $0xa93ffbfd  // stp	fp, lr, [sp, #-8]
  19  	WORD $0xd10023fd  // sub	fp, sp, #8
  20  	WORD $0xa9402408  // ldp	x8, x9, [x0]
  21  	WORD $0xf940002c  // ldr	x12, [x1]
  22  	WORD $0x8b09010a  // add	x10, x8, x9
  23  	WORD $0xd1000d4b  // sub	x11, x10, #3
  24  	WORD $0x8b0c0109  // add	x9, x8, x12
  25  	WORD $0xeb0b013f  // cmp	x9, x11
  26  	WORD $0x54000722  // b.hs	LBB0_15 $228(%rip)
  27  	WORD $0x52981e0c  // mov	w12, #49392
  28  	WORD $0x72a0180c  // movk	w12, #192, lsl #16
  29  	WORD $0x52901c0d  // mov	w13, #32992
  30  	WORD $0x72a0100d  // movk	w13, #128, lsl #16
  31  	WORD $0x9100204e  // add	x14, x2, #8
  32  	WORD $0x528401ef  // mov	w15, #8207
  33  	WORD $0x528401b0  // mov	w16, #8205
  34  	WORD $0x52981c11  // mov	w17, #49376
  35  	WORD $0x52901800  // mov	w0, #32960
  36  	WORD $0x52981f03  // mov	w3, #49400
  37  	WORD $0x72b81803  // movk	w3, #49344, lsl #16
  38  	WORD $0x528600e4  // mov	w4, #12295
  39  	WORD $0x52901e05  // mov	w5, #33008
  40  	WORD $0x72b01005  // movk	w5, #32896, lsl #16
  41  	WORD $0x52860066  // mov	w6, #12291
  42  	WORD $0x14000005  // b	LBB0_4 $20(%rip)
  43  LBB0_2:
  44  	WORD $0x52800033  // mov	w19, #1
  45  LBB0_3:
  46  	WORD $0x8b130129  // add	x9, x9, x19
  47  	WORD $0xeb0b013f  // cmp	x9, x11
  48  	WORD $0x540004a2  // b.hs	LBB0_15 $148(%rip)
  49  LBB0_4:
  50  	WORD $0x39c00127  // ldrsb	w7, [x9]
  51  	WORD $0x36ffff67  // tbz	w7, #31, LBB0_2 $-20(%rip)
  52  	WORD $0xb9400127  // ldr	w7, [x9]
  53  	WORD $0x0a0c00f3  // and	w19, w7, w12
  54  	WORD $0x6b0d027f  // cmp	w19, w13
  55  	WORD $0x0a0f00f3  // and	w19, w7, w15
  56  	WORD $0x7a500264  // ccmp	w19, w16, #4, eq
  57  	WORD $0x7a401a64  // ccmp	w19, #0, #4, ne
  58  	WORD $0x54000341  // b.ne	LBB0_14 $104(%rip)
  59  	WORD $0x0a1100f3  // and	w19, w7, w17
  60  	WORD $0x121f0cf4  // and	w20, w7, #0x1e
  61  	WORD $0x6b00027f  // cmp	w19, w0
  62  	WORD $0x7a400a84  // ccmp	w20, #0, #4, eq
  63  	WORD $0x54000261  // b.ne	LBB0_13 $76(%rip)
  64  	WORD $0x0a0300f3  // and	w19, w7, w3
  65  	WORD $0x6b05027f  // cmp	w19, w5
  66  	WORD $0x540000e1  // b.ne	LBB0_11 $28(%rip)
  67  	WORD $0x0a0400f3  // and	w19, w7, w4
  68  	WORD $0x340000b3  // cbz	w19, LBB0_11 $20(%rip)
  69  	WORD $0x52800093  // mov	w19, #4
  70  	WORD $0x3617fd27  // tbz	w7, #2, LBB0_3 $-92(%rip)
  71  	WORD $0x0a0600e7  // and	w7, w7, w6
  72  	WORD $0x34fffce7  // cbz	w7, LBB0_3 $-100(%rip)
  73  LBB0_11:
  74  	WORD $0xcb080127  // sub	x7, x9, x8
  75  	WORD $0xf9400053  // ldr	x19, [x2]
  76  	WORD $0xf140067f  // cmp	x19, #1, lsl #12
  77  	WORD $0x54000c62  // b.hs	LBB0_33 $396(%rip)
  78  	WORD $0x93407ce7  // sxtw	x7, w7
  79  	WORD $0x91000674  // add	x20, x19, #1
  80  	WORD $0xf9000054  // str	x20, [x2]
  81  	WORD $0xf83379c7  // str	x7, [x14, x19, lsl #3]
  82  	WORD $0x17ffffdd  // b	LBB0_2 $-140(%rip)
  83  LBB0_13:
  84  	WORD $0x52800053  // mov	w19, #2
  85  	WORD $0x17ffffdc  // b	LBB0_3 $-144(%rip)
  86  LBB0_14:
  87  	WORD $0x52800073  // mov	w19, #3
  88  	WORD $0x17ffffda  // b	LBB0_3 $-152(%rip)
  89  LBB0_15:
  90  	WORD $0xeb0a013f  // cmp	x9, x10
  91  	WORD $0x54000962  // b.hs	LBB0_31 $300(%rip)
  92  	WORD $0x52981e0b  // mov	w11, #49392
  93  	WORD $0x72a0180b  // movk	w11, #192, lsl #16
  94  	WORD $0x52901c0c  // mov	w12, #32992
  95  	WORD $0x72a0100c  // movk	w12, #128, lsl #16
  96  	WORD $0x9100204d  // add	x13, x2, #8
  97  	WORD $0x528401ee  // mov	w14, #8207
  98  	WORD $0x528401af  // mov	w15, #8205
  99  	WORD $0x52981c10  // mov	w16, #49376
 100  	WORD $0x52901811  // mov	w17, #32960
 101  	WORD $0x14000004  // b	LBB0_18 $16(%rip)
 102  LBB0_17:
 103  	WORD $0x91000529  // add	x9, x9, #1
 104  	WORD $0xeb0a013f  // cmp	x9, x10
 105  	WORD $0x540007c2  // b.hs	LBB0_31 $248(%rip)
 106  LBB0_18:
 107  	WORD $0x39c00120  // ldrsb	w0, [x9]
 108  	WORD $0x36ffff80  // tbz	w0, #31, LBB0_17 $-16(%rip)
 109  	WORD $0x390053ff  // strb	wzr, [sp, #20]
 110  	WORD $0x39004bff  // strb	wzr, [sp, #18]
 111  	WORD $0xcb090145  // sub	x5, x10, x9
 112  	WORD $0xf10008a7  // subs	x7, x5, #2
 113  	WORD $0x540001a3  // b.lo	LBB0_22 $52(%rip)
 114  	WORD $0x39400120  // ldrb	w0, [x9]
 115  	WORD $0x39400523  // ldrb	w3, [x9, #1]
 116  	WORD $0x390053e0  // strb	w0, [sp, #20]
 117  	WORD $0x91000926  // add	x6, x9, #2
 118  	WORD $0x91004be4  // add	x4, sp, #18
 119  	WORD $0xaa0703e5  // mov	x5, x7
 120  	WORD $0xb4000167  // cbz	x7, LBB0_23 $44(%rip)
 121  LBB0_21:
 122  	WORD $0x394000c0  // ldrb	w0, [x6]
 123  	WORD $0x39000080  // strb	w0, [x4]
 124  	WORD $0x394053e0  // ldrb	w0, [sp, #20]
 125  	WORD $0x39404be4  // ldrb	w4, [sp, #18]
 126  	WORD $0x14000007  // b	LBB0_24 $28(%rip)
 127  LBB0_22:
 128  	WORD $0x52800000  // mov	w0, #0
 129  	WORD $0x52800003  // mov	w3, #0
 130  	WORD $0x910053e4  // add	x4, sp, #20
 131  	WORD $0xaa0903e6  // mov	x6, x9
 132  	WORD $0xb5fffee5  // cbnz	x5, LBB0_21 $-36(%rip)
 133  LBB0_23:
 134  	WORD $0x52800004  // mov	w4, #0
 135  LBB0_24:
 136  	WORD $0x53185c63  // lsl	w3, w3, #8
 137  	WORD $0x2a044063  // orr	w3, w3, w4, lsl #16
 138  	WORD $0x2a000063  // orr	w3, w3, w0
 139  	WORD $0x0a0b0064  // and	w4, w3, w11
 140  	WORD $0x6b0c009f  // cmp	w4, w12
 141  	WORD $0x0a0e0064  // and	w4, w3, w14
 142  	WORD $0x7a4f0084  // ccmp	w4, w15, #4, eq
 143  	WORD $0x7a401884  // ccmp	w4, #0, #4, ne
 144  	WORD $0x54000301  // b.ne	LBB0_30 $96(%rip)
 145  	WORD $0x721f0c1f  // tst	w0, #0x1e
 146  	WORD $0x54000120  // b.eq	LBB0_28 $36(%rip)
 147  	WORD $0x0a100060  // and	w0, w3, w16
 148  	WORD $0x6b11001f  // cmp	w0, w17
 149  	WORD $0x540000c1  // b.ne	LBB0_28 $24(%rip)
 150  	WORD $0x52800040  // mov	w0, #2
 151  	WORD $0x8b000129  // add	x9, x9, x0
 152  	WORD $0xeb0a013f  // cmp	x9, x10
 153  	WORD $0x54fffac3  // b.lo	LBB0_18 $-168(%rip)
 154  	WORD $0x14000012  // b	LBB0_31 $72(%rip)
 155  LBB0_28:
 156  	WORD $0xcb080120  // sub	x0, x9, x8
 157  	WORD $0xf9400043  // ldr	x3, [x2]
 158  	WORD $0xf140047f  // cmp	x3, #1, lsl #12
 159  	WORD $0x540002a2  // b.hs	LBB0_32 $84(%rip)
 160  	WORD $0x93407c00  // sxtw	x0, w0
 161  	WORD $0x91000464  // add	x4, x3, #1
 162  	WORD $0xf9000044  // str	x4, [x2]
 163  	WORD $0xf82379a0  // str	x0, [x13, x3, lsl #3]
 164  	WORD $0x52800020  // mov	w0, #1
 165  	WORD $0x8b000129  // add	x9, x9, x0
 166  	WORD $0xeb0a013f  // cmp	x9, x10
 167  	WORD $0x54fff923  // b.lo	LBB0_18 $-220(%rip)
 168  	WORD $0x14000005  // b	LBB0_31 $20(%rip)
 169  LBB0_30:
 170  	WORD $0x52800060  // mov	w0, #3
 171  	WORD $0x8b000129  // add	x9, x9, x0
 172  	WORD $0xeb0a013f  // cmp	x9, x10
 173  	WORD $0x54fff883  // b.lo	LBB0_18 $-240(%rip)
 174  LBB0_31:
 175  	WORD $0xd2800000  // mov	x0, #0
 176  	WORD $0xcb080128  // sub	x8, x9, x8
 177  	WORD $0xf9000028  // str	x8, [x1]
 178  	WORD $0xa942fbfd  // ldp	fp, lr, [sp, #40]
 179  	WORD $0xa941cff4  // ldp	x20, x19, [sp, #24]
 180  	WORD $0x910103ff  // add	sp, sp, #64
 181  	WORD $0xd65f03c0  // ret
 182  LBB0_32:
 183  	WORD $0xf9000020  // str	x0, [x1]
 184  	WORD $0x92800000  // mov	x0, #-1
 185  	WORD $0xa942fbfd  // ldp	fp, lr, [sp, #40]
 186  	WORD $0xa941cff4  // ldp	x20, x19, [sp, #24]
 187  	WORD $0x910103ff  // add	sp, sp, #64
 188  	WORD $0xd65f03c0  // ret
 189  LBB0_33:
 190  	WORD $0xf9000027  // str	x7, [x1]
 191  	WORD $0x92800000  // mov	x0, #-1
 192  	WORD $0xa942fbfd  // ldp	fp, lr, [sp, #40]
 193  	WORD $0xa941cff4  // ldp	x20, x19, [sp, #24]
 194  	WORD $0x910103ff  // add	sp, sp, #64
 195  	WORD $0xd65f03c0  // ret
 196  	  // .p2align 2, 0x00
 197  _MASK_USE_NUMBER:
 198  	WORD $0x00000002  // .long 2
 199  
 200  TEXT ·__validate_utf8(SB), NOSPLIT, $0-32
 201  	NO_LOCAL_POINTERS
 202  
 203  _entry:
 204  	MOVD 16(g), R16
 205  	SUB $128, RSP, R17
 206  	CMP  R16, R17
 207  	BLS  _stack_grow
 208  
 209  _validate_utf8:
 210  	MOVD s+0(FP), R0
 211  	MOVD p+8(FP), R1
 212  	MOVD m+16(FP), R2
 213  	MOVD ·_subr__validate_utf8(SB), R11
 214  	WORD $0x1000005e // adr x30, .+8
 215  	JMP (R11)
 216  	MOVD R0, ret+24(FP)
 217  	RET
 218  
 219  _stack_grow:
 220  	MOVD R30, R3
 221  	CALL runtime·morestack_noctxt<>(SB)
 222  	JMP  _entry
 223