// 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
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
// 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
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.
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
// 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?
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)
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)
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)
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
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
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)
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
#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