// GoSyntax returns the Go assembler syntax for the instruction. // The pc is the program counter of the first instruction, used for expanding // PC-relative addresses into absolute ones. // The symname function queries the symbol table for the program // being disassembled. It returns the name and base address of the symbol // containing the target, if any; otherwise it returns "", 0. func GoSyntax(inst Inst, pc uint64, symname func(uint64) (string, uint64)) string { … } // plan9Arg formats arg (which is the argIndex's arg in inst) according to Plan 9 rules. // // NOTE: because Plan9Syntax is the only caller of this func, and it receives a copy // of inst, it's ok to modify inst.Args here. func plan9Arg(inst *Inst, argIndex int, pc uint64, arg Arg, symname func(uint64) (string, uint64)) string { … } func reverseMiddleOps(op Op) bool { … } func reverseOperandOrder(op Op) bool { … } var revCondMap … var condName … var plan9OpMap …