/* SPDX-License-Identifier: LGPL-2.1 OR MIT */ /* * SPARC (32bit and 64bit) specific definitions for NOLIBC * Copyright (C) 2025 Thomas Weißschuh <linux@weissschuh.net>
*/
/* * Syscalls for SPARC: * - registers are native word size * - syscall number is passed in g1 * - arguments are in o0-o5 * - the system call is performed by calling a trap instruction * - syscall return value is in o0 * - syscall error flag is in the carry bit of the processor status register
*/
/* startup code */ void __attribute__((weak, noreturn)) __nolibc_entrypoint __no_stack_protector _start(void)
{
__asm__ volatile ( /* * Save argc pointer to o0, as arg1 of _start_c. * Account for the window save area, which is 16 registers wide.
*/ #ifdef __arch64__ "add %sp, 128 + 2047, %o0\n"/* on sparc64 / v9 the stack is offset by 2047 */ #else "add %sp, 64, %o0\n" #endif "b,a _start_c\n"/* transfer to c runtime */
);
__nolibc_entrypoint_epilogue();
}
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.