// Code generated by mkoptions.go; DO NOT EDIT. //go:build 386 || amd64 package cpu // appendLevelOptions appends the GODEBUG options for the features that are not // guaranteed at the given GOAMD64 level. GODEBUG can't turn off the features // that are guaranteed at level. func appendLevelOptions(options []option, level int32) []option { if level < 2 { options = append(options, option{Name: "popcnt", Feature: &X86.HasPOPCNT}, option{Name: "sse3", Feature: &X86.HasSSE3}, option{Name: "sse41", Feature: &X86.HasSSE41}, option{Name: "sse42", Feature: &X86.HasSSE42}, option{Name: "ssse3", Feature: &X86.HasSSSE3}, ) } if level < 3 { options = append(options, option{Name: "avx", Feature: &X86.HasAVX}, option{Name: "avx2", Feature: &X86.HasAVX2}, option{Name: "bmi1", Feature: &X86.HasBMI1}, option{Name: "bmi2", Feature: &X86.HasBMI2}, option{Name: "fma", Feature: &X86.HasFMA}, ) } if level < 4 { options = append(options, option{Name: "avx512f", Feature: &X86.HasAVX512F}, option{Name: "avx512cd", Feature: &X86.HasAVX512CD}, option{Name: "avx512bw", Feature: &X86.HasAVX512BW}, option{Name: "avx512dq", Feature: &X86.HasAVX512DQ}, option{Name: "avx512vl", Feature: &X86.HasAVX512VL}, ) } return options }