From: Mike Frysinger Date: Sun, 27 Jun 2021 02:09:17 +0000 (-0400) Subject: sim: cgen: always leverage the ops prototypes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=694d6fdba114b7e4b1749a4575303625efb98fe3;p=binutils-gdb.git sim: cgen: always leverage the ops prototypes This fixes missing prototype warnings, and guarantees the prototypes stay in sync with the function definitions. --- diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 028c6073862..1675528f30b 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,7 @@ +2021-06-27 Mike Frysinger + + * cgen-ops.h: Move prototype blocks before function definitions. + 2021-06-27 Mike Frysinger * cgen-ops.h (SUBWORDSIQI): Add int 2nd argument. diff --git a/sim/common/cgen-ops.h b/sim/common/cgen-ops.h index ddd3855924b..bb43e09a093 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 *);