diff mbox series

[PULL,21/24] bsd-user: add arm target_signal.h

Message ID 20210423203959.78275-12-imp@bsdimp.com
State New
Headers show
Series [PULL,01/24] bsd-user: whitespace changes | expand

Commit Message

Warner Losh April 23, 2021, 8:39 p.m. UTC
From: Warner Losh <imp@bsdimp.com>

Add a arm target_signal.h to complete the files currently in the tree. The arm
directory isn't compiled, so it was missing target_signal.h. Update it to the
same level as x86 and sparc. This was abstracted from the target_arch_vmparam.h
file in the bsd-user branch.

Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Warner Losh <imp@bsdimp.com>
---
 bsd-user/arm/target_signal.h | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)
 create mode 100644 bsd-user/arm/target_signal.h

Comments

Richard Henderson April 23, 2021, 11:19 p.m. UTC | #1
On 4/23/21 1:39 PM, imp@bsdimp.com wrote:
> +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
> +{
> +    return state->regs[R_ESP];
> +}

Shall we just wait until arm actually compiles?
This won't, being a copy from x86...


r~
Warner Losh April 23, 2021, 11:47 p.m. UTC | #2
On Fri, Apr 23, 2021 at 5:19 PM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 4/23/21 1:39 PM, imp@bsdimp.com wrote:
> > +static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
> > +{
> > +    return state->regs[R_ESP];
> > +}
>
> Shall we just wait until arm actually compiles?
> This won't, being a copy from x86...
>

OK. Fair point. I'll drop this for now and pick it up when more of the arm
is in place. Good catch.


>
> r~
>
diff mbox series

Patch

diff --git a/bsd-user/arm/target_signal.h b/bsd-user/arm/target_signal.h
new file mode 100644
index 0000000000..02be90a2d1
--- /dev/null
+++ b/bsd-user/arm/target_signal.h
@@ -0,0 +1,31 @@ 
+/*
+ * ARM target specific signal handling code
+ *
+ *  Copyright (c) 2013 Stacey D. Son
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program 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 for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef TARGET_SIGNAL_H
+#define TARGET_SIGNAL_H
+
+#include "cpu.h"
+
+/* this struct defines a stack used during syscall handling */
+
+static inline abi_ulong get_sp_from_cpustate(CPUARMState *state)
+{
+    return state->regs[R_ESP];
+}
+
+#endif /* TARGET_SIGNAL_H */