|
@@ -5,11 +5,11 @@
|
|
// func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// func sequenceDecs_decode_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// Requires: CMOV
|
|
// Requires: CMOV
|
|
TEXT ·sequenceDecs_decode_amd64(SB), $8-32
|
|
TEXT ·sequenceDecs_decode_amd64(SB), $8-32
|
|
- MOVQ br+8(FP), AX
|
|
|
|
- MOVQ 32(AX), DX
|
|
|
|
- MOVBQZX 40(AX), BX
|
|
|
|
- MOVQ 24(AX), SI
|
|
|
|
- MOVQ (AX), AX
|
|
|
|
|
|
+ MOVQ br+8(FP), CX
|
|
|
|
+ MOVQ 24(CX), DX
|
|
|
|
+ MOVBQZX 32(CX), BX
|
|
|
|
+ MOVQ (CX), AX
|
|
|
|
+ MOVQ 8(CX), SI
|
|
ADDQ SI, AX
|
|
ADDQ SI, AX
|
|
MOVQ AX, (SP)
|
|
MOVQ AX, (SP)
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -38,7 +38,7 @@ sequenceDecs_decode_amd64_main_loop:
|
|
|
|
|
|
sequenceDecs_decode_amd64_fill_byte_by_byte:
|
|
sequenceDecs_decode_amd64_fill_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decode_amd64_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_amd64_fill_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decode_amd64_fill_end
|
|
JLE sequenceDecs_decode_amd64_fill_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -49,6 +49,10 @@ sequenceDecs_decode_amd64_fill_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decode_amd64_fill_byte_by_byte
|
|
JMP sequenceDecs_decode_amd64_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_amd64_fill_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_amd64_fill_end:
|
|
sequenceDecs_decode_amd64_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ R9, AX
|
|
MOVQ R9, AX
|
|
@@ -105,7 +109,7 @@ sequenceDecs_decode_amd64_ml_update_zero:
|
|
|
|
|
|
sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
|
sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decode_amd64_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_amd64_fill_2_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decode_amd64_fill_2_end
|
|
JLE sequenceDecs_decode_amd64_fill_2_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -116,6 +120,10 @@ sequenceDecs_decode_amd64_fill_2_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decode_amd64_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decode_amd64_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_amd64_fill_2_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_amd64_fill_2_end:
|
|
sequenceDecs_decode_amd64_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ DI, AX
|
|
MOVQ DI, AX
|
|
@@ -293,9 +301,9 @@ sequenceDecs_decode_amd64_match_len_ofs_ok:
|
|
MOVQ R12, 152(AX)
|
|
MOVQ R12, 152(AX)
|
|
MOVQ R13, 160(AX)
|
|
MOVQ R13, 160(AX)
|
|
MOVQ br+8(FP), AX
|
|
MOVQ br+8(FP), AX
|
|
- MOVQ DX, 32(AX)
|
|
|
|
- MOVB BL, 40(AX)
|
|
|
|
- MOVQ SI, 24(AX)
|
|
|
|
|
|
+ MOVQ DX, 24(AX)
|
|
|
|
+ MOVB BL, 32(AX)
|
|
|
|
+ MOVQ SI, 8(AX)
|
|
|
|
|
|
// Return success
|
|
// Return success
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
@@ -320,18 +328,19 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
- // Return with not enough output space error
|
|
|
|
- MOVQ $0x00000005, ret+24(FP)
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// func sequenceDecs_decode_56_amd64(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// Requires: CMOV
|
|
// Requires: CMOV
|
|
TEXT ·sequenceDecs_decode_56_amd64(SB), $8-32
|
|
TEXT ·sequenceDecs_decode_56_amd64(SB), $8-32
|
|
- MOVQ br+8(FP), AX
|
|
|
|
- MOVQ 32(AX), DX
|
|
|
|
- MOVBQZX 40(AX), BX
|
|
|
|
- MOVQ 24(AX), SI
|
|
|
|
- MOVQ (AX), AX
|
|
|
|
|
|
+ MOVQ br+8(FP), CX
|
|
|
|
+ MOVQ 24(CX), DX
|
|
|
|
+ MOVBQZX 32(CX), BX
|
|
|
|
+ MOVQ (CX), AX
|
|
|
|
+ MOVQ 8(CX), SI
|
|
ADDQ SI, AX
|
|
ADDQ SI, AX
|
|
MOVQ AX, (SP)
|
|
MOVQ AX, (SP)
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -360,7 +369,7 @@ sequenceDecs_decode_56_amd64_main_loop:
|
|
|
|
|
|
sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
|
sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decode_56_amd64_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_56_amd64_fill_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decode_56_amd64_fill_end
|
|
JLE sequenceDecs_decode_56_amd64_fill_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -371,6 +380,10 @@ sequenceDecs_decode_56_amd64_fill_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decode_56_amd64_fill_byte_by_byte
|
|
JMP sequenceDecs_decode_56_amd64_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_56_amd64_fill_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_56_amd64_fill_end:
|
|
sequenceDecs_decode_56_amd64_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ R9, AX
|
|
MOVQ R9, AX
|
|
@@ -590,9 +603,9 @@ sequenceDecs_decode_56_amd64_match_len_ofs_ok:
|
|
MOVQ R12, 152(AX)
|
|
MOVQ R12, 152(AX)
|
|
MOVQ R13, 160(AX)
|
|
MOVQ R13, 160(AX)
|
|
MOVQ br+8(FP), AX
|
|
MOVQ br+8(FP), AX
|
|
- MOVQ DX, 32(AX)
|
|
|
|
- MOVB BL, 40(AX)
|
|
|
|
- MOVQ SI, 24(AX)
|
|
|
|
|
|
+ MOVQ DX, 24(AX)
|
|
|
|
+ MOVB BL, 32(AX)
|
|
|
|
+ MOVQ SI, 8(AX)
|
|
|
|
|
|
// Return success
|
|
// Return success
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
@@ -617,18 +630,19 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
- // Return with not enough output space error
|
|
|
|
- MOVQ $0x00000005, ret+24(FP)
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// func sequenceDecs_decode_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// Requires: BMI, BMI2, CMOV
|
|
// Requires: BMI, BMI2, CMOV
|
|
TEXT ·sequenceDecs_decode_bmi2(SB), $8-32
|
|
TEXT ·sequenceDecs_decode_bmi2(SB), $8-32
|
|
- MOVQ br+8(FP), CX
|
|
|
|
- MOVQ 32(CX), AX
|
|
|
|
- MOVBQZX 40(CX), DX
|
|
|
|
- MOVQ 24(CX), BX
|
|
|
|
- MOVQ (CX), CX
|
|
|
|
|
|
+ MOVQ br+8(FP), BX
|
|
|
|
+ MOVQ 24(BX), AX
|
|
|
|
+ MOVBQZX 32(BX), DX
|
|
|
|
+ MOVQ (BX), CX
|
|
|
|
+ MOVQ 8(BX), BX
|
|
ADDQ BX, CX
|
|
ADDQ BX, CX
|
|
MOVQ CX, (SP)
|
|
MOVQ CX, (SP)
|
|
MOVQ ctx+16(FP), CX
|
|
MOVQ ctx+16(FP), CX
|
|
@@ -657,7 +671,7 @@ sequenceDecs_decode_bmi2_main_loop:
|
|
|
|
|
|
sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
|
sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decode_bmi2_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_bmi2_fill_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decode_bmi2_fill_end
|
|
JLE sequenceDecs_decode_bmi2_fill_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -668,6 +682,10 @@ sequenceDecs_decode_bmi2_fill_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decode_bmi2_fill_byte_by_byte
|
|
JMP sequenceDecs_decode_bmi2_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_bmi2_fill_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_bmi2_fill_end:
|
|
sequenceDecs_decode_bmi2_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -708,7 +726,7 @@ sequenceDecs_decode_bmi2_fill_end:
|
|
|
|
|
|
sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
|
sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decode_bmi2_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_bmi2_fill_2_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decode_bmi2_fill_2_end
|
|
JLE sequenceDecs_decode_bmi2_fill_2_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -719,6 +737,10 @@ sequenceDecs_decode_bmi2_fill_2_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decode_bmi2_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decode_bmi2_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_bmi2_fill_2_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_bmi2_fill_2_end:
|
|
sequenceDecs_decode_bmi2_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -870,9 +892,9 @@ sequenceDecs_decode_bmi2_match_len_ofs_ok:
|
|
MOVQ R11, 152(CX)
|
|
MOVQ R11, 152(CX)
|
|
MOVQ R12, 160(CX)
|
|
MOVQ R12, 160(CX)
|
|
MOVQ br+8(FP), CX
|
|
MOVQ br+8(FP), CX
|
|
- MOVQ AX, 32(CX)
|
|
|
|
- MOVB DL, 40(CX)
|
|
|
|
- MOVQ BX, 24(CX)
|
|
|
|
|
|
+ MOVQ AX, 24(CX)
|
|
|
|
+ MOVB DL, 32(CX)
|
|
|
|
+ MOVQ BX, 8(CX)
|
|
|
|
|
|
// Return success
|
|
// Return success
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
@@ -897,18 +919,19 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
- // Return with not enough output space error
|
|
|
|
- MOVQ $0x00000005, ret+24(FP)
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// func sequenceDecs_decode_56_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeAsmContext) int
|
|
// Requires: BMI, BMI2, CMOV
|
|
// Requires: BMI, BMI2, CMOV
|
|
TEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32
|
|
TEXT ·sequenceDecs_decode_56_bmi2(SB), $8-32
|
|
- MOVQ br+8(FP), CX
|
|
|
|
- MOVQ 32(CX), AX
|
|
|
|
- MOVBQZX 40(CX), DX
|
|
|
|
- MOVQ 24(CX), BX
|
|
|
|
- MOVQ (CX), CX
|
|
|
|
|
|
+ MOVQ br+8(FP), BX
|
|
|
|
+ MOVQ 24(BX), AX
|
|
|
|
+ MOVBQZX 32(BX), DX
|
|
|
|
+ MOVQ (BX), CX
|
|
|
|
+ MOVQ 8(BX), BX
|
|
ADDQ BX, CX
|
|
ADDQ BX, CX
|
|
MOVQ CX, (SP)
|
|
MOVQ CX, (SP)
|
|
MOVQ ctx+16(FP), CX
|
|
MOVQ ctx+16(FP), CX
|
|
@@ -937,7 +960,7 @@ sequenceDecs_decode_56_bmi2_main_loop:
|
|
|
|
|
|
sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
|
sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decode_56_bmi2_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decode_56_bmi2_fill_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decode_56_bmi2_fill_end
|
|
JLE sequenceDecs_decode_56_bmi2_fill_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -948,6 +971,10 @@ sequenceDecs_decode_56_bmi2_fill_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decode_56_bmi2_fill_byte_by_byte
|
|
JMP sequenceDecs_decode_56_bmi2_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decode_56_bmi2_fill_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decode_56_bmi2_fill_end:
|
|
sequenceDecs_decode_56_bmi2_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -1125,9 +1152,9 @@ sequenceDecs_decode_56_bmi2_match_len_ofs_ok:
|
|
MOVQ R11, 152(CX)
|
|
MOVQ R11, 152(CX)
|
|
MOVQ R12, 160(CX)
|
|
MOVQ R12, 160(CX)
|
|
MOVQ br+8(FP), CX
|
|
MOVQ br+8(FP), CX
|
|
- MOVQ AX, 32(CX)
|
|
|
|
- MOVB DL, 40(CX)
|
|
|
|
- MOVQ BX, 24(CX)
|
|
|
|
|
|
+ MOVQ AX, 24(CX)
|
|
|
|
+ MOVB DL, 32(CX)
|
|
|
|
+ MOVQ BX, 8(CX)
|
|
|
|
|
|
// Return success
|
|
// Return success
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
MOVQ $0x00000000, ret+24(FP)
|
|
@@ -1152,8 +1179,9 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
- // Return with not enough output space error
|
|
|
|
- MOVQ $0x00000005, ret+24(FP)
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool
|
|
// func sequenceDecs_executeSimple_amd64(ctx *executeAsmContext) bool
|
|
@@ -1389,8 +1417,7 @@ loop_finished:
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DI, 104(AX)
|
|
MOVQ DI, 104(AX)
|
|
- MOVQ 80(AX), CX
|
|
|
|
- SUBQ CX, SI
|
|
|
|
|
|
+ SUBQ 80(AX), SI
|
|
MOVQ SI, 112(AX)
|
|
MOVQ SI, 112(AX)
|
|
RET
|
|
RET
|
|
|
|
|
|
@@ -1402,8 +1429,7 @@ error_match_off_too_big:
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DI, 104(AX)
|
|
MOVQ DI, 104(AX)
|
|
- MOVQ 80(AX), CX
|
|
|
|
- SUBQ CX, SI
|
|
|
|
|
|
+ SUBQ 80(AX), SI
|
|
MOVQ SI, 112(AX)
|
|
MOVQ SI, 112(AX)
|
|
RET
|
|
RET
|
|
|
|
|
|
@@ -1747,8 +1773,7 @@ loop_finished:
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DI, 104(AX)
|
|
MOVQ DI, 104(AX)
|
|
- MOVQ 80(AX), CX
|
|
|
|
- SUBQ CX, SI
|
|
|
|
|
|
+ SUBQ 80(AX), SI
|
|
MOVQ SI, 112(AX)
|
|
MOVQ SI, 112(AX)
|
|
RET
|
|
RET
|
|
|
|
|
|
@@ -1760,8 +1785,7 @@ error_match_off_too_big:
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ ctx+0(FP), AX
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DX, 24(AX)
|
|
MOVQ DI, 104(AX)
|
|
MOVQ DI, 104(AX)
|
|
- MOVQ 80(AX), CX
|
|
|
|
- SUBQ CX, SI
|
|
|
|
|
|
+ SUBQ 80(AX), SI
|
|
MOVQ SI, 112(AX)
|
|
MOVQ SI, 112(AX)
|
|
RET
|
|
RET
|
|
|
|
|
|
@@ -1773,11 +1797,11 @@ empty_seqs:
|
|
// func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// func sequenceDecs_decodeSync_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// Requires: CMOV, SSE
|
|
// Requires: CMOV, SSE
|
|
TEXT ·sequenceDecs_decodeSync_amd64(SB), $64-32
|
|
TEXT ·sequenceDecs_decodeSync_amd64(SB), $64-32
|
|
- MOVQ br+8(FP), AX
|
|
|
|
- MOVQ 32(AX), DX
|
|
|
|
- MOVBQZX 40(AX), BX
|
|
|
|
- MOVQ 24(AX), SI
|
|
|
|
- MOVQ (AX), AX
|
|
|
|
|
|
+ MOVQ br+8(FP), CX
|
|
|
|
+ MOVQ 24(CX), DX
|
|
|
|
+ MOVBQZX 32(CX), BX
|
|
|
|
+ MOVQ (CX), AX
|
|
|
|
+ MOVQ 8(CX), SI
|
|
ADDQ SI, AX
|
|
ADDQ SI, AX
|
|
MOVQ AX, (SP)
|
|
MOVQ AX, (SP)
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -1824,7 +1848,7 @@ sequenceDecs_decodeSync_amd64_main_loop:
|
|
|
|
|
|
sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
|
sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decodeSync_amd64_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_amd64_fill_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decodeSync_amd64_fill_end
|
|
JLE sequenceDecs_decodeSync_amd64_fill_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -1835,6 +1859,10 @@ sequenceDecs_decodeSync_amd64_fill_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decodeSync_amd64_fill_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_amd64_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_amd64_fill_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_amd64_fill_end:
|
|
sequenceDecs_decodeSync_amd64_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ R9, AX
|
|
MOVQ R9, AX
|
|
@@ -1891,7 +1919,7 @@ sequenceDecs_decodeSync_amd64_ml_update_zero:
|
|
|
|
|
|
sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
|
sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_amd64_fill_2_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
|
JLE sequenceDecs_decodeSync_amd64_fill_2_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -1902,6 +1930,10 @@ sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_amd64_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_amd64_fill_2_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_amd64_fill_2_end:
|
|
sequenceDecs_decodeSync_amd64_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ DI, AX
|
|
MOVQ DI, AX
|
|
@@ -2263,9 +2295,9 @@ handle_loop:
|
|
|
|
|
|
loop_finished:
|
|
loop_finished:
|
|
MOVQ br+8(FP), AX
|
|
MOVQ br+8(FP), AX
|
|
- MOVQ DX, 32(AX)
|
|
|
|
- MOVB BL, 40(AX)
|
|
|
|
- MOVQ SI, 24(AX)
|
|
|
|
|
|
+ MOVQ DX, 24(AX)
|
|
|
|
+ MOVB BL, 32(AX)
|
|
|
|
+ MOVQ SI, 8(AX)
|
|
|
|
|
|
// Update the context
|
|
// Update the context
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -2311,6 +2343,11 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
|
|
+ RET
|
|
|
|
+
|
|
// Return with not enough output space error
|
|
// Return with not enough output space error
|
|
error_not_enough_space:
|
|
error_not_enough_space:
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -2325,11 +2362,11 @@ error_not_enough_space:
|
|
// func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// func sequenceDecs_decodeSync_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// Requires: BMI, BMI2, CMOV, SSE
|
|
// Requires: BMI, BMI2, CMOV, SSE
|
|
TEXT ·sequenceDecs_decodeSync_bmi2(SB), $64-32
|
|
TEXT ·sequenceDecs_decodeSync_bmi2(SB), $64-32
|
|
- MOVQ br+8(FP), CX
|
|
|
|
- MOVQ 32(CX), AX
|
|
|
|
- MOVBQZX 40(CX), DX
|
|
|
|
- MOVQ 24(CX), BX
|
|
|
|
- MOVQ (CX), CX
|
|
|
|
|
|
+ MOVQ br+8(FP), BX
|
|
|
|
+ MOVQ 24(BX), AX
|
|
|
|
+ MOVBQZX 32(BX), DX
|
|
|
|
+ MOVQ (BX), CX
|
|
|
|
+ MOVQ 8(BX), BX
|
|
ADDQ BX, CX
|
|
ADDQ BX, CX
|
|
MOVQ CX, (SP)
|
|
MOVQ CX, (SP)
|
|
MOVQ ctx+16(FP), CX
|
|
MOVQ ctx+16(FP), CX
|
|
@@ -2376,7 +2413,7 @@ sequenceDecs_decodeSync_bmi2_main_loop:
|
|
|
|
|
|
sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
|
sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decodeSync_bmi2_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_bmi2_fill_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decodeSync_bmi2_fill_end
|
|
JLE sequenceDecs_decodeSync_bmi2_fill_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -2387,6 +2424,10 @@ sequenceDecs_decodeSync_bmi2_fill_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decodeSync_bmi2_fill_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_bmi2_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_bmi2_fill_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_bmi2_fill_end:
|
|
sequenceDecs_decodeSync_bmi2_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -2427,7 +2468,7 @@ sequenceDecs_decodeSync_bmi2_fill_end:
|
|
|
|
|
|
sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
|
sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_bmi2_fill_2_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
|
JLE sequenceDecs_decodeSync_bmi2_fill_2_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -2438,6 +2479,10 @@ sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_bmi2_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_bmi2_fill_2_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_bmi2_fill_2_end:
|
|
sequenceDecs_decodeSync_bmi2_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -2773,9 +2818,9 @@ handle_loop:
|
|
|
|
|
|
loop_finished:
|
|
loop_finished:
|
|
MOVQ br+8(FP), CX
|
|
MOVQ br+8(FP), CX
|
|
- MOVQ AX, 32(CX)
|
|
|
|
- MOVB DL, 40(CX)
|
|
|
|
- MOVQ BX, 24(CX)
|
|
|
|
|
|
+ MOVQ AX, 24(CX)
|
|
|
|
+ MOVB DL, 32(CX)
|
|
|
|
+ MOVQ BX, 8(CX)
|
|
|
|
|
|
// Update the context
|
|
// Update the context
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -2821,6 +2866,11 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
|
|
+ RET
|
|
|
|
+
|
|
// Return with not enough output space error
|
|
// Return with not enough output space error
|
|
error_not_enough_space:
|
|
error_not_enough_space:
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -2835,11 +2885,11 @@ error_not_enough_space:
|
|
// func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// func sequenceDecs_decodeSync_safe_amd64(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// Requires: CMOV, SSE
|
|
// Requires: CMOV, SSE
|
|
TEXT ·sequenceDecs_decodeSync_safe_amd64(SB), $64-32
|
|
TEXT ·sequenceDecs_decodeSync_safe_amd64(SB), $64-32
|
|
- MOVQ br+8(FP), AX
|
|
|
|
- MOVQ 32(AX), DX
|
|
|
|
- MOVBQZX 40(AX), BX
|
|
|
|
- MOVQ 24(AX), SI
|
|
|
|
- MOVQ (AX), AX
|
|
|
|
|
|
+ MOVQ br+8(FP), CX
|
|
|
|
+ MOVQ 24(CX), DX
|
|
|
|
+ MOVBQZX 32(CX), BX
|
|
|
|
+ MOVQ (CX), AX
|
|
|
|
+ MOVQ 8(CX), SI
|
|
ADDQ SI, AX
|
|
ADDQ SI, AX
|
|
MOVQ AX, (SP)
|
|
MOVQ AX, (SP)
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -2886,7 +2936,7 @@ sequenceDecs_decodeSync_safe_amd64_main_loop:
|
|
|
|
|
|
sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
|
sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_safe_amd64_fill_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -2897,6 +2947,10 @@ sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_safe_amd64_fill_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_safe_amd64_fill_end:
|
|
sequenceDecs_decodeSync_safe_amd64_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ R9, AX
|
|
MOVQ R9, AX
|
|
@@ -2953,7 +3007,7 @@ sequenceDecs_decodeSync_safe_amd64_ml_update_zero:
|
|
|
|
|
|
sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
|
sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
|
CMPQ SI, $0x00
|
|
CMPQ SI, $0x00
|
|
- JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread
|
|
CMPQ BX, $0x07
|
|
CMPQ BX, $0x07
|
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
|
JLE sequenceDecs_decodeSync_safe_amd64_fill_2_end
|
|
SHLQ $0x08, DX
|
|
SHLQ $0x08, DX
|
|
@@ -2964,6 +3018,10 @@ sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte:
|
|
ORQ AX, DX
|
|
ORQ AX, DX
|
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_safe_amd64_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_safe_amd64_fill_2_check_overread:
|
|
|
|
+ CMPQ BX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_safe_amd64_fill_2_end:
|
|
sequenceDecs_decodeSync_safe_amd64_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ DI, AX
|
|
MOVQ DI, AX
|
|
@@ -3427,9 +3485,9 @@ handle_loop:
|
|
|
|
|
|
loop_finished:
|
|
loop_finished:
|
|
MOVQ br+8(FP), AX
|
|
MOVQ br+8(FP), AX
|
|
- MOVQ DX, 32(AX)
|
|
|
|
- MOVB BL, 40(AX)
|
|
|
|
- MOVQ SI, 24(AX)
|
|
|
|
|
|
+ MOVQ DX, 24(AX)
|
|
|
|
+ MOVB BL, 32(AX)
|
|
|
|
+ MOVQ SI, 8(AX)
|
|
|
|
|
|
// Update the context
|
|
// Update the context
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -3475,6 +3533,11 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
|
|
+ RET
|
|
|
|
+
|
|
// Return with not enough output space error
|
|
// Return with not enough output space error
|
|
error_not_enough_space:
|
|
error_not_enough_space:
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -3489,11 +3552,11 @@ error_not_enough_space:
|
|
// func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// func sequenceDecs_decodeSync_safe_bmi2(s *sequenceDecs, br *bitReader, ctx *decodeSyncAsmContext) int
|
|
// Requires: BMI, BMI2, CMOV, SSE
|
|
// Requires: BMI, BMI2, CMOV, SSE
|
|
TEXT ·sequenceDecs_decodeSync_safe_bmi2(SB), $64-32
|
|
TEXT ·sequenceDecs_decodeSync_safe_bmi2(SB), $64-32
|
|
- MOVQ br+8(FP), CX
|
|
|
|
- MOVQ 32(CX), AX
|
|
|
|
- MOVBQZX 40(CX), DX
|
|
|
|
- MOVQ 24(CX), BX
|
|
|
|
- MOVQ (CX), CX
|
|
|
|
|
|
+ MOVQ br+8(FP), BX
|
|
|
|
+ MOVQ 24(BX), AX
|
|
|
|
+ MOVBQZX 32(BX), DX
|
|
|
|
+ MOVQ (BX), CX
|
|
|
|
+ MOVQ 8(BX), BX
|
|
ADDQ BX, CX
|
|
ADDQ BX, CX
|
|
MOVQ CX, (SP)
|
|
MOVQ CX, (SP)
|
|
MOVQ ctx+16(FP), CX
|
|
MOVQ ctx+16(FP), CX
|
|
@@ -3540,7 +3603,7 @@ sequenceDecs_decodeSync_safe_bmi2_main_loop:
|
|
|
|
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_safe_bmi2_fill_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -3551,6 +3614,10 @@ sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_safe_bmi2_fill_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
|
// Update offset
|
|
// Update offset
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -3591,7 +3658,7 @@ sequenceDecs_decodeSync_safe_bmi2_fill_end:
|
|
|
|
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
|
CMPQ BX, $0x00
|
|
CMPQ BX, $0x00
|
|
- JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
|
|
|
|
|
+ JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread
|
|
CMPQ DX, $0x07
|
|
CMPQ DX, $0x07
|
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
|
JLE sequenceDecs_decodeSync_safe_bmi2_fill_2_end
|
|
SHLQ $0x08, AX
|
|
SHLQ $0x08, AX
|
|
@@ -3602,6 +3669,10 @@ sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte:
|
|
ORQ CX, AX
|
|
ORQ CX, AX
|
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte
|
|
JMP sequenceDecs_decodeSync_safe_bmi2_fill_2_byte_by_byte
|
|
|
|
|
|
|
|
+sequenceDecs_decodeSync_safe_bmi2_fill_2_check_overread:
|
|
|
|
+ CMPQ DX, $0x40
|
|
|
|
+ JA error_overread
|
|
|
|
+
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_end:
|
|
sequenceDecs_decodeSync_safe_bmi2_fill_2_end:
|
|
// Update literal length
|
|
// Update literal length
|
|
MOVQ $0x00000808, CX
|
|
MOVQ $0x00000808, CX
|
|
@@ -4039,9 +4110,9 @@ handle_loop:
|
|
|
|
|
|
loop_finished:
|
|
loop_finished:
|
|
MOVQ br+8(FP), CX
|
|
MOVQ br+8(FP), CX
|
|
- MOVQ AX, 32(CX)
|
|
|
|
- MOVB DL, 40(CX)
|
|
|
|
- MOVQ BX, 24(CX)
|
|
|
|
|
|
+ MOVQ AX, 24(CX)
|
|
|
|
+ MOVB DL, 32(CX)
|
|
|
|
+ MOVQ BX, 8(CX)
|
|
|
|
|
|
// Update the context
|
|
// Update the context
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|
|
@@ -4087,6 +4158,11 @@ error_not_enough_literals:
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
MOVQ $0x00000004, ret+24(FP)
|
|
RET
|
|
RET
|
|
|
|
|
|
|
|
+ // Return with overread error
|
|
|
|
+error_overread:
|
|
|
|
+ MOVQ $0x00000006, ret+24(FP)
|
|
|
|
+ RET
|
|
|
|
+
|
|
// Return with not enough output space error
|
|
// Return with not enough output space error
|
|
error_not_enough_space:
|
|
error_not_enough_space:
|
|
MOVQ ctx+16(FP), AX
|
|
MOVQ ctx+16(FP), AX
|