From: Leon Alrae <leon.alrae@imgtec.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PULL 27/28] target-mips/dsp_helper.c: Add ifdef guards around various functions
Date: Wed, 15 Oct 2014 10:54:19 +0100 [thread overview]
Message-ID: <1413366860-7833-28-git-send-email-leon.alrae@imgtec.com> (raw)
In-Reply-To: <1413366860-7833-1-git-send-email-leon.alrae@imgtec.com>
From: Peter Maydell <peter.maydell@linaro.org>
Add ifdef TARGET_MIPS64 guards around various functions that are only
called from helpers for TARGET_MIPS64 CPUs; this avoids compiler
warnings when building other configs.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
---
target-mips/dsp_helper.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c
index 2ea94a7..349f2a0 100644
--- a/target-mips/dsp_helper.c
+++ b/target-mips/dsp_helper.c
@@ -274,6 +274,7 @@ static inline int32_t mipsdsp_sat32_acc_q31(int32_t acc, int32_t a,
return result;
}
+#ifdef TARGET_MIPS64
/* a[0] is LO, a[1] is HI. */
static inline void mipsdsp_sat64_acc_add_q63(int64_t *ret,
int32_t ac,
@@ -327,6 +328,7 @@ static inline void mipsdsp_sat64_acc_sub_q63(int64_t *ret,
set_DSPControl_overflow_flag(1, 16 + ac, env);
}
}
+#endif
static inline int32_t mipsdsp_mul_i16_i16(int16_t a, int16_t b,
CPUMIPSState *env)
@@ -348,10 +350,12 @@ static inline int32_t mipsdsp_mul_u16_u16(int32_t a, int32_t b)
return a * b;
}
+#ifdef TARGET_MIPS64
static inline int32_t mipsdsp_mul_i32_i32(int32_t a, int32_t b)
{
return a * b;
}
+#endif
static inline int32_t mipsdsp_sat16_mul_i16_i16(int16_t a, int16_t b,
CPUMIPSState *env)
@@ -408,10 +412,12 @@ static inline int16_t mipsdsp_rashift16(int16_t a, target_ulong mov)
return a >> mov;
}
+#ifdef TARGET_MIPS64
static inline int32_t mipsdsp_rashift32(int32_t a, target_ulong mov)
{
return a >> mov;
}
+#endif
static inline int16_t mipsdsp_rshift1_add_q16(int16_t a, int16_t b)
{
@@ -470,6 +476,7 @@ static inline uint8_t mipsdsp_rrshift1_add_u8(uint8_t a, uint8_t b)
return (temp >> 1) & 0x00FF;
}
+#ifdef TARGET_MIPS64
static inline uint8_t mipsdsp_rshift1_sub_u8(uint8_t a, uint8_t b)
{
uint16_t temp;
@@ -487,6 +494,7 @@ static inline uint8_t mipsdsp_rrshift1_sub_u8(uint8_t a, uint8_t b)
return (temp >> 1) & 0x00FF;
}
+#endif
/* 128 bits long. p[0] is LO, p[1] is HI. */
static inline void mipsdsp_rndrashift_short_acc(int64_t *p,
@@ -502,6 +510,7 @@ static inline void mipsdsp_rndrashift_short_acc(int64_t *p,
p[1] = (acc >> 63) & 0x01;
}
+#ifdef TARGET_MIPS64
/* 128 bits long. p[0] is LO, p[1] is HI */
static inline void mipsdsp_rashift_acc(uint64_t *p,
uint32_t ac,
@@ -549,6 +558,7 @@ static inline void mipsdsp_rndrashift_acc(uint64_t *p,
}
}
}
+#endif
static inline int32_t mipsdsp_mul_q15_q15(int32_t ac, uint16_t a, uint16_t b,
CPUMIPSState *env)
@@ -599,10 +609,12 @@ static inline uint16_t mipsdsp_mul_u8_u16(uint8_t a, uint16_t b,
return tempI & 0x0000FFFF;
}
+#ifdef TARGET_MIPS64
static inline uint64_t mipsdsp_mul_u32_u32(uint32_t a, uint32_t b)
{
return (uint64_t)a * (uint64_t)b;
}
+#endif
static inline int16_t mipsdsp_rndq15_mul_q15_q15(uint16_t a, uint16_t b,
CPUMIPSState *env)
@@ -708,7 +720,7 @@ static inline uint16_t mipsdsp_lshift16(uint16_t a, uint8_t s,
return a << s;
}
-
+#ifdef TARGET_MIPS64
static inline uint32_t mipsdsp_lshift32(uint32_t a, uint8_t s,
CPUMIPSState *env)
{
@@ -725,6 +737,7 @@ static inline uint32_t mipsdsp_lshift32(uint32_t a, uint8_t s,
return a << s;
}
}
+#endif
static inline uint16_t mipsdsp_sat16_lshift(uint16_t a, uint8_t s,
CPUMIPSState *env)
@@ -964,6 +977,7 @@ static inline uint8_t mipsdsp_satu8_sub(uint8_t a, uint8_t b, CPUMIPSState *env)
return temp & 0x00FF;
}
+#ifdef TARGET_MIPS64
static inline uint32_t mipsdsp_sub32(int32_t a, int32_t b, CPUMIPSState *env)
{
int32_t temp;
@@ -988,6 +1002,7 @@ static inline int32_t mipsdsp_add_i32(int32_t a, int32_t b, CPUMIPSState *env)
return temp;
}
+#endif
static inline int32_t mipsdsp_cmp_eq(int32_t a, int32_t b)
{
--
2.1.0
next prev parent reply other threads:[~2014-10-15 9:55 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-15 9:53 [Qemu-devel] [PULL 00/28] target-mips queue Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 01/28] target-mips: define ISA_MIPS64R6 Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 02/28] target-mips: signal RI Exception on instructions removed in R6 Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 03/28] target-mips: add SELEQZ and SELNEZ instructions Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 04/28] target-mips: move LL and SC instructions Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 05/28] target-mips: extract decode_opc_special* from decode_opc Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 06/28] target-mips: split decode_opc_special* into *_r6 and *_legacy Leon Alrae
2014-10-15 9:53 ` [Qemu-devel] [PULL 07/28] target-mips: signal RI Exception on DSP and Loongson instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 08/28] target-mips: move PREF, CACHE, LLD and SCD instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 09/28] target-mips: redefine Integer Multiply and Divide instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 10/28] target-mips: move CLO, DCLO, CLZ, DCLZ, SDBBP and free special2 in R6 Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 11/28] target-mips: Status.UX/SX/KX enable 32-bit address wrapping Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 12/28] target-mips: add ALIGN, DALIGN, BITSWAP and DBITSWAP instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 13/28] target-mips: add compact and CP1 branches Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 14/28] target-mips: add AUI, LSA and PCREL instruction families Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 15/28] softfloat: add functions corresponding to IEEE-2008 min/maxNumMag Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 16/28] target-mips: add new Floating Point instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 17/28] target-mips: add new Floating Point Comparison instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 18/28] target-mips: do not allow Status.FR=0 mode in 64-bit FPU Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 19/28] target-mips: remove JR, BLTZAL, BGEZAL and add NAL, BAL instructions Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 20/28] mips_malta: update malta's pseudo-bootloader - replace JR with JALR Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 21/28] target-mips: define a new generic CPU supporting MIPS64 Release 6 ISA Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 22/28] target-mips/translate.c: Update OPC_SYNCI Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 23/28] target-mips: fix broken MIPS16 and microMIPS Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 24/28] target-mips/dsp_helper.c: Remove unused function get_DSPControl_24() Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 25/28] target-mips/op_helper.c: Remove unused do_lbu() function Leon Alrae
2014-10-15 9:54 ` [Qemu-devel] [PULL 26/28] target-mips/translate.c: Add ifdef guard around check_mips64() Leon Alrae
2014-10-15 9:54 ` Leon Alrae [this message]
2014-10-15 9:54 ` [Qemu-devel] [PULL 28/28] target-mips: Remove unused gen_load_ACX, gen_store_ACX and cpu_ACX Leon Alrae
2014-10-16 9:49 ` [Qemu-devel] [PULL 00/28] target-mips queue Peter Maydell
2014-10-16 9:59 ` Leon Alrae
2014-10-22 12:08 ` Peter Maydell
2014-10-22 12:22 ` Peter Maydell
2014-10-22 12:32 ` Leon Alrae
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413366860-7833-28-git-send-email-leon.alrae@imgtec.com \
--to=leon.alrae@imgtec.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).