/* SPDX-License-Identifier: GPL-2.0-or-later */ /* * O32 interface for the 64 (or N32) ABI. * * Copyright (C) 2002, 2014 Maciej W. Rozycki
*/
#include <asm/asm.h>
#include <asm/regdef.h>
/* O32 register size. */
#define O32_SZREG 4 /* Maximum number of arguments supported. Must be even! */
#define O32_ARGC 32 /* Number of static registers we save. */
#define O32_STATC 11 /* Argument area frame size. */
#define O32_ARGSZ (O32_SZREG * O32_ARGC) /* Static register save area frame size. */
#define O32_STATSZ (SZREG * O32_STATC) /* Stack pointer register save area frame size. */
#define O32_SPSZ SZREG /* Combined area frame size. */
#define O32_FRAMESZ (O32_ARGSZ + O32_SPSZ + O32_STATSZ) /* Switched stack frame size. */
#define O32_NFRAMESZ (O32_ARGSZ + O32_SPSZ)
.text
/* * O32 function call dispatcher, for interfacing 32-bit ROM routines. * * The standard 64 (N32) calling sequence is supported, with a0 holding * a function pointer, a1 a pointer to the new stack to call the * function with or 0 if no stack switching is requested, a2-a7 -- the * function call's first six arguments, and the stack -- the remaining * arguments (up to O32_ARGC, including a2-a7). Static registers, gp * and fp are preserved, v0 holds the result. This code relies on the * called o32 function for sp and ra restoration and this dispatcher has * to be placed in a KSEGx (or KUSEG) address space. Any pointers * passed have to point to addresses within one of these spaces as well.
*/
NESTED(call_o32, O32_FRAMESZ, ra)
REG_SUBU sp,O32_FRAMESZ
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 und die Messung sind noch experimentell.