aboutsummaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-24 03:39:52 -0500
committerMike Frysinger <vapier@gentoo.org>2024-01-22 20:12:08 -0500
commit8fed036befd8e87e9a602a5fc926db30aad69af3 (patch)
tree954028e548c8143b814a29e918dc472b85597688 /cpu
parent48a121f83cae0a625f63d3ad5f8a9149f7fa964a (diff)
downloadgdb-8fed036befd8e87e9a602a5fc926db30aad69af3.zip
gdb-8fed036befd8e87e9a602a5fc926db30aad69af3.tar.gz
gdb-8fed036befd8e87e9a602a5fc926db30aad69af3.tar.bz2
sim: frv: fix -Wincompatible-function-pointer-types warnings [PR sim/29752]
Some compilers warn in the frv code: sem.c:24343:41: error: incompatible function pointer types passing 'void (SIM_CPU *, UINT, UDI)' (aka 'void (struct _sim_cpu *, unsigned int, unsigned long)') to parameter of type 'void (*)(SIM_CPU *, UINT, DI)' (aka 'void (*)(struct _sim_cpu *, unsigned int, long)') [-Wincompatible-function-pointer-types] This is due to frvbf_h_acc40U_set using UDI for setting the new value, but using the common sim_queue_fn_di_write API which uses DI. The same size, but different sign. We could change frvbf_h_acc40U_set to take a DI without changing behavior in practice: the UDI is already passed via the queue function which accepts a DI, and frvbf_h_acc40U_set already casts the input to UDI before running any operations on it. However, these files are all generated, so manual changes here would be reverted. Seems like we can only change the register type for all APIs in the cpu definition. This builds cleanly, and passes sim unittests. Not sure if it's 100% the answer, but seems to be the best we have currently. Bug: https://sourceware.org/PR29752
Diffstat (limited to 'cpu')
-rw-r--r--cpu/frv.cpu2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/frv.cpu b/cpu/frv.cpu
index d2fe7c6..fb637a6 100644
--- a/cpu/frv.cpu
+++ b/cpu/frv.cpu
@@ -2933,7 +2933,7 @@
(name h-acc40U)
(comment "40 bit unsigned accumulator")
(attrs PROFILE VIRTUAL)
- (type register UDI (64))
+ (type register DI (64))
(indices extern-keyword acc-names)
; The accumlator is made up of two 32 bit registers, accgi/acci.
; We want to extract this as a combined 40 unsigned bits