Skip to content

ASM #17

@kriskwiatkowski

Description

@kriskwiatkowski

Linter reports variables used only in assembly as unused.

Consider this very common code used in crypto libraries:

test.go:

import "golang.org/x/sys/cpu"
var hasBoth = cpu.HasBMI2 && cpu.HasADX
test.s

CMPB hasBoth
JE jump_to_optimized_implementation
....

linter will report hasBoth is not used, where it actually is

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions