/* TODO: enable them when corresponding optimization are implemented
func zero_byte_4_idx(b []byte, idx int) {
- // arm64: `MOVW\sZR,\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`MOV[BH]`
+ // arm64(DISABLED): `MOVW\sZR,\s\(R[0-9]+\)\(R[0-9]+<<2\)`,-`MOV[BH]`
b[(idx<<2)+0] = 0
b[(idx<<2)+1] = 0
b[(idx<<2)+2] = 0
}
func zero_byte_8_idx(b []byte, idx int) {
- // arm64: `MOVD\sZR,\s\(R[0-9]+\)\(R[0-9]+<<3\)`,-`MOV[BHW]`
+ // arm64(DISABLED): `MOVD\sZR,\s\(R[0-9]+\)\(R[0-9]+<<3\)`,-`MOV[BHW]`
b[(idx<<3)+0] = 0
b[(idx<<3)+1] = 0
b[(idx<<3)+2] = 0
var (
// Regexp to split a line in code and comment, trimming spaces
- rxAsmComment = regexp.MustCompile(`^\s*(.*?)\s*(?:\/\/\s*(.+)\s*)?$`)
+ rxAsmComment = regexp.MustCompile(`^\s*(.*?)\s*(?://\s*(.+)\s*)?$`)
- // Regexp to extract an architecture check: architecture name, followed by semi-colon,
- // followed by a comma-separated list of opcode checks.
- rxAsmPlatform = regexp.MustCompile(`(\w+)(/\w+)?(/\w*)?:(` + reMatchCheck + `(?:,` + reMatchCheck + `)*)`)
+ // Regexp to extract an architecture check: architecture name (or triplet),
+ // followed by semi-colon, followed by a comma-separated list of opcode checks.
+ // Extraneous spaces are ignored.
+ rxAsmPlatform = regexp.MustCompile(`(\w+)(/\w+)?(/\w*)?\s*:\s*(` + reMatchCheck + `(?:\s*,\s*` + reMatchCheck + `)*)`)
// Regexp to extract a single opcoded check
rxAsmCheck = regexp.MustCompile(reMatchCheck)