Added MIPS support and projects for all samples.
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
#include "exec/helper-proto.h"
|
||||
|
||||
/* Data format min and max values */
|
||||
#define DF_BITS(df) (1 << ((df) + 3))
|
||||
#define DF_BITS(df) ((uint64_t)1 << ((df) + 3))
|
||||
|
||||
#define DF_MAX_INT(df) (int64_t)((1LL << (DF_BITS(df) - 1)) - 1)
|
||||
#define M_MAX_INT(m) (int64_t)((1LL << ((m) - 1)) - 1)
|
||||
@ -29,8 +29,8 @@
|
||||
#define DF_MIN_INT(df) (int64_t)(-(1LL << (DF_BITS(df) - 1)))
|
||||
#define M_MIN_INT(m) (int64_t)(-(1LL << ((m) - 1)))
|
||||
|
||||
#define DF_MAX_UINT(df) (uint64_t)(-1ULL >> (64 - DF_BITS(df)))
|
||||
#define M_MAX_UINT(m) (uint64_t)(-1ULL >> (64 - (m)))
|
||||
#define DF_MAX_UINT(df) (uint64_t)((0-1ULL) >> (64 - DF_BITS(df)))
|
||||
#define M_MAX_UINT(m) (uint64_t)((0-1ULL) >> (64 - (m)))
|
||||
|
||||
#define UNSIGNED(x, df) ((x) & DF_MAX_UINT(df))
|
||||
#define SIGNED(x, df) \
|
||||
@ -786,7 +786,7 @@ static inline int64_t msa_mulr_q_df(uint32_t df, int64_t arg1, int64_t arg2)
|
||||
{
|
||||
int64_t q_min = DF_MIN_INT(df);
|
||||
int64_t q_max = DF_MAX_INT(df);
|
||||
int64_t r_bit = 1 << (DF_BITS(df) - 2);
|
||||
int64_t r_bit = (int64_t)1 << (DF_BITS(df) - 2);
|
||||
|
||||
if (arg1 == q_min && arg2 == q_min) {
|
||||
return q_max;
|
||||
@ -984,7 +984,7 @@ static inline int64_t msa_maddr_q_df(uint32_t df, int64_t dest, int64_t arg1,
|
||||
|
||||
int64_t q_max = DF_MAX_INT(df);
|
||||
int64_t q_min = DF_MIN_INT(df);
|
||||
int64_t r_bit = 1 << (DF_BITS(df) - 2);
|
||||
int64_t r_bit = (int64_t)1 << (DF_BITS(df) - 2);
|
||||
|
||||
q_prod = arg1 * arg2;
|
||||
q_ret = ((dest << (DF_BITS(df) - 1)) + q_prod + r_bit) >> (DF_BITS(df) - 1);
|
||||
@ -999,7 +999,7 @@ static inline int64_t msa_msubr_q_df(uint32_t df, int64_t dest, int64_t arg1,
|
||||
|
||||
int64_t q_max = DF_MAX_INT(df);
|
||||
int64_t q_min = DF_MIN_INT(df);
|
||||
int64_t r_bit = 1 << (DF_BITS(df) - 2);
|
||||
int64_t r_bit = (int64_t)1 << (DF_BITS(df) - 2);
|
||||
|
||||
q_prod = arg1 * arg2;
|
||||
q_ret = ((dest << (DF_BITS(df) - 1)) - q_prod + r_bit) >> (DF_BITS(df) - 1);
|
||||
|
Reference in New Issue
Block a user