Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 1.02 KB

check_avx_usage_windows.md

File metadata and controls

23 lines (14 loc) · 1.02 KB

Check if AVX2 instructions is used in windows binary files

Builtup

Clash windows binary is built with latest version of go, which could specifies 4 tiers of instruction set used in compiled binary. Need to check if any logic in the binary used AVX2 instructions in tier3.

Tools

Linux -- objdump

Windows -- dumpbin, dumpbin.exe comes with visual studio

Usage

Open Visual studio command prompt (or powershell) from visual studio tools bar - Tools - command line - developer command prompt

dumpbin.exe /disasm clash.exe > decompiled.asm

I used sublime text to find the instruction strings, like vpand. It seems like all AVX2 instructions starts with v

Reference

Go github links description of the tiers

AVX2 instructions

Use awk to scan the decompiled file for instructions