/* * Copyright (c) 2000, 2022, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2021 SAP SE. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. *
*/
// C frame layout on PPC-64. // // In this figure the stack grows upwards, while memory grows // downwards. See "64-bit PowerPC ELF ABI Supplement Version 1.7", // IBM Corp. (2003-10-29) // (http://math-atlas.sourceforge.net/devel/assembly/PPC-elf64abi-1.7.pdf). // // Square brackets denote stack regions possibly larger // than a single 64 bit slot. // // STACK: // 0 [C_FRAME] <-- SP after prolog (mod 16 = 0) // [C_FRAME] <-- SP before prolog // ... // [C_FRAME] // // C_FRAME: // 0 [ABI_REG_ARGS] // 112 CARG_9: outgoing arg 9 (arg_1 ... arg_8 via gpr_3 ... gpr_{10}) // ... // 40+M*8 CARG_M: outgoing arg M (M is the maximum of outgoing args taken over all call sites in the procedure) // local 1 // ... // local N // spill slot for vector reg (16 bytes aligned) // ... // spill slot for vector reg // alignment (4 or 12 bytes) // V SR_VRSAVE // V+4 spill slot for GR // ... ... // spill slot for GR // spill slot for FR // ... // spill slot for FR // // ABI_48: // 0 caller's SP // 8 space for condition register (CR) for next call // 16 space for link register (LR) for next call // 24 reserved // 32 reserved // 40 space for TOC (=R2) register for next call // // ABI_REG_ARGS: // 0 [ABI_48] // 48 CARG_1: spill slot for outgoing arg 1. used by next callee. // ... ... // 104 CARG_8: spill slot for outgoing arg 8. used by next callee. //
public:
// C frame layout staticconstint alignment_in_bytes = 16;
// STACK: // ... // [THIS_FRAME] <-- this._sp (stack pointer for this frame) // [CALLER_FRAME] <-- this.fp() (_sp of caller's frame) // ... //
// The frame's stack pointer before it has been extended by a c2i adapter; // needed by deoptimization union {
intptr_t* _unextended_sp; int _offset_unextended_sp; // for use in stack-chunk frames
};
union {
intptr_t* _fp; // frame pointer int _offset_fp; // relative frame pointer for use in stack-chunk frames
};
enum { // normal return address is 1 bundle past PC
pc_return_offset = 0, // size, in words, of frame metadata (e.g. pc and link)
metadata_words = sizeof(abi_minframe) >> LogBytesPerWord, // size, in words, of metadata at frame bottom, i.e. it is not part of the // caller/callee overlap
metadata_words_at_bottom = 0, // size, in words, of frame metadata at the frame top, i.e. it is located // between a callee frame and its stack arguments, where it is part // of the caller/callee overlap
metadata_words_at_top = sizeof(abi_minframe) >> LogBytesPerWord, // size, in words, of frame metadata at the frame top that needs // to be reserved for callee functions in the runtime
frame_alignment = 16,
frame_alignment_in_words = frame_alignment >> LogBytesPerWord, // size, in words, of maximum shift in frame position due to alignment
align_wiggle = 1
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.