Skip to content

Commit

Permalink
runtime: fix scattered non-tab indentation in assembly
Browse files Browse the repository at this point in the history
Change-Id: I6940a4c747f2da871263afa6a4e3386395d5cf54
Reviewed-on: https://go-review.googlesource.com/c/go/+/180839
Run-TryBot: Russ Cox <[email protected]>
Reviewed-by: Ian Lance Taylor <[email protected]>
  • Loading branch information
rsc committed Jun 6, 2019
1 parent 4ed2e19 commit 26a5f6a
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 29 deletions.
8 changes: 4 additions & 4 deletions src/runtime/asm_386.s
Original file line number Diff line number Diff line change
Expand Up @@ -1333,10 +1333,10 @@ TEXT runtime·goexit(SB),NOSPLIT,$0-0
// CX (implicitly) and DX, but it does not follow the ABI wrt arguments:
// instead the pointer to the moduledata is passed in AX.
TEXT runtime·addmoduledata(SB),NOSPLIT,$0-0
MOVL runtime·lastmoduledatap(SB), DX
MOVL AX, moduledata_next(DX)
MOVL AX, runtime·lastmoduledatap(SB)
RET
MOVL runtime·lastmoduledatap(SB), DX
MOVL AX, moduledata_next(DX)
MOVL AX, runtime·lastmoduledatap(SB)
RET

TEXT runtime·uint32tofloat64(SB),NOSPLIT,$8-12
MOVL a+0(FP), AX
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/asm_ppc64x.s
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ TEXT runtime·mcall(SB), NOSPLIT|NOFRAME, $0-8
TEXT runtime·systemstack_switch(SB), NOSPLIT, $0-0
// We have several undefs here so that 16 bytes past
// $runtime·systemstack_switch lies within them whether or not the
// instructions that derive r2 from r12 are there.
// instructions that derive r2 from r12 are there.
UNDEF
UNDEF
UNDEF
Expand Down Expand Up @@ -891,9 +891,9 @@ TEXT runtime·goexit(SB),NOSPLIT|NOFRAME|TOPFRAME,$0-0
// the goroutine exits. It's implemented in assembly mainly because that's the
// easiest way to get access to R2.
TEXT runtime·prepGoExitFrame(SB),NOSPLIT,$0-8
MOVD sp+0(FP), R3
MOVD R2, 24(R3)
RET
MOVD sp+0(FP), R3
MOVD R2, 24(R3)
RET

TEXT runtime·addmoduledata(SB),NOSPLIT|NOFRAME,$0-0
ADD $-8, R1
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/asm_s390x.s
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,8 @@ TEXT runtime·goexit(SB),NOSPLIT|NOFRAME|TOPFRAME,$0-0
BYTE $0x07; BYTE $0x00; // 2-byte nop

TEXT ·publicationBarrier(SB),NOSPLIT|NOFRAME,$0-0
// Stores are already ordered on s390x, so this is just a
// compile barrier.
// Stores are already ordered on s390x, so this is just a
// compile barrier.
RET

// This is called from .init_array and follows the platform, not Go, ABI.
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/memclr_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ try_zva:
MOVW block_size<>(SB), R5
TBNZ $31, R5, no_zva
CBNZ R5, zero_by_line
// DCZID_EL0 bit assignments
// [63:5] Reserved
// [4] DZP, if bit set DC ZVA instruction is prohibited, else permitted
// [3:0] log2 of the block size in words, eg. if it returns 0x4 then block size is 16 words
// DCZID_EL0 bit assignments
// [63:5] Reserved
// [4] DZP, if bit set DC ZVA instruction is prohibited, else permitted
// [3:0] log2 of the block size in words, eg. if it returns 0x4 then block size is 16 words
MRS DCZID_EL0, R3
TBZ $4, R3, init
// ZVA not available
Expand Down
10 changes: 5 additions & 5 deletions src/runtime/memmove_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ check:
// Copying forward proceeds by copying R7/8 words then copying R6 bytes.
// R3 and R4 are advanced as we copy.

// (There may be implementations of armv8 where copying by bytes until
// at least one of source or dest is word aligned is a worthwhile
// optimization, but the on the one tested so far (xgene) it did not
// make a significance difference.)
// (There may be implementations of armv8 where copying by bytes until
// at least one of source or dest is word aligned is a worthwhile
// optimization, but the on the one tested so far (xgene) it did not
// make a significance difference.)

CBZ R7, noforwardlarge // Do we need to do any doubleword-by-doubleword copying?

Expand Down Expand Up @@ -111,7 +111,7 @@ nobackwardtail:
RET

backwardlarge:
SUB R7, R3, R9 // R9 points at the lowest destination byte
SUB R7, R3, R9 // R9 points at the lowest destination byte

backwardlargeloop:
LDP -16(R4), (R8, R10)
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/race_arm64.s
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ TEXT runtime·racecallbackthunk(SB), NOSPLIT|NOFRAME, $0
MOVD R13, g
JMP (LR)
rest:
// Save callee-saved registers (Go code won't respect that).
// Save callee-saved registers (Go code won't respect that).
// 8(RSP) and 16(RSP) are for args passed through racecallback
SUB $96, RSP
MOVD LR, 0(RSP)
Expand Down
12 changes: 6 additions & 6 deletions src/runtime/race_ppc64le.s
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ TEXT runtime·racereadrangepc1(SB), NOSPLIT, $0-24
MOVD size+8(FP), R5
MOVD pc+16(FP), R6
ADD $4, R6 // tsan wants return addr
// void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc);
MOVD $__tsan_read_range(SB), R8
BR racecalladdr<>(SB)
// void __tsan_read_range(ThreadState *thr, void *addr, uintptr size, void *pc);
MOVD $__tsan_read_range(SB), R8
BR racecalladdr<>(SB)

TEXT runtime·RaceReadRange(SB), NOSPLIT, $0-24
BR runtime·racereadrange(SB)
Expand Down Expand Up @@ -384,8 +384,8 @@ racecallatomic_ignore:
MOVD R17, R6 // restore arg list addr
// Call the atomic function.
// racecall will call LLVM race code which might clobber r30 (g)
MOVD runtime·tls_g(SB), R10
MOVD 0(R13)(R10*1), g
MOVD runtime·tls_g(SB), R10
MOVD 0(R13)(R10*1), g

MOVD g_racectx(g), R3
MOVD R8, R4 // pc being called same TODO as above
Expand Down Expand Up @@ -516,7 +516,7 @@ rest:
BL runtime·racecallback(SB)
// All registers are clobbered after Go code, reload.
MOVD runtime·tls_g(SB), R10
MOVD 0(R13)(R10*1), g
MOVD 0(R13)(R10*1), g

MOVD g_m(g), R7
MOVD m_curg(R7), g // restore g = m->curg
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/rt0_linux_mipsx.s
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ TEXT _main<>(SB),NOSPLIT|NOFRAME,$0
JMP main(SB)

TEXT main(SB),NOSPLIT|NOFRAME,$0
// In external linking, libc jumps to main with argc in R4, argv in R5
// In external linking, libc jumps to main with argc in R4, argv in R5
MOVW $runtime·rt0_go(SB), R1
JMP (R1)
2 changes: 1 addition & 1 deletion src/runtime/sys_aix_ppc64.s
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TEXT asmsyscall6<>(SB),NOSPLIT,$256
CMP R6, R3
BNE skiperrno

// Save errno in libcall
// Save errno in libcall
BL runtime·load_g(SB)
MOVD g_m(g), R4
MOVD (m_mOS + mOS_perrno)(R4), R9
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/tls_arm.s
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ TEXT runtime·_initcgo(SB),NOSPLIT,$4
#ifdef TLSG_IS_VARIABLE
MOVW $runtime·tls_g(SB), R2 // arg 2: &tls_g
#else
MOVW $0, R2 // arg 2: not used when using platform tls
MOVW $0, R2 // arg 2: not used when using platform tls
#endif
MOVW $setg_gcc<>(SB), R1 // arg 1: setg
MOVW g, R0 // arg 0: G
Expand Down

0 comments on commit 26a5f6a

Please sign in to comment.