Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/golang/src/runtime/cgo
File: abi_amd64.h
// Copyright 2021 The Go Authors. All rights reserved.
[0] Fix | Delete
// Use of this source code is governed by a BSD-style
[1] Fix | Delete
// license that can be found in the LICENSE file.
[2] Fix | Delete
[3] Fix | Delete
// Macros for transitioning from the host ABI to Go ABI0.
[4] Fix | Delete
//
[5] Fix | Delete
// These save the frame pointer, so in general, functions that use
[6] Fix | Delete
// these should have zero frame size to suppress the automatic frame
[7] Fix | Delete
// pointer, though it's harmless to not do this.
[8] Fix | Delete
[9] Fix | Delete
#ifdef GOOS_windows
[10] Fix | Delete
[11] Fix | Delete
// REGS_HOST_TO_ABI0_STACK is the stack bytes used by
[12] Fix | Delete
// PUSH_REGS_HOST_TO_ABI0.
[13] Fix | Delete
#define REGS_HOST_TO_ABI0_STACK (28*8 + 8)
[14] Fix | Delete
[15] Fix | Delete
// PUSH_REGS_HOST_TO_ABI0 prepares for transitioning from
[16] Fix | Delete
// the host ABI to Go ABI0 code. It saves all registers that are
[17] Fix | Delete
// callee-save in the host ABI and caller-save in Go ABI0 and prepares
[18] Fix | Delete
// for entry to Go.
[19] Fix | Delete
//
[20] Fix | Delete
// Save DI SI BP BX R12 R13 R14 R15 X6-X15 registers and the DF flag.
[21] Fix | Delete
// Clear the DF flag for the Go ABI.
[22] Fix | Delete
// MXCSR matches the Go ABI, so we don't have to set that,
[23] Fix | Delete
// and Go doesn't modify it, so we don't have to save it.
[24] Fix | Delete
#define PUSH_REGS_HOST_TO_ABI0() \
[25] Fix | Delete
PUSHFQ \
[26] Fix | Delete
CLD \
[27] Fix | Delete
ADJSP $(REGS_HOST_TO_ABI0_STACK - 8) \
[28] Fix | Delete
MOVQ DI, (0*0)(SP) \
[29] Fix | Delete
MOVQ SI, (1*8)(SP) \
[30] Fix | Delete
MOVQ BP, (2*8)(SP) \
[31] Fix | Delete
MOVQ BX, (3*8)(SP) \
[32] Fix | Delete
MOVQ R12, (4*8)(SP) \
[33] Fix | Delete
MOVQ R13, (5*8)(SP) \
[34] Fix | Delete
MOVQ R14, (6*8)(SP) \
[35] Fix | Delete
MOVQ R15, (7*8)(SP) \
[36] Fix | Delete
MOVUPS X6, (8*8)(SP) \
[37] Fix | Delete
MOVUPS X7, (10*8)(SP) \
[38] Fix | Delete
MOVUPS X8, (12*8)(SP) \
[39] Fix | Delete
MOVUPS X9, (14*8)(SP) \
[40] Fix | Delete
MOVUPS X10, (16*8)(SP) \
[41] Fix | Delete
MOVUPS X11, (18*8)(SP) \
[42] Fix | Delete
MOVUPS X12, (20*8)(SP) \
[43] Fix | Delete
MOVUPS X13, (22*8)(SP) \
[44] Fix | Delete
MOVUPS X14, (24*8)(SP) \
[45] Fix | Delete
MOVUPS X15, (26*8)(SP)
[46] Fix | Delete
[47] Fix | Delete
#define POP_REGS_HOST_TO_ABI0() \
[48] Fix | Delete
MOVQ (0*0)(SP), DI \
[49] Fix | Delete
MOVQ (1*8)(SP), SI \
[50] Fix | Delete
MOVQ (2*8)(SP), BP \
[51] Fix | Delete
MOVQ (3*8)(SP), BX \
[52] Fix | Delete
MOVQ (4*8)(SP), R12 \
[53] Fix | Delete
MOVQ (5*8)(SP), R13 \
[54] Fix | Delete
MOVQ (6*8)(SP), R14 \
[55] Fix | Delete
MOVQ (7*8)(SP), R15 \
[56] Fix | Delete
MOVUPS (8*8)(SP), X6 \
[57] Fix | Delete
MOVUPS (10*8)(SP), X7 \
[58] Fix | Delete
MOVUPS (12*8)(SP), X8 \
[59] Fix | Delete
MOVUPS (14*8)(SP), X9 \
[60] Fix | Delete
MOVUPS (16*8)(SP), X10 \
[61] Fix | Delete
MOVUPS (18*8)(SP), X11 \
[62] Fix | Delete
MOVUPS (20*8)(SP), X12 \
[63] Fix | Delete
MOVUPS (22*8)(SP), X13 \
[64] Fix | Delete
MOVUPS (24*8)(SP), X14 \
[65] Fix | Delete
MOVUPS (26*8)(SP), X15 \
[66] Fix | Delete
ADJSP $-(REGS_HOST_TO_ABI0_STACK - 8) \
[67] Fix | Delete
POPFQ
[68] Fix | Delete
[69] Fix | Delete
#else
[70] Fix | Delete
// SysV ABI
[71] Fix | Delete
[72] Fix | Delete
#define REGS_HOST_TO_ABI0_STACK (6*8)
[73] Fix | Delete
[74] Fix | Delete
// SysV MXCSR matches the Go ABI, so we don't have to set that,
[75] Fix | Delete
// and Go doesn't modify it, so we don't have to save it.
[76] Fix | Delete
// Both SysV and Go require DF to be cleared, so that's already clear.
[77] Fix | Delete
// The SysV and Go frame pointer conventions are compatible.
[78] Fix | Delete
#define PUSH_REGS_HOST_TO_ABI0() \
[79] Fix | Delete
ADJSP $(REGS_HOST_TO_ABI0_STACK) \
[80] Fix | Delete
MOVQ BP, (5*8)(SP) \
[81] Fix | Delete
LEAQ (5*8)(SP), BP \
[82] Fix | Delete
MOVQ BX, (0*8)(SP) \
[83] Fix | Delete
MOVQ R12, (1*8)(SP) \
[84] Fix | Delete
MOVQ R13, (2*8)(SP) \
[85] Fix | Delete
MOVQ R14, (3*8)(SP) \
[86] Fix | Delete
MOVQ R15, (4*8)(SP)
[87] Fix | Delete
[88] Fix | Delete
#define POP_REGS_HOST_TO_ABI0() \
[89] Fix | Delete
MOVQ (0*8)(SP), BX \
[90] Fix | Delete
MOVQ (1*8)(SP), R12 \
[91] Fix | Delete
MOVQ (2*8)(SP), R13 \
[92] Fix | Delete
MOVQ (3*8)(SP), R14 \
[93] Fix | Delete
MOVQ (4*8)(SP), R15 \
[94] Fix | Delete
MOVQ (5*8)(SP), BP \
[95] Fix | Delete
ADJSP $-(REGS_HOST_TO_ABI0_STACK)
[96] Fix | Delete
[97] Fix | Delete
#endif
[98] Fix | Delete
[99] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function