Debian Codegraph @

huff0/decompress_amd64.go

raw
1 //go:build amd64 && !appengine && !noasm && gc
2
3 // amd64 stubs and dispatch for the asm loops used by decompress_asm.go.
4 package huff0
5
6 import (
7 "github.com/klauspost/compress/internal/cpuinfo"
8 )
9
10 // decompress4x_main_loop_amd64 is an x86 assembler implementation
11 // of Decompress4X when tablelog > 8.
12 //
13 //go:noescape
14 func decompress4x_main_loop_amd64(ctx *decompress4xContext)
15
16 // decompress4x_8b_main_loop_amd64 is an x86 assembler implementation
17 // of Decompress4X when tablelog <= 8 which decodes 4 entries
18 // per loop.
19 //
20 //go:noescape
21 func decompress4x_8b_main_loop_amd64(ctx *decompress4xContext)
22
23 // decompress1x_main_loop_amd64 is an x86 assembler implementation
24 // of Decompress1X when tablelog > 8.
25 //
26 //go:noescape
27 func decompress1x_main_loop_amd64(ctx *decompress1xContext)
28
29 // decompress1x_main_loop_bmi2 is an x86 with BMI2 assembler implementation
30 // of Decompress1X when tablelog > 8.
31 //
32 //go:noescape
33 func decompress1x_main_loop_bmi2(ctx *decompress1xContext)
34
35 func decompress4x_main_loop_asm(ctx *decompress4xContext) {
36 decompress4x_main_loop_amd64(ctx)
37 }
38
39 func decompress4x_8b_main_loop_asm(ctx *decompress4xContext) {
40 decompress4x_8b_main_loop_amd64(ctx)
41 }
42
43 func decompress1x_main_loop_asm(ctx *decompress1xContext) {
44 if cpuinfo.HasBMI2() {
45 decompress1x_main_loop_bmi2(ctx)
46 } else {
47 decompress1x_main_loop_amd64(ctx)
48 }
49 }