In jump-table-like constructs, the natural way of writing the code can sometimes produce redundant jumps or labels. Therefore some basic cleanup steps have been proposed. This diff adds two transforms: 1. Remove unconditional jumps to a label immediately following. 2. Remove labels with no references at all. Fixes #75
18 lines
323 B
ArmAsm
18 lines
323 B
ArmAsm
// Code generated by command: go run asm.go -out fmt.s -stubs stub.go. DO NOT EDIT.
|
|
|
|
#include "textflag.h"
|
|
|
|
// func Formatting()
|
|
TEXT ·Formatting(SB), NOSPLIT, $0
|
|
ADDQ R8, R8
|
|
|
|
// One comment line between instructions.
|
|
ADDQ R8, R8
|
|
|
|
// Comment before label.
|
|
label:
|
|
// Comment after label.
|
|
ADDQ R8, R8
|
|
JMP label
|
|
RET
|