aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2020-11-12 12:22:18 +0000
committerNick Clifton <nickc@redhat.com>2020-11-12 12:22:18 +0000
commit94cde56ab38348b901bb1f96c64bdd8cfaa578fe (patch)
tree6131e34f1d058219cf82a34ca184229a99cf8c40 /sim
parentbcb78b47614ed252226da1a688558a17d8a99ce8 (diff)
downloadgdb-94cde56ab38348b901bb1f96c64bdd8cfaa578fe.zip
gdb-94cde56ab38348b901bb1f96c64bdd8cfaa578fe.tar.gz
gdb-94cde56ab38348b901bb1f96c64bdd8cfaa578fe.tar.bz2
m32r sim: Add prototypes for functions that pass/return DI values
* m32r-sim.h (m32rbf_h_accum_get_handler): Always provide a prototype for this function. (m32rbf_h_accum_set_handler): Likewise. (m32r2f_h_accums_get_handler): Prototype. (m32r2f_h_accums_set_handler): Prototype.
Diffstat (limited to 'sim')
-rw-r--r--sim/m32r/ChangeLog8
-rw-r--r--sim/m32r/m32r-sim.h11
2 files changed, 18 insertions, 1 deletions
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 05f478b..698dbad 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,3 +1,11 @@
+2020-11-12 Nick Clifton <nickc@redhat.com>
+
+ * m32r-sim.h (m32rbf_h_accum_get_handler): Always provide a
+ prototype for this function.
+ (m32rbf_h_accum_set_handler): Likewise.
+ (m32r2f_h_accums_get_handler): Prototype.
+ (m32r2f_h_accums_set_handler): Prototype.
+
2020-09-18 Andrew Burgess <andrew.burgess@embecosm.com>
* m32r.c (m32rbf_register_size): New function.
diff --git a/sim/m32r/m32r-sim.h b/sim/m32r/m32r-sim.h
index 9f3e270..6f9f461 100644
--- a/sim/m32r/m32r-sim.h
+++ b/sim/m32r/m32r-sim.h
@@ -61,10 +61,19 @@ extern void m32rbf_h_psw_set_handler (SIM_CPU *, UQI);
XCONCAT2 (WANT_CPU,_h_psw_set_handler) (current_cpu, (val))
#endif
-#ifndef GET_H_ACCUM
+/* FIXME: These prototypes are necessary because the cgen generated
+ cpu.h, cpux.h and cpu2.h headers do not provide them, and functions
+ which take or return parameters that are larger than an int must be
+ prototyed in order for them to work correctly.
+
+ The correct solution is to fix the code in cgen/sim.scm to generate
+ prototypes for each of the functions it generates. */
extern DI m32rbf_h_accum_get_handler (SIM_CPU *);
extern void m32rbf_h_accum_set_handler (SIM_CPU *, DI);
+extern DI m32r2f_h_accums_get_handler (SIM_CPU *, UINT);
+extern void m32r2f_h_accums_set_handler (SIM_CPU *, UINT, DI);
+#ifndef GET_H_ACCUM
#define GET_H_ACCUM() \
XCONCAT2 (WANT_CPU,_h_accum_get_handler) (current_cpu)
#define SET_H_ACCUM(val) \