github.com/bytedance/sonic@v1.11.7-0.20240517092252-d2edb31b167b/internal/native/avx/validate_utf8_fast_text_amd64.go (about) 1 // +build amd64 2 // Code generated by asm2asm, DO NOT EDIT. 3 4 package avx 5 6 var _text_validate_utf8_fast = []byte{ 7 // .p2align 4, 0x90 8 // _validate_utf8_fast 9 0x55, // pushq %rbp 10 0x48, 0x89, 0xe5, //0x00000001 movq %rsp, %rbp 11 0x53, //0x00000004 pushq %rbx 12 0x50, //0x00000005 pushq %rax 13 0x4c, 0x8b, 0x17, //0x00000006 movq (%rdi), %r10 14 0x4c, 0x8b, 0x5f, 0x08, //0x00000009 movq $8(%rdi), %r11 15 0x4b, 0x8d, 0x74, 0x1a, 0xfd, //0x0000000d leaq $-3(%r10,%r11), %rsi 16 0x4c, 0x89, 0xd0, //0x00000012 movq %r10, %rax 17 0x49, 0x39, 0xf2, //0x00000015 cmpq %rsi, %r10 18 0x0f, 0x83, 0xe0, 0x00, 0x00, 0x00, //0x00000018 jae LBB0_14 19 0x4c, 0x89, 0xd0, //0x0000001e movq %r10, %rax 20 0xe9, 0x16, 0x00, 0x00, 0x00, //0x00000021 jmp LBB0_3 21 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, //0x00000026 .p2align 4, 0x90 22 //0x00000030 LBB0_2 23 0x48, 0x01, 0xd0, //0x00000030 addq %rdx, %rax 24 0x48, 0x39, 0xf0, //0x00000033 cmpq %rsi, %rax 25 0x0f, 0x83, 0xc2, 0x00, 0x00, 0x00, //0x00000036 jae LBB0_14 26 //0x0000003c LBB0_3 27 0xba, 0x01, 0x00, 0x00, 0x00, //0x0000003c movl $1, %edx 28 0x80, 0x38, 0x00, //0x00000041 cmpb $0, (%rax) 29 0x0f, 0x89, 0xe6, 0xff, 0xff, 0xff, //0x00000044 jns LBB0_2 30 0x8b, 0x38, //0x0000004a movl (%rax), %edi 31 0x89, 0xf9, //0x0000004c movl %edi, %ecx 32 0x81, 0xe1, 0xf0, 0xc0, 0xc0, 0x00, //0x0000004e andl $12632304, %ecx 33 0x81, 0xf9, 0xe0, 0x80, 0x80, 0x00, //0x00000054 cmpl $8421600, %ecx 34 0x0f, 0x85, 0x30, 0x00, 0x00, 0x00, //0x0000005a jne LBB0_7 35 0x89, 0xf9, //0x00000060 movl %edi, %ecx 36 0x81, 0xe1, 0x0f, 0x20, 0x00, 0x00, //0x00000062 andl $8207, %ecx 37 0x81, 0xf9, 0x0d, 0x20, 0x00, 0x00, //0x00000068 cmpl $8205, %ecx 38 0x0f, 0x84, 0x1c, 0x00, 0x00, 0x00, //0x0000006e je LBB0_7 39 0xba, 0x03, 0x00, 0x00, 0x00, //0x00000074 movl $3, %edx 40 0x85, 0xc9, //0x00000079 testl %ecx, %ecx 41 0x0f, 0x85, 0xaf, 0xff, 0xff, 0xff, //0x0000007b jne LBB0_2 42 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, //0x00000081 .p2align 4, 0x90 43 //0x00000090 LBB0_7 44 0x89, 0xf9, //0x00000090 movl %edi, %ecx 45 0x81, 0xe1, 0xe0, 0xc0, 0x00, 0x00, //0x00000092 andl $49376, %ecx 46 0x81, 0xf9, 0xc0, 0x80, 0x00, 0x00, //0x00000098 cmpl $32960, %ecx 47 0x0f, 0x85, 0x10, 0x00, 0x00, 0x00, //0x0000009e jne LBB0_9 48 0x89, 0xf9, //0x000000a4 movl %edi, %ecx 49 0xba, 0x02, 0x00, 0x00, 0x00, //0x000000a6 movl $2, %edx 50 0x83, 0xe1, 0x1e, //0x000000ab andl $30, %ecx 51 0x0f, 0x85, 0x7c, 0xff, 0xff, 0xff, //0x000000ae jne LBB0_2 52 //0x000000b4 LBB0_9 53 0x89, 0xf9, //0x000000b4 movl %edi, %ecx 54 0x81, 0xe1, 0xf8, 0xc0, 0xc0, 0xc0, //0x000000b6 andl $-1061109512, %ecx 55 0x81, 0xf9, 0xf0, 0x80, 0x80, 0x80, //0x000000bc cmpl $-2139062032, %ecx 56 0x0f, 0x85, 0x29, 0x00, 0x00, 0x00, //0x000000c2 jne LBB0_13 57 0x89, 0xf9, //0x000000c8 movl %edi, %ecx 58 0x81, 0xe1, 0x07, 0x30, 0x00, 0x00, //0x000000ca andl $12295, %ecx 59 0x0f, 0x84, 0x1b, 0x00, 0x00, 0x00, //0x000000d0 je LBB0_13 60 0xba, 0x04, 0x00, 0x00, 0x00, //0x000000d6 movl $4, %edx 61 0x40, 0xf6, 0xc7, 0x04, //0x000000db testb $4, %dil 62 0x0f, 0x84, 0x4b, 0xff, 0xff, 0xff, //0x000000df je LBB0_2 63 0x81, 0xe7, 0x03, 0x30, 0x00, 0x00, //0x000000e5 andl $12291, %edi 64 0x0f, 0x84, 0x3f, 0xff, 0xff, 0xff, //0x000000eb je LBB0_2 65 //0x000000f1 LBB0_13 66 0x48, 0xf7, 0xd0, //0x000000f1 notq %rax 67 0x4c, 0x01, 0xd0, //0x000000f4 addq %r10, %rax 68 0x48, 0x83, 0xc4, 0x08, //0x000000f7 addq $8, %rsp 69 0x5b, //0x000000fb popq %rbx 70 0x5d, //0x000000fc popq %rbp 71 0xc3, //0x000000fd retq 72 //0x000000fe LBB0_14 73 0x4d, 0x01, 0xd3, //0x000000fe addq %r10, %r11 74 0x4c, 0x39, 0xd8, //0x00000101 cmpq %r11, %rax 75 0x0f, 0x83, 0x03, 0x01, 0x00, 0x00, //0x00000104 jae LBB0_30 76 0x4c, 0x8d, 0x45, 0xf4, //0x0000010a leaq $-12(%rbp), %r8 77 0x4c, 0x8d, 0x4d, 0xf2, //0x0000010e leaq $-14(%rbp), %r9 78 0xe9, 0x15, 0x00, 0x00, 0x00, //0x00000112 jmp LBB0_17 79 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, //0x00000117 .p2align 4, 0x90 80 //0x00000120 LBB0_16 81 0x48, 0xff, 0xc0, //0x00000120 incq %rax 82 0x4c, 0x39, 0xd8, //0x00000123 cmpq %r11, %rax 83 0x0f, 0x83, 0xe1, 0x00, 0x00, 0x00, //0x00000126 jae LBB0_30 84 //0x0000012c LBB0_17 85 0x80, 0x38, 0x00, //0x0000012c cmpb $0, (%rax) 86 0x0f, 0x89, 0xeb, 0xff, 0xff, 0xff, //0x0000012f jns LBB0_16 87 0xc6, 0x45, 0xf4, 0x00, //0x00000135 movb $0, $-12(%rbp) 88 0xc6, 0x45, 0xf2, 0x00, //0x00000139 movb $0, $-14(%rbp) 89 0x4c, 0x89, 0xda, //0x0000013d movq %r11, %rdx 90 0x48, 0x29, 0xc2, //0x00000140 subq %rax, %rdx 91 0x48, 0x83, 0xfa, 0x02, //0x00000143 cmpq $2, %rdx 92 0x0f, 0x82, 0x31, 0x00, 0x00, 0x00, //0x00000147 jb LBB0_21 93 0x0f, 0xb6, 0x30, //0x0000014d movzbl (%rax), %esi 94 0x0f, 0xb6, 0x78, 0x01, //0x00000150 movzbl $1(%rax), %edi 95 0x40, 0x88, 0x75, 0xf4, //0x00000154 movb %sil, $-12(%rbp) 96 0x48, 0x8d, 0x48, 0x02, //0x00000158 leaq $2(%rax), %rcx 97 0x48, 0x83, 0xc2, 0xfe, //0x0000015c addq $-2, %rdx 98 0x4c, 0x89, 0xcb, //0x00000160 movq %r9, %rbx 99 0x48, 0x85, 0xd2, //0x00000163 testq %rdx, %rdx 100 0x0f, 0x84, 0x25, 0x00, 0x00, 0x00, //0x00000166 je LBB0_22 101 //0x0000016c LBB0_20 102 0x0f, 0xb6, 0x09, //0x0000016c movzbl (%rcx), %ecx 103 0x88, 0x0b, //0x0000016f movb %cl, (%rbx) 104 0x0f, 0xb6, 0x75, 0xf4, //0x00000171 movzbl $-12(%rbp), %esi 105 0x0f, 0xb6, 0x4d, 0xf2, //0x00000175 movzbl $-14(%rbp), %ecx 106 0xe9, 0x15, 0x00, 0x00, 0x00, //0x00000179 jmp LBB0_23 107 //0x0000017e LBB0_21 108 0x31, 0xf6, //0x0000017e xorl %esi, %esi 109 0x31, 0xff, //0x00000180 xorl %edi, %edi 110 0x4c, 0x89, 0xc3, //0x00000182 movq %r8, %rbx 111 0x48, 0x89, 0xc1, //0x00000185 movq %rax, %rcx 112 0x48, 0x85, 0xd2, //0x00000188 testq %rdx, %rdx 113 0x0f, 0x85, 0xdb, 0xff, 0xff, 0xff, //0x0000018b jne LBB0_20 114 //0x00000191 LBB0_22 115 0x31, 0xc9, //0x00000191 xorl %ecx, %ecx 116 //0x00000193 LBB0_23 117 0x0f, 0xb6, 0xc9, //0x00000193 movzbl %cl, %ecx 118 0xc1, 0xe1, 0x10, //0x00000196 shll $16, %ecx 119 0x40, 0x0f, 0xb6, 0xff, //0x00000199 movzbl %dil, %edi 120 0xc1, 0xe7, 0x08, //0x0000019d shll $8, %edi 121 0x40, 0x0f, 0xb6, 0xd6, //0x000001a0 movzbl %sil, %edx 122 0x09, 0xfa, //0x000001a4 orl %edi, %edx 123 0x09, 0xd1, //0x000001a6 orl %edx, %ecx 124 0x81, 0xe1, 0xf0, 0xc0, 0xc0, 0x00, //0x000001a8 andl $12632304, %ecx 125 0x81, 0xf9, 0xe0, 0x80, 0x80, 0x00, //0x000001ae cmpl $8421600, %ecx 126 0x0f, 0x85, 0x26, 0x00, 0x00, 0x00, //0x000001b4 jne LBB0_26 127 0x89, 0xd7, //0x000001ba movl %edx, %edi 128 0x81, 0xe7, 0x0f, 0x20, 0x00, 0x00, //0x000001bc andl $8207, %edi 129 0x81, 0xff, 0x0d, 0x20, 0x00, 0x00, //0x000001c2 cmpl $8205, %edi 130 0x0f, 0x84, 0x12, 0x00, 0x00, 0x00, //0x000001c8 je LBB0_26 131 0xb9, 0x03, 0x00, 0x00, 0x00, //0x000001ce movl $3, %ecx 132 0x85, 0xff, //0x000001d3 testl %edi, %edi 133 0x0f, 0x85, 0x26, 0x00, 0x00, 0x00, //0x000001d5 jne LBB0_28 134 0x90, 0x90, 0x90, 0x90, 0x90, //0x000001db .p2align 4, 0x90 135 //0x000001e0 LBB0_26 136 0x40, 0xf6, 0xc6, 0x1e, //0x000001e0 testb $30, %sil 137 0x0f, 0x84, 0x07, 0xff, 0xff, 0xff, //0x000001e4 je LBB0_13 138 0x81, 0xe2, 0xe0, 0xc0, 0x00, 0x00, //0x000001ea andl $49376, %edx 139 0xb9, 0x02, 0x00, 0x00, 0x00, //0x000001f0 movl $2, %ecx 140 0x81, 0xfa, 0xc0, 0x80, 0x00, 0x00, //0x000001f5 cmpl $32960, %edx 141 0x0f, 0x85, 0xf0, 0xfe, 0xff, 0xff, //0x000001fb jne LBB0_13 142 //0x00000201 LBB0_28 143 0x48, 0x01, 0xc8, //0x00000201 addq %rcx, %rax 144 0x4c, 0x39, 0xd8, //0x00000204 cmpq %r11, %rax 145 0x0f, 0x82, 0x1f, 0xff, 0xff, 0xff, //0x00000207 jb LBB0_17 146 //0x0000020d LBB0_30 147 0x31, 0xc0, //0x0000020d xorl %eax, %eax 148 0x48, 0x83, 0xc4, 0x08, //0x0000020f addq $8, %rsp 149 0x5b, //0x00000213 popq %rbx 150 0x5d, //0x00000214 popq %rbp 151 0xc3, //0x00000215 retq 152 0x00, 0x00, //0x00000216 .p2align 2, 0x00 153 //0x00000218 _MASK_USE_NUMBER 154 0x02, 0x00, 0x00, 0x00, //0x00000218 .long 2 155 } 156