Skip to content

Commit da53f2a

Browse files
psilva261rafael2k
authored andcommitted
update comments and indentation
1 parent 34c4dcd commit da53f2a

File tree

8 files changed

+54
-33
lines changed

8 files changed

+54
-33
lines changed

src/cmd/internal/obj/objfile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const UnlinkablePkg = "<unlinkable>" // invalid package path, used when compiled
3030

3131
// Entry point of writing new object file.
3232
func WriteObjFile(ctxt *Link, b *bio.Writer) {
33+
3334
debugAsmEmit(ctxt)
3435

3536
genFuncInfoSyms(ctxt)

src/cmd/vendor/golang.org/x/sys/plan9/asm_plan9_arm64.s

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/runtime/defs_plan9_arm64.go

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
package runtime
26

37
const _PAGESHIFT = 16
@@ -72,28 +76,28 @@ func dumpregs(u *ureg) {
7276
print("r10 ", hex(u.r10), "\n")
7377
print("r11 ", hex(u.r11), "\n")
7478
print("r12 ", hex(u.r12), "\n")
75-
print("r13 ", hex(u.r13), "\n")
76-
print("r14 ", hex(u.r14), "\n")
77-
print("r15 ", hex(u.r15), "\n")
78-
print("r16 ", hex(u.r16), "\n")
79-
print("r17 ", hex(u.r17), "\n")
80-
print("r18 ", hex(u.r18), "\n")
81-
print("r19 ", hex(u.r19), "\n")
79+
print("r13 ", hex(u.r13), "\n")
80+
print("r14 ", hex(u.r14), "\n")
81+
print("r15 ", hex(u.r15), "\n")
82+
print("r16 ", hex(u.r16), "\n")
83+
print("r17 ", hex(u.r17), "\n")
84+
print("r18 ", hex(u.r18), "\n")
85+
print("r19 ", hex(u.r19), "\n")
8286
print("r20 ", hex(u.r20), "\n")
8387
print("r21 ", hex(u.r21), "\n")
8488
print("r22 ", hex(u.r22), "\n")
85-
print("r23 ", hex(u.r23), "\n")
86-
print("r24 ", hex(u.r24), "\n")
87-
print("r25 ", hex(u.r25), "\n")
88-
print("r26 ", hex(u.r26), "\n")
89-
print("r27 ", hex(u.r27), "\n")
90-
print("r28 ", hex(u.r28), "\n")
91-
print("r29 ", hex(u.r29), "\n")
89+
print("r23 ", hex(u.r23), "\n")
90+
print("r24 ", hex(u.r24), "\n")
91+
print("r25 ", hex(u.r25), "\n")
92+
print("r26 ", hex(u.r26), "\n")
93+
print("r27 ", hex(u.r27), "\n")
94+
print("r28 ", hex(u.r28), "\n")
95+
print("r29 ", hex(u.r29), "\n")
9296
print("r30 ", hex(u.r30), "\n")
9397
print("sp ", hex(u.sp), "\n")
94-
print("pc ", hex(u.pc), "\n")
98+
print("pc ", hex(u.pc), "\n")
9599
print("psr ", hex(u.psr), "\n")
96-
print("type ", hex(u.typ), "\n")
100+
print("type ", hex(u.typ), "\n")
97101
}
98102

99103
func sigpanictramp()

src/runtime/os_plan9_arm64.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
package runtime
26

37
//go:nosplit

src/runtime/rt0_plan9_arm64.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
#include "textflag.h"
26

37
//in plan 9 argc is at top of stack followed by ptrs to arguments

src/runtime/sys_plan9_arm64.s

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright 2015 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
#include "go_asm.h"
26
#include "go_tls.h"
37
#include "textflag.h"
@@ -61,16 +65,14 @@ TEXT runtime·pread(SB),NOSPLIT,$0-36
6165
MOVWU R0, ret+32(FP)
6266
RET
6367

64-
//func pwrite(fd int64, buf unsafe.Pointer, nbytes int64, offset int64) int
68+
//func pwrite(fd int32, buf unsafe.Pointer, nbytes int32, offset int64) int32
6569
TEXT runtime·pwrite(SB),NOSPLIT,$0-36
6670
MOVD $SYS_PWRITE, R0
6771
SVC $0
6872
MOVWU R0, ret+32(FP)
6973
RET
7074

71-
//func seek(fd int64, offset int64, whence int32) int64
72-
// the actual syscall:
73-
// // int32 _seek(int64*, int32, int64, int32)
75+
//func seek(fd int32, offset int64, whence int32) int64
7476
TEXT runtime·seek(SB),NOSPLIT,$0-32
7577
MOVD $ret+24(FP), R0
7678
MOVWU fd+0(FP), R2
@@ -92,7 +94,7 @@ TEXT runtime·seek(SB),NOSPLIT,$0-32
9294
MOVD R0, ret+24(FP)
9395
RET
9496

95-
//func closefd(fd int64) int64
97+
//func closefd(fd int32) int32
9698
TEXT runtime·closefd(SB),NOSPLIT,$0-12
9799
MOVD $SYS_CLOSE, R0
98100
SVC $0
@@ -119,14 +121,14 @@ TEXT runtime·sleep(SB),NOSPLIT,$0-12
119121
MOVD R0, ret+8(FP)
120122
RET
121123

122-
//func plan9_semacquire(addr *uint64, block int64) int64
124+
//func plan9_semacquire(addr *uint32, block int32) int32
123125
TEXT runtime·plan9_semacquire(SB),NOSPLIT,$0-20
124126
MOVD $SYS_SEMACQUIRE, R0
125127
SVC $0
126128
MOVD R0, ret+16(FP)
127129
RET
128130

129-
//func plan9_tsemacquire(addr *uint64, ms int32) int64
131+
//func plan9_tsemacquire(addr *uint32, ms int32) int32
130132
TEXT runtime·plan9_tsemacquire(SB),NOSPLIT,$0-20
131133
MOVD $SYS_TSEMACQUIRE, R0
132134
SVC $0
@@ -166,21 +168,21 @@ TEXT runtime·notify(SB),NOSPLIT,$0-12
166168
MOVWU R0, ret+8(FP)
167169
RET
168170

169-
//func noted(mode int64) int64
171+
//func noted(mode int32) int32
170172
TEXT runtime·noted(SB),NOSPLIT,$0-12
171173
MOVD $SYS_NOTED, R0
172174
SVC $0
173175
MOVWU R0, ret+8(FP)
174176
RET
175177

176-
//func plan9_semrelease(addr *uint64, count int64) int64
178+
//func plan9_semrelease(addr *uint32, count int32) int32
177179
TEXT runtime·plan9_semrelease(SB),NOSPLIT,$0-20
178180
MOVD $SYS_SEMRELEASE, R0
179181
SVC $0
180182
MOVWU R0, ret+16(FP)
181183
RET
182184

183-
//func rfork(flags int64) int64
185+
//func rfork(flags int32) int32
184186
TEXT runtime·rfork(SB),NOSPLIT,$0-12
185187
MOVD $SYS_RFORK, R0
186188
SVC $0

src/syscall/asm_plan9_arm.s

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
// System call support for plan9 on arm
1212

1313
//func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err ErrorString)
14-
// 144: frame size
15-
// 32: arg size (4 addrs and doubled?!)
1614
TEXT ·Syscall(SB),NOSPLIT,$144-32
1715
NO_LOCAL_POINTERS
1816
BL runtime·entersyscall(SB)

src/syscall/asm_plan9_arm64.s

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
// Copyright 2009 The Go Authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
15
#include "textflag.h"
26
#include "funcdata.h"
37

48
#define SYS_ERRSTR 41 /* from zsysnum_plan9.go */
5-
#define SYS_SEEK 39 /* from zsysnum_plan9.go */
9+
#define SYS_SEEK 39 /* from zsysnum_plan9.go */
610

711
// System call support for plan9 on arm64
812

913
//func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err ErrorString)
1014
TEXT ·Syscall(SB),NOSPLIT,$168-64
1115
NO_LOCAL_POINTERS
12-
BL runtime·entersyscall(SB)
16+
BL runtime·entersyscall(SB)
1317

1418
MOVD trap+0(FP), R0
1519
MOVD a1+8(FP), R2
@@ -21,7 +25,7 @@ TEXT ·Syscall(SB),NOSPLIT,$168-64
2125
MOVD R3, sysargs-184(FP)
2226
MOVD R4, sysargs-176(FP)
2327

24-
SVC $0
28+
SVC $0
2529

2630
// put return values into r1, r2, err
2731
MOVD R0, r1+32(FP)
@@ -84,10 +88,10 @@ TEXT ·Syscall6(SB),NOSPLIT,$168-88
8488
MOVD R0, r1+56(FP)
8589
MOVD R1, r2+64(FP)
8690
MOVD ZR, err+72(FP)
87-
91+
8892
// put error if needed
8993
CMP $-1, R0
90-
BEQ syscall6err
94+
BEQ syscall6err
9195
BL runtime·exitsyscall(SB)
9296
MOVD $·emptystring+0(SB), R2
9397
B syscall6ok

0 commit comments

Comments
 (0)