From 248a8d5abba8744efc88ac5094b22357ab8f62e4 Mon Sep 17 00:00:00 2001 From: miod Date: Fri, 29 Mar 2024 21:04:37 +0000 Subject: [PATCH] Now that this file is no longer used by any libc C file, get rid of checks for the _LIBC preprocessor symbol. Also move the CC64FSZ and BIAS defines earlier in order to only have one !_LOCORE block. ok claudio@ kettenis@ --- sys/arch/sparc64/include/frame.h | 34 ++++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/sys/arch/sparc64/include/frame.h b/sys/arch/sparc64/include/frame.h index a3a199b00d5..8d9542356f4 100644 --- a/sys/arch/sparc64/include/frame.h +++ b/sys/arch/sparc64/include/frame.h @@ -1,4 +1,4 @@ -/* $OpenBSD: frame.h,v 1.9 2023/11/14 10:12:24 claudio Exp $ */ +/* $OpenBSD: frame.h,v 1.10 2024/03/29 21:04:37 miod Exp $ */ /* $NetBSD: frame.h,v 1.9 2001/03/04 09:28:35 mrg Exp $ */ /* @@ -44,6 +44,20 @@ #ifndef _MACHINE_FRAME_H_ #define _MACHINE_FRAME_H_ +/* + * CC64FSZ (C Compiler 64-bit Frame SiZe) is the size of a stack frame used + * by the compiler in 64-bit mode. It is (16)*8; space for 8 ins, 8 outs. + */ +#define CC64FSZ 176 + +/* + * v9 stacks all have a bias of 2047 added to the %sp and %fp, so you can easily + * detect it by testing the register for an odd value. Why 2K-1 I don't know. + */ +#define BIAS (2048-1) + +#if defined(_KERNEL) && !defined(_LOCORE) + /* * Sparc v9 stack frame format. * @@ -55,7 +69,6 @@ * V9 frames have an odd bias, so you can tell a v9 frame from * a v8 frame by testing the stack pointer's lsb. */ -#if !defined(_LOCORE) && !defined(_LIBC) struct frame { int64_t fr_local[8]; /* space to save locals (%l0..%l7) */ int64_t fr_arg[6]; /* space to save arguments (%i0..%i5) */ @@ -69,21 +82,7 @@ struct frame { }; #define v9next_frame(f) ((struct frame*)(f->fr_fp+BIAS)) -#endif -/* - * CC64FSZ (C Compiler 64-bit Frame SiZe) is the size of a stack frame used - * by the compiler in 64-bit mode. It is (16)*8; space for 8 ins, 8 outs. - */ -#define CC64FSZ 176 - -/* - * v9 stacks all have a bias of 2047 added to the %sp and %fp, so you can easily - * detect it by testing the register for an odd value. Why 2K-1 I don't know. - */ -#define BIAS (2048-1) - -#ifndef _LOCORE /* * The v9 trapframe. Since we don't get a free register window with * each trap we need some way to keep track of pending traps. We use @@ -106,6 +105,7 @@ struct trapframe { int64_t tf_local[8]; /* local registers in trap's caller */ int64_t tf_in[8]; /* in registers in trap's caller (for debug) */ }; -#endif + +#endif /* _KERNEL && !_LOCORE */ #endif /* _MACHINE_FRAME_H_ */ -- 2.20.1