1
0
mirror of https://github.com/golang/go synced 2024-11-17 07:04:44 -07:00

cmd/asm/internal/asm: fix comment grammar

This commit is contained in:
Jes Cok 2023-07-01 07:04:11 +08:00
parent 5b72f45dd1
commit 9e6c1f1f97
2 changed files with 4 additions and 4 deletions

View File

@ -445,7 +445,7 @@ func (p *Parser) asmJump(op obj.As, cond string, a []obj.Addr) {
// BC x,CR0EQ,...
// BC x,CR1LT,...
// BC x,CR1GT,...
// The first and second case demonstrate a symbol name which is
// The first and second cases demonstrate a symbol name which is
// effectively discarded. In these cases, the offset determines
// the CR bit.
prog.Reg = a[1].Reg
@ -909,7 +909,7 @@ func (p *Parser) asmInstruction(op obj.As, cond string, a []obj.Addr) {
p.append(prog, cond, true)
}
// symbolName returns the symbol name, or an error string if none if available.
// symbolName returns the symbol name, or an error string if none is available.
func symbolName(addr *obj.Addr) string {
if addr.Sym != nil {
return addr.Sym.Name

View File

@ -928,7 +928,7 @@ func (p *Parser) funcAddress() (string, obj.ABI, bool) {
}
// registerIndirect parses the general form of a register indirection.
// It is can be (R1), (R2*scale), (R1)(R2*scale), (R1)(R2.SXTX<<3) or (R1)(R2<<3)
// It can be (R1), (R2*scale), (R1)(R2*scale), (R1)(R2.SXTX<<3) or (R1)(R2<<3)
// where R1 may be a simple register or register pair R:R or (R, R) or (R+R).
// Or it might be a pseudo-indirection like (FP).
// We are sitting on the opening parenthesis.
@ -1186,7 +1186,7 @@ func (p *Parser) registerListX86(a *obj.Addr) {
a.Offset = x86.EncodeRegisterRange(lo, hi)
}
// register number is ARM-specific. It returns the number of the specified register.
// registerNumber is ARM-specific. It returns the number of the specified register.
func (p *Parser) registerNumber(name string) uint16 {
if p.arch.Family == sys.ARM && name == "g" {
return 10