aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-26 22:09:17 -0400
committerMike Frysinger <vapier@gentoo.org>2021-06-27 10:42:51 -0400
commit694d6fdba114b7e4b1749a4575303625efb98fe3 (patch)
treeee0896699fbc741b79bd6759cbe6545b60bc43d1 /sim/common
parent5a4ce7aea038e899df2ffa68e2fa945a3bb5c622 (diff)
downloadgdb-694d6fdba114b7e4b1749a4575303625efb98fe3.zip
gdb-694d6fdba114b7e4b1749a4575303625efb98fe3.tar.gz
gdb-694d6fdba114b7e4b1749a4575303625efb98fe3.tar.bz2
sim: cgen: always leverage the ops prototypes
This fixes missing prototype warnings, and guarantees the prototypes stay in sync with the function definitions.
Diffstat (limited to 'sim/common')
-rw-r--r--sim/common/ChangeLog4
-rw-r--r--sim/common/cgen-ops.h96
2 files changed, 50 insertions, 50 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 028c607..1675528 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,9 @@
2021-06-27 Mike Frysinger <vapier@gentoo.org>
+ * cgen-ops.h: Move prototype blocks before function definitions.
+
+2021-06-27 Mike Frysinger <vapier@gentoo.org>
+
* cgen-ops.h (SUBWORDSIQI): Add int 2nd argument.
(SUBWORDSIHI, SUBWORDSIUQI, SUBWORDDIUQI): Likewise.
(ADDCFSI): Change return type to BI.
diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h
index ddd3855..bb43e09 100644
--- a/sim/common/cgen-ops.h
+++ b/sim/common/cgen-ops.h
@@ -301,6 +301,27 @@ extern SI TRUNCDISI (DI);
significant and word number 0 is the most significant word.
??? May also wish an endian-dependent version. Later. */
+QI SUBWORDSIQI (SI, int);
+HI SUBWORDSIHI (SI, int);
+SI SUBWORDSFSI (SF);
+SF SUBWORDSISF (SI);
+DI SUBWORDDFDI (DF);
+DF SUBWORDDIDF (DI);
+QI SUBWORDDIQI (DI, int);
+HI SUBWORDDIHI (DI, int);
+SI SUBWORDDISI (DI, int);
+SI SUBWORDDFSI (DF, int);
+SI SUBWORDXFSI (XF, int);
+SI SUBWORDTFSI (TF, int);
+
+UQI SUBWORDSIUQI (SI, int);
+UQI SUBWORDDIUQI (DI, int);
+
+DI JOINSIDI (SI, SI);
+DF JOINSIDF (SI, SI);
+XF JOINSIXF (SI, SI, SI);
+TF JOINSITF (SI, SI, SI, SI);
+
#ifdef SEMOPS_DEFINE_INLINE
SEMOPS_INLINE SF
@@ -461,33 +482,35 @@ JOINSITF (SI x0, SI x1, SI x2, SI x3)
return x.out;
}
-#else
-
-QI SUBWORDSIQI (SI, int);
-HI SUBWORDSIHI (SI, int);
-SI SUBWORDSFSI (SF);
-SF SUBWORDSISF (SI);
-DI SUBWORDDFDI (DF);
-DF SUBWORDDIDF (DI);
-QI SUBWORDDIQI (DI, int);
-HI SUBWORDDIHI (DI, int);
-SI SUBWORDDISI (DI, int);
-SI SUBWORDDFSI (DF, int);
-SI SUBWORDXFSI (XF, int);
-SI SUBWORDTFSI (TF, int);
-
-UQI SUBWORDSIUQI (SI, int);
-UQI SUBWORDDIUQI (DI, int);
-
-DI JOINSIDI (SI, SI);
-DF JOINSIDF (SI, SI);
-XF JOINSIXF (SI, SI, SI);
-TF JOINSITF (SI, SI, SI, SI);
-
#endif /* SUBWORD,JOIN */
/* Semantic support utilities. */
+SI ADDCSI (SI, SI, BI);
+BI ADDCFSI (SI, SI, BI);
+BI ADDOFSI (SI, SI, BI);
+SI SUBCSI (SI, SI, BI);
+BI SUBCFSI (SI, SI, BI);
+BI SUBOFSI (SI, SI, BI);
+HI ADDCHI (HI, HI, BI);
+BI ADDCFHI (HI, HI, BI);
+BI ADDOFHI (HI, HI, BI);
+HI SUBCHI (HI, HI, BI);
+BI SUBCFHI (HI, HI, BI);
+BI SUBOFHI (HI, HI, BI);
+QI ADDCQI (QI, QI, BI);
+BI ADDCFQI (QI, QI, BI);
+BI ADDOFQI (QI, QI, BI);
+QI SUBCQI (QI, QI, BI);
+BI SUBCFQI (QI, QI, BI);
+BI SUBOFQI (QI, QI, BI);
+BI MUL1OFSI (USI a, USI b);
+BI MUL2OFSI (SI a, SI b);
+BI ADDCFDI (DI a, DI b, BI c);
+BI ADDOFDI (DI a, DI b, BI c);
+BI SUBCFDI (DI a, DI b, BI c);
+BI SUBOFDI (DI a, DI b, BI c);
+
#ifdef SEMOPS_DEFINE_INLINE
SEMOPS_INLINE SI
@@ -680,33 +703,6 @@ SUBOFDI (DI a, DI b, BI c)
return res;
}
-#else
-
-SI ADDCSI (SI, SI, BI);
-BI ADDCFSI (SI, SI, BI);
-BI ADDOFSI (SI, SI, BI);
-SI SUBCSI (SI, SI, BI);
-BI SUBCFSI (SI, SI, BI);
-BI SUBOFSI (SI, SI, BI);
-HI ADDCHI (HI, HI, BI);
-BI ADDCFHI (HI, HI, BI);
-BI ADDOFHI (HI, HI, BI);
-HI SUBCHI (HI, HI, BI);
-BI SUBCFHI (HI, HI, BI);
-BI SUBOFHI (HI, HI, BI);
-QI ADDCQI (QI, QI, BI);
-BI ADDCFQI (QI, QI, BI);
-BI ADDOFQI (QI, QI, BI);
-QI SUBCQI (QI, QI, BI);
-BI SUBCFQI (QI, QI, BI);
-BI SUBOFQI (QI, QI, BI);
-BI MUL1OFSI (USI a, USI b);
-BI MUL2OFSI (SI a, SI b);
-BI ADDCFDI (DI a, DI b, BI c);
-BI ADDOFDI (DI a, DI b, BI c);
-BI SUBCFDI (DI a, DI b, BI c);
-BI SUBOFDI (DI a, DI b, BI c);
-
#endif
extern void cgen_rtx_error (SIM_CPU *, const char *);