1
0
mirror of https://github.com/golang/go synced 2024-11-24 22:10:02 -07:00

all: add space after // in comments

This commit is contained in:
nercoeus 2021-12-03 11:57:32 +08:00
parent 46a08372ad
commit 9e51cef43d
9 changed files with 13 additions and 13 deletions

View File

@ -1660,7 +1660,7 @@ func (p *Package) gccCmd() []string {
} }
// disable LTO so we get an object whose symbols we can read // disable LTO so we get an object whose symbols we can read
c = append(c, "-fno-lto") c = append(c, "-fno-lto")
c = append(c, "-") //read input from standard input c = append(c, "-") // read input from standard input
return c return c
} }

View File

@ -35,7 +35,7 @@ func Set(t *types.Type, off int64, bv bitvec.BitVec) {
if off&int64(types.PtrSize-1) != 0 { if off&int64(types.PtrSize-1) != 0 {
base.Fatalf("typebits.Set: invalid alignment, %v", t) base.Fatalf("typebits.Set: invalid alignment, %v", t)
} }
bv.Set(int32(off / int64(types.PtrSize))) //pointer in first slot bv.Set(int32(off / int64(types.PtrSize))) // pointer in first slot
case types.TINTER: case types.TINTER:
// struct { Itab *tab; void *data; } // struct { Itab *tab; void *data; }

View File

@ -3436,9 +3436,9 @@ func (c *ctxtz) asmout(p *obj.Prog, asm *[]byte) {
case 40: // word/byte case 40: // word/byte
wd := uint32(c.regoff(&p.From)) wd := uint32(c.regoff(&p.From))
if p.As == AWORD { //WORD if p.As == AWORD { // WORD
*asm = append(*asm, uint8(wd>>24), uint8(wd>>16), uint8(wd>>8), uint8(wd)) *asm = append(*asm, uint8(wd>>24), uint8(wd>>16), uint8(wd>>8), uint8(wd))
} else { //BYTE } else { // BYTE
*asm = append(*asm, uint8(wd)) *asm = append(*asm, uint8(wd))
} }
@ -4484,9 +4484,9 @@ func (c *ctxtz) zoprre(a obj.As) uint32 {
return op_CGR return op_CGR
case ACMPU: case ACMPU:
return op_CLGR return op_CLGR
case AFCMPO: //ordered case AFCMPO: // ordered
return op_KDBR return op_KDBR
case AFCMPU: //unordered case AFCMPU: // unordered
return op_CDBR return op_CDBR
case ACEBR: case ACEBR:
return op_CEBR return op_CEBR

View File

@ -327,7 +327,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
p, pPreempt, pCheck = c.stacksplitPre(p, autosize) // emit pre part of split check p, pPreempt, pCheck = c.stacksplitPre(p, autosize) // emit pre part of split check
pPre = p pPre = p
p = c.ctxt.EndUnsafePoint(p, c.newprog, -1) p = c.ctxt.EndUnsafePoint(p, c.newprog, -1)
wasSplit = true //need post part of split wasSplit = true // need post part of split
} }
if autosize != 0 { if autosize != 0 {

View File

@ -5279,7 +5279,7 @@ bad:
if ctxt.Arch.Family == sys.I386 { if ctxt.Arch.Family == sys.I386 {
breg := byteswapreg(ctxt, &p.From) breg := byteswapreg(ctxt, &p.From)
if breg != REG_AX { if breg != REG_AX {
ab.Put1(0x87) //xchg rhs,bx ab.Put1(0x87) // xchg rhs,bx
ab.asmando(ctxt, cursym, p, &p.To, reg[breg]) ab.asmando(ctxt, cursym, p, &p.To, reg[breg])
subreg(&pp, z, breg) subreg(&pp, z, breg)
ab.doasm(ctxt, cursym, &pp) ab.doasm(ctxt, cursym, &pp)

View File

@ -29,7 +29,7 @@ import (
// Disasm is a disassembler for a given File. // Disasm is a disassembler for a given File.
type Disasm struct { type Disasm struct {
syms []Sym //symbols in file, sorted by address syms []Sym // symbols in file, sorted by address
pcln Liner // pcln table pcln Liner // pcln table
text []byte // bytes of text segment (actual instructions) text []byte // bytes of text segment (actual instructions)
textStart uint64 // start PC of text textStart uint64 // start PC of text

View File

@ -629,7 +629,7 @@ func machoshbits(ctxt *Link, mseg *MachoSeg, sect *sym.Section, segname string)
if sect.Name == ".plt" { if sect.Name == ".plt" {
msect.name = "__symbol_stub1" msect.name = "__symbol_stub1"
msect.flag = S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS | S_SYMBOL_STUBS msect.flag = S_ATTR_PURE_INSTRUCTIONS | S_ATTR_SOME_INSTRUCTIONS | S_SYMBOL_STUBS
msect.res1 = 0 //nkind[SymKindLocal]; msect.res1 = 0 // nkind[SymKindLocal];
msect.res2 = 6 msect.res2 = 6
} }

View File

@ -2361,10 +2361,10 @@ func (l *Loader) cloneToExternal(symIdx Sym) {
// the mangled name. When we do mangling, we copy payload of mangled to original. // the mangled name. When we do mangling, we copy payload of mangled to original.
func (l *Loader) CopySym(src, dst Sym) { func (l *Loader) CopySym(src, dst Sym) {
if !l.IsExternal(dst) { if !l.IsExternal(dst) {
panic("dst is not external") //l.newExtSym(l.SymName(dst), l.SymVersion(dst)) panic("dst is not external") // l.newExtSym(l.SymName(dst), l.SymVersion(dst))
} }
if !l.IsExternal(src) { if !l.IsExternal(src) {
panic("src is not external") //l.cloneToExternal(src) panic("src is not external") // l.cloneToExternal(src)
} }
l.payloads[l.extIndex(dst)] = l.payloads[l.extIndex(src)] l.payloads[l.extIndex(dst)] = l.payloads[l.extIndex(src)]
l.SetSymPkg(dst, l.SymPkg(src)) l.SetSymPkg(dst, l.SymPkg(src))

View File

@ -828,7 +828,7 @@ func TestDeferLiveness(t *testing.T) {
func TestDeferHeapAndStack(t *testing.T) { func TestDeferHeapAndStack(t *testing.T) {
P := 4 // processors P := 4 // processors
N := 10000 //iterations N := 10000 // iterations
D := 200 // stack depth D := 200 // stack depth
if testing.Short() { if testing.Short() {