Sat May 4 12:42:09 2024 UTC (16d)
Fix the __greg_t typedef for riscv32


(skrll)
diff -r1.7 -r1.8 src/sys/arch/riscv/include/mcontext.h

cvs diff -r1.7 -r1.8 src/sys/arch/riscv/include/mcontext.h (expand / switch to unified diff)

--- src/sys/arch/riscv/include/mcontext.h 2023/05/07 12:41:48 1.7
+++ src/sys/arch/riscv/include/mcontext.h 2024/05/04 12:42:09 1.8
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mcontext.h,v 1.7 2023/05/07 12:41:48 skrll Exp $ */ 1/* $NetBSD: mcontext.h,v 1.8 2024/05/04 12:42:09 skrll Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 4 * Copyright (c) 2014 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Matt Thomas of 3am Software Foundry. 8 * by Matt Thomas of 3am Software Foundry.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -38,27 +38,27 @@ @@ -38,27 +38,27 @@
38#define _NFREG 33 /* F0-31, FCSR */ 38#define _NFREG 33 /* F0-31, FCSR */
39 39
40/* 40/*
41 * This fragment is common to <riscv/mcontext.h> and <riscv/reg.h> 41 * This fragment is common to <riscv/mcontext.h> and <riscv/reg.h>
42 */ 42 */
43#ifndef _BSD_FPREG_T_ 43#ifndef _BSD_FPREG_T_
44union __fpreg { 44union __fpreg {
45 __uint64_t u_u64; 45 __uint64_t u_u64;
46 double u_d; 46 double u_d;
47}; 47};
48#define _BSD_FPREG_T_ union __fpreg 48#define _BSD_FPREG_T_ union __fpreg
49#endif 49#endif
50 50
51typedef __uint64_t __greg_t; 51typedef long __greg_t;
52typedef __greg_t __gregset_t[_NGREG]; 52typedef __greg_t __gregset_t[_NGREG];
53typedef __uint32_t __greg32_t; 53typedef __uint32_t __greg32_t;
54typedef __greg32_t __gregset32_t[_NGREG]; 54typedef __greg32_t __gregset32_t[_NGREG];
55typedef _BSD_FPREG_T_ __fregset_t[_NFREG]; 55typedef _BSD_FPREG_T_ __fregset_t[_NFREG];
56 56
57#define _REG_X1 0 57#define _REG_X1 0
58#define _REG_X2 1 58#define _REG_X2 1
59#define _REG_X3 2 59#define _REG_X3 2
60#define _REG_X4 3 60#define _REG_X4 3
61#define _REG_X5 4 61#define _REG_X5 4
62#define _REG_X6 5 62#define _REG_X6 5
63#define _REG_X7 6 63#define _REG_X7 6
64#define _REG_X8 7 64#define _REG_X8 7