aboutsummaryrefslogtreecommitdiff
path: root/target-ppc/op_helper.c
diff options
context:
space:
mode:
authorj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-07 17:13:44 +0000
committerj_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-07 17:13:44 +0000
commitb068d6a7138292de0f5c5fa6c99f0b79d4e1e7f0 (patch)
treeae7e18b4a29289cd7633294277939ac045d256a1 /target-ppc/op_helper.c
parented26abdbc138db8fe845e5dfed4c2d8480c77a8f (diff)
PowerPC target optimisations: make intensive use of always_inline.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3347 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-ppc/op_helper.c')
-rw-r--r--target-ppc/op_helper.c108
1 files changed, 54 insertions, 54 deletions
diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c
index 56d2af75d1..7a758f6c06 100644
--- a/target-ppc/op_helper.c
+++ b/target-ppc/op_helper.c
@@ -601,7 +601,7 @@ void do_srad (void)
}
#endif
-static inline int popcnt (uint32_t val)
+static always_inline int popcnt (uint32_t val)
{
int i;
@@ -707,7 +707,7 @@ void do_fctidz (void)
#endif
-static inline void do_fri (int rounding_mode)
+static always_inline void do_fri (int rounding_mode)
{
int curmode;
@@ -1430,12 +1430,12 @@ static uint8_t hbrev[16] = {
0x1, 0x9, 0x5, 0xD, 0x3, 0xB, 0x7, 0xF,
};
-static inline uint8_t byte_reverse (uint8_t val)
+static always_inline uint8_t byte_reverse (uint8_t val)
{
return hbrev[val >> 4] | (hbrev[val & 0xF] << 4);
}
-static inline uint32_t word_reverse (uint32_t val)
+static always_inline uint32_t word_reverse (uint32_t val)
{
return byte_reverse(val >> 24) | (byte_reverse(val >> 16) << 8) |
(byte_reverse(val >> 8) << 16) | (byte_reverse(val) << 24);
@@ -1468,7 +1468,7 @@ void do_ev##name (void) \
}
/* Fixed-point vector arithmetic */
-static inline uint32_t _do_eabs (uint32_t val)
+static always_inline uint32_t _do_eabs (uint32_t val)
{
if (val != 0x80000000)
val &= ~0x80000000;
@@ -1476,12 +1476,12 @@ static inline uint32_t _do_eabs (uint32_t val)
return val;
}
-static inline uint32_t _do_eaddw (uint32_t op1, uint32_t op2)
+static always_inline uint32_t _do_eaddw (uint32_t op1, uint32_t op2)
{
return op1 + op2;
}
-static inline int _do_ecntlsw (uint32_t val)
+static always_inline int _do_ecntlsw (uint32_t val)
{
if (val & 0x80000000)
return _do_cntlzw(~val);
@@ -1489,12 +1489,12 @@ static inline int _do_ecntlsw (uint32_t val)
return _do_cntlzw(val);
}
-static inline int _do_ecntlzw (uint32_t val)
+static always_inline int _do_ecntlzw (uint32_t val)
{
return _do_cntlzw(val);
}
-static inline uint32_t _do_eneg (uint32_t val)
+static always_inline uint32_t _do_eneg (uint32_t val)
{
if (val != 0x80000000)
val ^= 0x80000000;
@@ -1502,35 +1502,35 @@ static inline uint32_t _do_eneg (uint32_t val)
return val;
}
-static inline uint32_t _do_erlw (uint32_t op1, uint32_t op2)
+static always_inline uint32_t _do_erlw (uint32_t op1, uint32_t op2)
{
return rotl32(op1, op2);
}
-static inline uint32_t _do_erndw (uint32_t val)
+static always_inline uint32_t _do_erndw (uint32_t val)
{
return (val + 0x000080000000) & 0xFFFF0000;
}
-static inline uint32_t _do_eslw (uint32_t op1, uint32_t op2)
+static always_inline uint32_t _do_eslw (uint32_t op1, uint32_t op2)
{
/* No error here: 6 bits are used */
return op1 << (op2 & 0x3F);
}
-static inline int32_t _do_esrws (int32_t op1, uint32_t op2)
+static always_inline int32_t _do_esrws (int32_t op1, uint32_t op2)
{
/* No error here: 6 bits are used */
return op1 >> (op2 & 0x3F);
}
-static inline uint32_t _do_esrwu (uint32_t op1, uint32_t op2)
+static always_inline uint32_t _do_esrwu (uint32_t op1, uint32_t op2)
{
/* No error here: 6 bits are used */
return op1 >> (op2 & 0x3F);
}
-static inline uint32_t _do_esubfw (uint32_t op1, uint32_t op2)
+static always_inline uint32_t _do_esubfw (uint32_t op1, uint32_t op2)
{
return op2 - op1;
}
@@ -1559,7 +1559,7 @@ DO_SPE_OP2(srwu);
DO_SPE_OP2(subfw);
/* evsel is a little bit more complicated... */
-static inline uint32_t _do_esel (uint32_t op1, uint32_t op2, int n)
+static always_inline uint32_t _do_esel (uint32_t op1, uint32_t op2, int n)
{
if (n)
return op1;
@@ -1582,31 +1582,31 @@ void do_ev##name (void) \
_do_e##name(T0_64, T1_64)); \
}
-static inline uint32_t _do_evcmp_merge (int t0, int t1)
+static always_inline uint32_t _do_evcmp_merge (int t0, int t1)
{
return (t0 << 3) | (t1 << 2) | ((t0 | t1) << 1) | (t0 & t1);
}
-static inline int _do_ecmpeq (uint32_t op1, uint32_t op2)
+static always_inline int _do_ecmpeq (uint32_t op1, uint32_t op2)
{
return op1 == op2 ? 1 : 0;
}
-static inline int _do_ecmpgts (int32_t op1, int32_t op2)
+static always_inline int _do_ecmpgts (int32_t op1, int32_t op2)
{
return op1 > op2 ? 1 : 0;
}
-static inline int _do_ecmpgtu (uint32_t op1, uint32_t op2)
+static always_inline int _do_ecmpgtu (uint32_t op1, uint32_t op2)
{
return op1 > op2 ? 1 : 0;
}
-static inline int _do_ecmplts (int32_t op1, int32_t op2)
+static always_inline int _do_ecmplts (int32_t op1, int32_t op2)
{
return op1 < op2 ? 1 : 0;
}
-static inline int _do_ecmpltu (uint32_t op1, uint32_t op2)
+static always_inline int _do_ecmpltu (uint32_t op1, uint32_t op2)
{
return op1 < op2 ? 1 : 0;
}
@@ -1623,7 +1623,7 @@ DO_SPE_CMP(cmplts);
DO_SPE_CMP(cmpltu);
/* Single precision floating-point conversions from/to integer */
-static inline uint32_t _do_efscfsi (int32_t val)
+static always_inline uint32_t _do_efscfsi (int32_t val)
{
union {
uint32_t u;
@@ -1635,7 +1635,7 @@ static inline uint32_t _do_efscfsi (int32_t val)
return u.u;
}
-static inline uint32_t _do_efscfui (uint32_t val)
+static always_inline uint32_t _do_efscfui (uint32_t val)
{
union {
uint32_t u;
@@ -1647,7 +1647,7 @@ static inline uint32_t _do_efscfui (uint32_t val)
return u.u;
}
-static inline int32_t _do_efsctsi (uint32_t val)
+static always_inline int32_t _do_efsctsi (uint32_t val)
{
union {
int32_t u;
@@ -1662,7 +1662,7 @@ static inline int32_t _do_efsctsi (uint32_t val)
return float32_to_int32(u.f, &env->spe_status);
}
-static inline uint32_t _do_efsctui (uint32_t val)
+static always_inline uint32_t _do_efsctui (uint32_t val)
{
union {
int32_t u;
@@ -1677,7 +1677,7 @@ static inline uint32_t _do_efsctui (uint32_t val)
return float32_to_uint32(u.f, &env->spe_status);
}
-static inline int32_t _do_efsctsiz (uint32_t val)
+static always_inline int32_t _do_efsctsiz (uint32_t val)
{
union {
int32_t u;
@@ -1692,7 +1692,7 @@ static inline int32_t _do_efsctsiz (uint32_t val)
return float32_to_int32_round_to_zero(u.f, &env->spe_status);
}
-static inline uint32_t _do_efsctuiz (uint32_t val)
+static always_inline uint32_t _do_efsctuiz (uint32_t val)
{
union {
int32_t u;
@@ -1738,7 +1738,7 @@ void do_efsctuiz (void)
}
/* Single precision floating-point conversion to/from fractional */
-static inline uint32_t _do_efscfsf (uint32_t val)
+static always_inline uint32_t _do_efscfsf (uint32_t val)
{
union {
uint32_t u;
@@ -1753,7 +1753,7 @@ static inline uint32_t _do_efscfsf (uint32_t val)
return u.u;
}
-static inline uint32_t _do_efscfuf (uint32_t val)
+static always_inline uint32_t _do_efscfuf (uint32_t val)
{
union {
uint32_t u;
@@ -1768,7 +1768,7 @@ static inline uint32_t _do_efscfuf (uint32_t val)
return u.u;
}
-static inline int32_t _do_efsctsf (uint32_t val)
+static always_inline int32_t _do_efsctsf (uint32_t val)
{
union {
int32_t u;
@@ -1786,7 +1786,7 @@ static inline int32_t _do_efsctsf (uint32_t val)
return float32_to_int32(u.f, &env->spe_status);
}
-static inline uint32_t _do_efsctuf (uint32_t val)
+static always_inline uint32_t _do_efsctuf (uint32_t val)
{
union {
int32_t u;
@@ -1804,7 +1804,7 @@ static inline uint32_t _do_efsctuf (uint32_t val)
return float32_to_uint32(u.f, &env->spe_status);
}
-static inline int32_t _do_efsctsfz (uint32_t val)
+static always_inline int32_t _do_efsctsfz (uint32_t val)
{
union {
int32_t u;
@@ -1822,7 +1822,7 @@ static inline int32_t _do_efsctsfz (uint32_t val)
return float32_to_int32_round_to_zero(u.f, &env->spe_status);
}
-static inline uint32_t _do_efsctufz (uint32_t val)
+static always_inline uint32_t _do_efsctufz (uint32_t val)
{
union {
int32_t u;
@@ -1871,19 +1871,19 @@ void do_efsctufz (void)
}
/* Double precision floating point helpers */
-static inline int _do_efdcmplt (uint64_t op1, uint64_t op2)
+static always_inline int _do_efdcmplt (uint64_t op1, uint64_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efdtstlt(op1, op2);
}
-static inline int _do_efdcmpgt (uint64_t op1, uint64_t op2)
+static always_inline int _do_efdcmpgt (uint64_t op1, uint64_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efdtstgt(op1, op2);
}
-static inline int _do_efdcmpeq (uint64_t op1, uint64_t op2)
+static always_inline int _do_efdcmpeq (uint64_t op1, uint64_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efdtsteq(op1, op2);
@@ -1905,7 +1905,7 @@ void do_efdcmpeq (void)
}
/* Double precision floating-point conversion to/from integer */
-static inline uint64_t _do_efdcfsi (int64_t val)
+static always_inline uint64_t _do_efdcfsi (int64_t val)
{
union {
uint64_t u;
@@ -1917,7 +1917,7 @@ static inline uint64_t _do_efdcfsi (int64_t val)
return u.u;
}
-static inline uint64_t _do_efdcfui (uint64_t val)
+static always_inline uint64_t _do_efdcfui (uint64_t val)
{
union {
uint64_t u;
@@ -1929,7 +1929,7 @@ static inline uint64_t _do_efdcfui (uint64_t val)
return u.u;
}
-static inline int64_t _do_efdctsi (uint64_t val)
+static always_inline int64_t _do_efdctsi (uint64_t val)
{
union {
int64_t u;
@@ -1944,7 +1944,7 @@ static inline int64_t _do_efdctsi (uint64_t val)
return float64_to_int64(u.f, &env->spe_status);
}
-static inline uint64_t _do_efdctui (uint64_t val)
+static always_inline uint64_t _do_efdctui (uint64_t val)
{
union {
int64_t u;
@@ -1959,7 +1959,7 @@ static inline uint64_t _do_efdctui (uint64_t val)
return float64_to_uint64(u.f, &env->spe_status);
}
-static inline int64_t _do_efdctsiz (uint64_t val)
+static always_inline int64_t _do_efdctsiz (uint64_t val)
{
union {
int64_t u;
@@ -1974,7 +1974,7 @@ static inline int64_t _do_efdctsiz (uint64_t val)
return float64_to_int64_round_to_zero(u.f, &env->spe_status);
}
-static inline uint64_t _do_efdctuiz (uint64_t val)
+static always_inline uint64_t _do_efdctuiz (uint64_t val)
{
union {
int64_t u;
@@ -2020,7 +2020,7 @@ void do_efdctuiz (void)
}
/* Double precision floating-point conversion to/from fractional */
-static inline uint64_t _do_efdcfsf (int64_t val)
+static always_inline uint64_t _do_efdcfsf (int64_t val)
{
union {
uint64_t u;
@@ -2035,7 +2035,7 @@ static inline uint64_t _do_efdcfsf (int64_t val)
return u.u;
}
-static inline uint64_t _do_efdcfuf (uint64_t val)
+static always_inline uint64_t _do_efdcfuf (uint64_t val)
{
union {
uint64_t u;
@@ -2050,7 +2050,7 @@ static inline uint64_t _do_efdcfuf (uint64_t val)
return u.u;
}
-static inline int64_t _do_efdctsf (uint64_t val)
+static always_inline int64_t _do_efdctsf (uint64_t val)
{
union {
int64_t u;
@@ -2068,7 +2068,7 @@ static inline int64_t _do_efdctsf (uint64_t val)
return float64_to_int32(u.f, &env->spe_status);
}
-static inline uint64_t _do_efdctuf (uint64_t val)
+static always_inline uint64_t _do_efdctuf (uint64_t val)
{
union {
int64_t u;
@@ -2086,7 +2086,7 @@ static inline uint64_t _do_efdctuf (uint64_t val)
return float64_to_uint32(u.f, &env->spe_status);
}
-static inline int64_t _do_efdctsfz (uint64_t val)
+static always_inline int64_t _do_efdctsfz (uint64_t val)
{
union {
int64_t u;
@@ -2104,7 +2104,7 @@ static inline int64_t _do_efdctsfz (uint64_t val)
return float64_to_int32_round_to_zero(u.f, &env->spe_status);
}
-static inline uint64_t _do_efdctufz (uint64_t val)
+static always_inline uint64_t _do_efdctufz (uint64_t val)
{
union {
int64_t u;
@@ -2153,7 +2153,7 @@ void do_efdctufz (void)
}
/* Floating point conversion between single and double precision */
-static inline uint32_t _do_efscfd (uint64_t val)
+static always_inline uint32_t _do_efscfd (uint64_t val)
{
union {
uint64_t u;
@@ -2170,7 +2170,7 @@ static inline uint32_t _do_efscfd (uint64_t val)
return u2.u;
}
-static inline uint64_t _do_efdcfs (uint32_t val)
+static always_inline uint64_t _do_efdcfs (uint32_t val)
{
union {
uint64_t u;
@@ -2214,19 +2214,19 @@ DO_SPE_OP2(fsmul);
DO_SPE_OP2(fsdiv);
/* Single-precision floating-point comparisons */
-static inline int _do_efscmplt (uint32_t op1, uint32_t op2)
+static always_inline int _do_efscmplt (uint32_t op1, uint32_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efststlt(op1, op2);
}
-static inline int _do_efscmpgt (uint32_t op1, uint32_t op2)
+static always_inline int _do_efscmpgt (uint32_t op1, uint32_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efststgt(op1, op2);
}
-static inline int _do_efscmpeq (uint32_t op1, uint32_t op2)
+static always_inline int _do_efscmpeq (uint32_t op1, uint32_t op2)
{
/* XXX: TODO: test special values (NaN, infinites, ...) */
return _do_efststeq(op1, op2);