]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm/internal/asm: fix comment grammar
authorJes Cok <xigua67damn@gmail.com>
Fri, 30 Jun 2023 23:23:03 +0000 (23:23 +0000)
committerCherry Mui <cherryyz@google.com>
Thu, 27 Jul 2023 18:57:49 +0000 (18:57 +0000)
Change-Id: I6fc0ae765c347669d1b061de018eb97d8e43461c
GitHub-Last-Rev: 9e6c1f1f97c2c7edcc1dddd58db6d4d7bff57f1c
GitHub-Pull-Request: golang/go#61131
Reviewed-on: https://go-review.googlesource.com/c/go/+/507515
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
src/cmd/asm/internal/asm/asm.go
src/cmd/asm/internal/asm/parse.go

index 563e794706980ab59f6f4ad489c38e3684716daa..375ef803bb7b724acd0ccf7c6be3663659768a65 100644 (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
index 37f8e6c0bcc2a8cf1653fc769e4156409dda9540..c504e7eeab36683eb30b6efa88d635300e4e85da 100644 (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