提交 ad88e425 编写于 作者: P Peter Maydell

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-jun-1-2019' into staging

MIPS queue for June 1st, 2019

# gpg: Signature made Sat 01 Jun 2019 19:20:47 BST
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-jun-1-2019:
  target/mips: Improve performance of certain MSA instructions
  target/mips: Clean up lmi_helper.c
  target/mips: Clean up dsp_helper.c
  tests/tcg: target/mips: Add tests for MSA bit set instructions
  target/mips: Amend and cleanup MSA TCG tests
  target/mips: Add emulation of MMI instruction PCPYUD
  target/mips: Add emulation of MMI instruction PCPYLD
  target/mips: Add emulation of MMI instruction PCPYH
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
......@@ -22,8 +22,10 @@
#include "exec/helper-proto.h"
#include "qemu/bitops.h"
/* As the byte ordering doesn't matter, i.e. all columns are treated
identically, these unions can be used directly. */
/*
* As the byte ordering doesn't matter, i.e. all columns are treated
* identically, these unions can be used directly.
*/
typedef union {
uint8_t ub[4];
int8_t sb[4];
......@@ -1445,9 +1447,15 @@ target_ulong helper_precr_ob_qh(target_ulong rs, target_ulong rt)
return temp;
}
#define PRECR_QH_PW(name, var) \
target_ulong helper_precr_##name##_qh_pw(target_ulong rs, target_ulong rt, \
uint32_t sa) \
/*
* In case sa == 0, use rt2, rt0, rs2, rs0.
* In case sa != 0, use rt3, rt1, rs3, rs1.
*/
#define PRECR_QH_PW(name, var) \
target_ulong helper_precr_##name##_qh_pw(target_ulong rs, \
target_ulong rt, \
uint32_t sa) \
{ \
uint16_t rs3, rs2, rs1, rs0; \
uint16_t rt3, rt2, rt1, rt0; \
......@@ -1456,8 +1464,6 @@ target_ulong helper_precr_##name##_qh_pw(target_ulong rs, target_ulong rt, \
MIPSDSP_SPLIT64_16(rs, rs3, rs2, rs1, rs0); \
MIPSDSP_SPLIT64_16(rt, rt3, rt2, rt1, rt0); \
\
/* When sa = 0, we use rt2, rt0, rs2, rs0; \
* when sa != 0, we use rt3, rt1, rs3, rs1. */ \
if (sa == 0) { \
tempD = rt2 << var; \
tempC = rt0 << var; \
......@@ -1965,7 +1971,8 @@ SHIFT_PH(shra_r, rnd16_rashift);
#undef SHIFT_PH
/** DSP Multiply Sub-class insns **/
/* Return value made up by two 16bits value.
/*
* Return value made up by two 16bits value.
* FIXME give the macro a better name.
*/
#define MUL_RETURN32_16_PH(name, func, \
......@@ -3274,11 +3281,15 @@ target_ulong helper_dextr_l(target_ulong ac, target_ulong shift,
CPUMIPSState *env)
{
uint64_t temp[3];
target_ulong ret;
shift = shift & 0x3F;
mipsdsp_rndrashift_acc(temp, ac, shift, env);
return (temp[1] << 63) | (temp[0] >> 1);
ret = (temp[1] << 63) | (temp[0] >> 1);
return ret;
}
target_ulong helper_dextr_r_l(target_ulong ac, target_ulong shift,
......@@ -3286,6 +3297,7 @@ target_ulong helper_dextr_r_l(target_ulong ac, target_ulong shift,
{
uint64_t temp[3];
uint32_t temp128;
target_ulong ret;
shift = shift & 0x3F;
mipsdsp_rndrashift_acc(temp, ac, shift, env);
......@@ -3305,7 +3317,9 @@ target_ulong helper_dextr_r_l(target_ulong ac, target_ulong shift,
set_DSPControl_overflow_flag(1, 23, env);
}
return (temp[1] << 63) | (temp[0] >> 1);
ret = (temp[1] << 63) | (temp[0] >> 1);
return ret;
}
target_ulong helper_dextr_rs_l(target_ulong ac, target_ulong shift,
......@@ -3313,6 +3327,7 @@ target_ulong helper_dextr_rs_l(target_ulong ac, target_ulong shift,
{
uint64_t temp[3];
uint32_t temp128;
target_ulong ret;
shift = shift & 0x3F;
mipsdsp_rndrashift_acc(temp, ac, shift, env);
......@@ -3338,7 +3353,10 @@ target_ulong helper_dextr_rs_l(target_ulong ac, target_ulong shift,
}
set_DSPControl_overflow_flag(1, 23, env);
}
return (temp[1] << 63) | (temp[0] >> 1);
ret = (temp[1] << 63) | (temp[0] >> 1);
return ret;
}
#endif
......
......@@ -21,9 +21,11 @@
#include "cpu.h"
#include "exec/helper-proto.h"
/* If the byte ordering doesn't matter, i.e. all columns are treated
identically, then this union can be used directly. If byte ordering
does matter, we generally ignore dumping to memory. */
/*
* If the byte ordering doesn't matter, i.e. all columns are treated
* identically, then this union can be used directly. If byte ordering
* does matter, we generally ignore dumping to memory.
*/
typedef union {
uint8_t ub[8];
int8_t sb[8];
......
此差异已折叠。
......@@ -24357,6 +24357,146 @@ static void decode_opc_special(CPUMIPSState *env, DisasContext *ctx)
* PEXTUW
*/
/*
* PCPYH rd, rt
*
* Parallel Copy Halfword
*
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
* +-----------+---------+---------+---------+---------+-----------+
* | MMI |0 0 0 0 0| rt | rd | PCPYH | MMI3 |
* +-----------+---------+---------+---------+---------+-----------+
*/
static void gen_mmi_pcpyh(DisasContext *ctx)
{
uint32_t pd, rt, rd;
uint32_t opcode;
opcode = ctx->opcode;
pd = extract32(opcode, 21, 5);
rt = extract32(opcode, 16, 5);
rd = extract32(opcode, 11, 5);
if (unlikely(pd != 0)) {
generate_exception_end(ctx, EXCP_RI);
} else if (rd == 0) {
/* nop */
} else if (rt == 0) {
tcg_gen_movi_i64(cpu_gpr[rd], 0);
tcg_gen_movi_i64(cpu_mmr[rd], 0);
} else {
TCGv_i64 t0 = tcg_temp_new();
TCGv_i64 t1 = tcg_temp_new();
uint64_t mask = (1ULL << 16) - 1;
tcg_gen_andi_i64(t0, cpu_gpr[rt], mask);
tcg_gen_movi_i64(t1, 0);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_mov_i64(cpu_gpr[rd], t1);
tcg_gen_andi_i64(t0, cpu_mmr[rt], mask);
tcg_gen_movi_i64(t1, 0);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_shli_i64(t0, t0, 16);
tcg_gen_or_i64(t1, t0, t1);
tcg_gen_mov_i64(cpu_mmr[rd], t1);
tcg_temp_free(t0);
tcg_temp_free(t1);
}
}
/*
* PCPYLD rd, rs, rt
*
* Parallel Copy Lower Doubleword
*
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
* +-----------+---------+---------+---------+---------+-----------+
* | MMI | rs | rt | rd | PCPYLD | MMI2 |
* +-----------+---------+---------+---------+---------+-----------+
*/
static void gen_mmi_pcpyld(DisasContext *ctx)
{
uint32_t rs, rt, rd;
uint32_t opcode;
opcode = ctx->opcode;
rs = extract32(opcode, 21, 5);
rt = extract32(opcode, 16, 5);
rd = extract32(opcode, 11, 5);
if (rd == 0) {
/* nop */
} else {
if (rs == 0) {
tcg_gen_movi_i64(cpu_mmr[rd], 0);
} else {
tcg_gen_mov_i64(cpu_mmr[rd], cpu_gpr[rs]);
}
if (rt == 0) {
tcg_gen_movi_i64(cpu_gpr[rd], 0);
} else {
if (rd != rt) {
tcg_gen_mov_i64(cpu_gpr[rd], cpu_gpr[rt]);
}
}
}
}
/*
* PCPYUD rd, rs, rt
*
* Parallel Copy Upper Doubleword
*
* 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
* +-----------+---------+---------+---------+---------+-----------+
* | MMI | rs | rt | rd | PCPYUD | MMI3 |
* +-----------+---------+---------+---------+---------+-----------+
*/
static void gen_mmi_pcpyud(DisasContext *ctx)
{
uint32_t rs, rt, rd;
uint32_t opcode;
opcode = ctx->opcode;
rs = extract32(opcode, 21, 5);
rt = extract32(opcode, 16, 5);
rd = extract32(opcode, 11, 5);
if (rd == 0) {
/* nop */
} else {
if (rs == 0) {
tcg_gen_movi_i64(cpu_gpr[rd], 0);
} else {
tcg_gen_mov_i64(cpu_gpr[rd], cpu_mmr[rs]);
}
if (rt == 0) {
tcg_gen_movi_i64(cpu_mmr[rd], 0);
} else {
if (rd != rt) {
tcg_gen_mov_i64(cpu_mmr[rd], cpu_mmr[rt]);
}
}
}
}
#endif
......@@ -27371,7 +27511,6 @@ static void decode_mmi2(CPUMIPSState *env, DisasContext *ctx)
case MMI_OPC_2_PINTH: /* TODO: MMI_OPC_2_PINTH */
case MMI_OPC_2_PMULTW: /* TODO: MMI_OPC_2_PMULTW */
case MMI_OPC_2_PDIVW: /* TODO: MMI_OPC_2_PDIVW */
case MMI_OPC_2_PCPYLD: /* TODO: MMI_OPC_2_PCPYLD */
case MMI_OPC_2_PMADDH: /* TODO: MMI_OPC_2_PMADDH */
case MMI_OPC_2_PHMADH: /* TODO: MMI_OPC_2_PHMADH */
case MMI_OPC_2_PAND: /* TODO: MMI_OPC_2_PAND */
......@@ -27386,6 +27525,9 @@ static void decode_mmi2(CPUMIPSState *env, DisasContext *ctx)
case MMI_OPC_2_PROT3W: /* TODO: MMI_OPC_2_PROT3W */
generate_exception_end(ctx, EXCP_RI); /* TODO: MMI_OPC_CLASS_MMI2 */
break;
case MMI_OPC_2_PCPYLD:
gen_mmi_pcpyld(ctx);
break;
default:
MIPS_INVAL("TX79 MMI class MMI2");
generate_exception_end(ctx, EXCP_RI);
......@@ -27405,14 +27547,18 @@ static void decode_mmi3(CPUMIPSState *env, DisasContext *ctx)
case MMI_OPC_3_PINTEH: /* TODO: MMI_OPC_3_PINTEH */
case MMI_OPC_3_PMULTUW: /* TODO: MMI_OPC_3_PMULTUW */
case MMI_OPC_3_PDIVUW: /* TODO: MMI_OPC_3_PDIVUW */
case MMI_OPC_3_PCPYUD: /* TODO: MMI_OPC_3_PCPYUD */
case MMI_OPC_3_POR: /* TODO: MMI_OPC_3_POR */
case MMI_OPC_3_PNOR: /* TODO: MMI_OPC_3_PNOR */
case MMI_OPC_3_PEXCH: /* TODO: MMI_OPC_3_PEXCH */
case MMI_OPC_3_PCPYH: /* TODO: MMI_OPC_3_PCPYH */
case MMI_OPC_3_PEXCW: /* TODO: MMI_OPC_3_PEXCW */
generate_exception_end(ctx, EXCP_RI); /* TODO: MMI_OPC_CLASS_MMI3 */
break;
case MMI_OPC_3_PCPYH:
gen_mmi_pcpyh(ctx);
break;
case MMI_OPC_3_PCPYUD:
gen_mmi_pcpyud(ctx);
break;
default:
MIPS_INVAL("TX79 MMI class MMI3");
generate_exception_end(ctx, EXCP_RI);
......
......@@ -66,7 +66,7 @@ static inline int32_t check_results(const char *instruction_name,
}
}
printf("PASS: %3d FAIL: %3d elapsed time: %5.2f ms\n",
printf("\tPASS: %3d \tFAIL: %3d \telapsed time: %5.2f ms\n",
pass_count, fail_count, elapsed_time);
if (fail_count > 0) {
......
......@@ -24,7 +24,8 @@
#define DO_MSA__WD__WS(suffix, mnemonic) \
static inline void do_msa_##suffix(void *input, void *output) \
static inline void do_msa_##suffix(const void *input, \
const void *output) \
{ \
__asm__ volatile ( \
"move $t0, %0\n\t" \
......@@ -39,7 +40,8 @@ static inline void do_msa_##suffix(void *input, void *output) \
}
#define DO_MSA__WD__WD(suffix, mnemonic) \
static inline void do_msa_##suffix(void *input, void *output) \
static inline void do_msa_##suffix(const void *input, \
const void *output) \
{ \
__asm__ volatile ( \
"move $t0, %0\n\t" \
......@@ -70,8 +72,9 @@ DO_MSA__WD__WS(PCNT_D, pcnt.d)
#define DO_MSA__WD__WS_WT(suffix, mnemonic) \
static inline void do_msa_##suffix(void *input1, void *input2, \
void *output) \
static inline void do_msa_##suffix(const void *input1, \
const void *input2, \
const void *output) \
{ \
__asm__ volatile ( \
"move $t0, %0\n\t" \
......@@ -258,6 +261,142 @@ DO_MSA__WD__WS_WT(SRLR_H, srlr.h)
DO_MSA__WD__WS_WT(SRLR_W, srlr.w)
DO_MSA__WD__WS_WT(SRLR_D, srlr.d)
DO_MSA__WD__WS_WT(ADD_A_B, add_a.b)
DO_MSA__WD__WS_WT(ADD_A_H, add_a.h)
DO_MSA__WD__WS_WT(ADD_A_W, add_a.w)
DO_MSA__WD__WS_WT(ADD_A_D, add_a.d)
DO_MSA__WD__WS_WT(ADDS_A_B, adds_a.b)
DO_MSA__WD__WS_WT(ADDS_A_H, adds_a.h)
DO_MSA__WD__WS_WT(ADDS_A_W, adds_a.w)
DO_MSA__WD__WS_WT(ADDS_A_D, adds_a.d)
DO_MSA__WD__WS_WT(ADDS_S_B, adds_s.b)
DO_MSA__WD__WS_WT(ADDS_S_H, adds_s.h)
DO_MSA__WD__WS_WT(ADDS_S_W, adds_s.w)
DO_MSA__WD__WS_WT(ADDS_S_D, adds_s.d)
DO_MSA__WD__WS_WT(ADDS_U_B, adds_u.b)
DO_MSA__WD__WS_WT(ADDS_U_H, adds_u.h)
DO_MSA__WD__WS_WT(ADDS_U_W, adds_u.w)
DO_MSA__WD__WS_WT(ADDS_U_D, adds_u.d)
DO_MSA__WD__WS_WT(ADDV_B, addv.b)
DO_MSA__WD__WS_WT(ADDV_H, addv.h)
DO_MSA__WD__WS_WT(ADDV_W, addv.w)
DO_MSA__WD__WS_WT(ADDV_D, addv.d)
DO_MSA__WD__WS_WT(HADD_S_H, hadd_s.h)
DO_MSA__WD__WS_WT(HADD_S_W, hadd_s.w)
DO_MSA__WD__WS_WT(HADD_S_D, hadd_s.d)
DO_MSA__WD__WS_WT(HADD_U_H, hadd_u.h)
DO_MSA__WD__WS_WT(HADD_U_W, hadd_u.w)
DO_MSA__WD__WS_WT(HADD_U_D, hadd_u.d)
DO_MSA__WD__WS_WT(AVER_S_B, aver_s.b)
DO_MSA__WD__WS_WT(AVER_S_H, aver_s.h)
DO_MSA__WD__WS_WT(AVER_S_W, aver_s.w)
DO_MSA__WD__WS_WT(AVER_S_D, aver_s.d)
DO_MSA__WD__WS_WT(AVER_U_B, aver_u.b)
DO_MSA__WD__WS_WT(AVER_U_H, aver_u.h)
DO_MSA__WD__WS_WT(AVER_U_W, aver_u.w)
DO_MSA__WD__WS_WT(AVER_U_D, aver_u.d)
DO_MSA__WD__WS_WT(AVE_S_B, ave_s.b)
DO_MSA__WD__WS_WT(AVE_S_H, ave_s.h)
DO_MSA__WD__WS_WT(AVE_S_W, ave_s.w)
DO_MSA__WD__WS_WT(AVE_S_D, ave_s.d)
DO_MSA__WD__WS_WT(AVE_U_B, ave_u.b)
DO_MSA__WD__WS_WT(AVE_U_H, ave_u.h)
DO_MSA__WD__WS_WT(AVE_U_W, ave_u.w)
DO_MSA__WD__WS_WT(AVE_U_D, ave_u.d)
DO_MSA__WD__WS_WT(DIV_S_B, div_s.b)
DO_MSA__WD__WS_WT(DIV_S_H, div_s.h)
DO_MSA__WD__WS_WT(DIV_S_W, div_s.w)
DO_MSA__WD__WS_WT(DIV_S_D, div_s.d)
DO_MSA__WD__WS_WT(DIV_U_B, div_u.b)
DO_MSA__WD__WS_WT(DIV_U_H, div_u.h)
DO_MSA__WD__WS_WT(DIV_U_W, div_u.w)
DO_MSA__WD__WS_WT(DIV_U_D, div_u.d)
DO_MSA__WD__WS_WT(DOTP_S_H, dotp_s.h)
DO_MSA__WD__WS_WT(DOTP_S_W, dotp_s.w)
DO_MSA__WD__WS_WT(DOTP_S_D, dotp_s.d)
DO_MSA__WD__WS_WT(DOTP_U_H, dotp_u.h)
DO_MSA__WD__WS_WT(DOTP_U_W, dotp_u.w)
DO_MSA__WD__WS_WT(DOTP_U_D, dotp_u.d)
DO_MSA__WD__WS_WT(MOD_S_B, mod_s.b)
DO_MSA__WD__WS_WT(MOD_S_H, mod_s.h)
DO_MSA__WD__WS_WT(MOD_S_W, mod_s.w)
DO_MSA__WD__WS_WT(MOD_S_D, mod_s.d)
DO_MSA__WD__WS_WT(MOD_U_B, mod_u.b)
DO_MSA__WD__WS_WT(MOD_U_H, mod_u.h)
DO_MSA__WD__WS_WT(MOD_U_W, mod_u.w)
DO_MSA__WD__WS_WT(MOD_U_D, mod_u.d)
DO_MSA__WD__WS_WT(MUL_Q_H, mul_q.h)
DO_MSA__WD__WS_WT(MUL_Q_W, mul_q.w)
DO_MSA__WD__WS_WT(MULR_Q_H, mulr_q.h)
DO_MSA__WD__WS_WT(MULR_Q_W, mulr_q.w)
DO_MSA__WD__WS_WT(MULV_B, mulv.b)
DO_MSA__WD__WS_WT(MULV_H, mulv.h)
DO_MSA__WD__WS_WT(MULV_W, mulv.w)
DO_MSA__WD__WS_WT(MULV_D, mulv.d)
DO_MSA__WD__WS_WT(SUBV_B, subv.b)
DO_MSA__WD__WS_WT(SUBV_H, subv.h)
DO_MSA__WD__WS_WT(SUBV_W, subv.w)
DO_MSA__WD__WS_WT(SUBV_D, subv.d)
DO_MSA__WD__WS_WT(SUBS_S_B, subs_s.b)
DO_MSA__WD__WS_WT(SUBS_S_H, subs_s.h)
DO_MSA__WD__WS_WT(SUBS_S_W, subs_s.w)
DO_MSA__WD__WS_WT(SUBS_S_D, subs_s.d)
DO_MSA__WD__WS_WT(SUBS_U_B, subs_u.b)
DO_MSA__WD__WS_WT(SUBS_U_H, subs_u.h)
DO_MSA__WD__WS_WT(SUBS_U_W, subs_u.w)
DO_MSA__WD__WS_WT(SUBS_U_D, subs_u.d)
DO_MSA__WD__WS_WT(ASUB_S_B, asub_s.b)
DO_MSA__WD__WS_WT(ASUB_S_H, asub_s.h)
DO_MSA__WD__WS_WT(ASUB_S_W, asub_s.w)
DO_MSA__WD__WS_WT(ASUB_S_D, asub_s.d)
DO_MSA__WD__WS_WT(ASUB_U_B, asub_u.b)
DO_MSA__WD__WS_WT(ASUB_U_H, asub_u.h)
DO_MSA__WD__WS_WT(ASUB_U_W, asub_u.w)
DO_MSA__WD__WS_WT(ASUB_U_D, asub_u.d)
DO_MSA__WD__WS_WT(SUBSUU_S_B, subsuu_s.b)
DO_MSA__WD__WS_WT(SUBSUU_S_H, subsuu_s.h)
DO_MSA__WD__WS_WT(SUBSUU_S_W, subsuu_s.w)
DO_MSA__WD__WS_WT(SUBSUU_S_D, subsuu_s.d)
DO_MSA__WD__WS_WT(SUBSUS_U_B, subsus_u.b)
DO_MSA__WD__WS_WT(SUBSUS_U_H, subsus_u.h)
DO_MSA__WD__WS_WT(SUBSUS_U_W, subsus_u.w)
DO_MSA__WD__WS_WT(SUBSUS_U_D, subsus_u.d)
DO_MSA__WD__WS_WT(HSUB_S_H, hsub_s.h)
DO_MSA__WD__WS_WT(HSUB_S_W, hsub_s.w)
DO_MSA__WD__WS_WT(HSUB_S_D, hsub_s.d)
DO_MSA__WD__WS_WT(HSUB_U_H, hsub_u.h)
DO_MSA__WD__WS_WT(HSUB_U_W, hsub_u.w)
DO_MSA__WD__WS_WT(HSUB_U_D, hsub_u.d)
DO_MSA__WD__WS_WT(BMNZ_V, bmnz.v)
DO_MSA__WD__WS_WT(BMZ_V, bmz.v)
......
/*
* Test program for MSA instruction BCLR.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BCLR.B";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, }, /* 0 */
{ 0xfefefefefefefefeULL, 0xfefefefefefefefeULL, },
{ 0xfbfbfbfbfbfbfbfbULL, 0xfbfbfbfbfbfbfbfbULL, },
{ 0xdfdfdfdfdfdfdfdfULL, 0xdfdfdfdfdfdfdfdfULL, },
{ 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
{ 0xf7f7f7f7f7f7f7f7ULL, 0xf7f7f7f7f7f7f7f7ULL, },
{ 0xf7bffef7bffef7bfULL, 0xfef7bffef7bffef7ULL, },
{ 0xeffd7feffd7feffdULL, 0x7feffd7feffd7fefULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, }, /* 8 */
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0x8a8a8a8a8a8a8a8aULL, 0x8a8a8a8a8a8a8a8aULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xa2a2a2a2a2a2a2a2ULL, 0xa2a2a2a2a2a2a2a2ULL, },
{ 0xa2aaaaa2aaaaa2aaULL, 0xaaa2aaaaa2aaaaa2ULL, },
{ 0xaaa82aaaa82aaaa8ULL, 0x2aaaa82aaaa82aaaULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, }, /* 24 */
{ 0x5454545454545454ULL, 0x5454545454545454ULL, },
{ 0x5151515151515151ULL, 0x5151515151515151ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x4545454545454545ULL, 0x4545454545454545ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5515545515545515ULL, 0x5455155455155455ULL, },
{ 0x4555554555554555ULL, 0x5545555545555545ULL, },
{ 0x4c4c4c4c4c4c4c4cULL, 0x4c4c4c4c4c4c4c4cULL, }, /* 32 */
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xc8c8c8c8c8c8c8c8ULL, 0xc8c8c8c8c8c8c8c8ULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xc4c4c4c4c4c4c4c4ULL, 0xc4c4c4c4c4c4c4c4ULL, },
{ 0xc48cccc48cccc48cULL, 0xccc48cccc48cccc4ULL, },
{ 0xcccc4ccccc4cccccULL, 0x4ccccc4ccccc4cccULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, }, /* 40 */
{ 0x3232323232323232ULL, 0x3232323232323232ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x1313131313131313ULL, 0x1313131313131313ULL, },
{ 0x2323232323232323ULL, 0x2323232323232323ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333323333323333ULL, 0x3233333233333233ULL, },
{ 0x2331332331332331ULL, 0x3323313323313323ULL, },
{ 0x630e38630e38630eULL, 0x38630e38630e3863ULL, }, /* 48 */
{ 0xe28e38e28e38e28eULL, 0x38e28e38e28e38e2ULL, },
{ 0xe38a38e38a38e38aULL, 0x38e38a38e38a38e3ULL, },
{ 0xc38e18c38e18c38eULL, 0x18c38e18c38e18c3ULL, },
{ 0xe38e28e38e28e38eULL, 0x28e38e28e38e28e3ULL, },
{ 0xe38630e38630e386ULL, 0x30e38630e38630e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38c38e38c38e38cULL, 0x38e38c38e38c38e3ULL, },
{ 0x1c71471c71471c71ULL, 0x471c71471c71471cULL, }, /* 56 */
{ 0x1c70c61c70c61c70ULL, 0xc61c70c61c70c61cULL, },
{ 0x1871c31871c31871ULL, 0xc31871c31871c318ULL, },
{ 0x1c51c71c51c71c51ULL, 0xc71c51c71c51c71cULL, },
{ 0x0c61c70c61c70c61ULL, 0xc70c61c70c61c70cULL, },
{ 0x1471c71471c71471ULL, 0xc71471c71471c714ULL, },
{ 0x1431c61431c61431ULL, 0xc61431c61431c614ULL, },
{ 0x0c71470c71470c71ULL, 0x470c71470c71470cULL, },
{ 0x886aa6cc28625540ULL, 0x4367031ebe73b00cULL, }, /* 64 */
{ 0x802ae6c408625540ULL, 0x4b67035ade7bb00cULL, },
{ 0x886aa6c828625540ULL, 0x4b660b5ef673900cULL, },
{ 0x886aa6cc28605100ULL, 0x4b650a5efc7bb00cULL, },
{ 0xfaba00634c93c708ULL, 0x1277b31a153752ecULL, },
{ 0xf3be00634d934708ULL, 0x1277b31a153f52ecULL, },
{ 0xebba00634d13c708ULL, 0x12f6bb1a153752ecULL, },
{ 0xfa3e00430d91c308ULL, 0x12f5ba1a153b52fcULL, },
{ 0xac5aaeaab8cb8b80ULL, 0x2758c6bfab232404ULL, }, /* 72 */
{ 0xa41aaea299c70b80ULL, 0x2358c6fb8b2b2104ULL, },
{ 0xac5aaeaab94f8380ULL, 0x27d8867fa3230504ULL, },
{ 0xac5aae8ab9cd8b80ULL, 0x07d8c6fea92b2114ULL, },
{ 0x704b164d5e31c24eULL, 0x85718098a942e2a0ULL, },
{ 0x700f16455e31624eULL, 0x897180d88942e2a0ULL, },
{ 0x604b16495c31e24eULL, 0x0df08858a142c2a0ULL, },
{ 0x704f164d1e31e20eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_B(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_B(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BCLR.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BCLR.D";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, }, /* 0 */
{ 0xfffffffffffffffeULL, 0xfffffffffffffffeULL, },
{ 0xfffffbffffffffffULL, 0xfffffbffffffffffULL, },
{ 0xffffffffffdfffffULL, 0xffffffffffdfffffULL, },
{ 0xffffffffffffefffULL, 0xffffffffffffefffULL, },
{ 0xfff7ffffffffffffULL, 0xfff7ffffffffffffULL, },
{ 0xffffffffffffbfffULL, 0xfffffff7ffffffffULL, },
{ 0xfffdffffffffffffULL, 0xffffffffefffffffULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, }, /* 8 */
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaa8aaaaaULL, 0xaaaaaaaaaa8aaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaa2aaaaaaaaaaaaULL, 0xaaa2aaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaa2aaaaaaaaULL, },
{ 0xaaa8aaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, }, /* 24 */
{ 0x5555555555555554ULL, 0x5555555555555554ULL, },
{ 0x5555515555555555ULL, 0x5555515555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555554555ULL, 0x5555555555554555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555551555ULL, 0x5555555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555545555555ULL, },
{ 0x4cccccccccccccccULL, 0x4cccccccccccccccULL, }, /* 32 */
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccc8ccccccccccULL, 0xccccc8ccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccc4ccccccccccccULL, 0xccc4ccccccccccccULL, },
{ 0xcccccccccccc8cccULL, 0xccccccc4ccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, }, /* 40 */
{ 0x3333333333333332ULL, 0x3333333333333332ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333133333ULL, 0x3333333333133333ULL, },
{ 0x3333333333332333ULL, 0x3333333333332333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3331333333333333ULL, 0x3333333323333333ULL, },
{ 0x638e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, }, /* 48 */
{ 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e2ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38a38e38e38e3ULL, },
{ 0xe38e38e38e18e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38e38e28e3ULL, },
{ 0xe38638e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38a38eULL, 0x38e38e30e38e38e3ULL, },
{ 0xe38c38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0x1c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, }, /* 56 */
{ 0x1c71c71c71c71c70ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c31c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c51c71cULL, },
{ 0x1c71c71c71c70c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71471c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c70c71c71cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5efe7ba00cULL, }, /* 64 */
{ 0x886ae6cc28625440ULL, 0x4b670b5efe7bb00cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5efe6bb00cULL, },
{ 0x886ae6cc28621540ULL, 0x4b670b5efe7bb00cULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1a153f42fcULL, },
{ 0xfbbe00634d93c608ULL, 0x02f7bb1a153f52fcULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1a152f52fcULL, },
{ 0xfbbe00634d938708ULL, 0x12f7bb1a153f52fcULL, },
{ 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, }, /* 72 */
{ 0xac5aaeaab9cf8a80ULL, 0x27d8c6ffab2b2514ULL, },
{ 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
{ 0xac5aaeaab9cf8b80ULL, 0x27d8c6feab2b2514ULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
{ 0x704f164d5e31a24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_D(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_D(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BCLR.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BCLR.H";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, }, /* 0 */
{ 0xfffefffefffefffeULL, 0xfffefffefffefffeULL, },
{ 0xfbfffbfffbfffbffULL, 0xfbfffbfffbfffbffULL, },
{ 0xffdfffdfffdfffdfULL, 0xffdfffdfffdfffdfULL, },
{ 0xefffefffefffefffULL, 0xefffefffefffefffULL, },
{ 0xfff7fff7fff7fff7ULL, 0xfff7fff7fff7fff7ULL, },
{ 0xbffffff7feffbfffULL, 0xfff7feffbffffff7ULL, },
{ 0xfffdefffff7ffffdULL, 0xefffff7ffffdefffULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, }, /* 8 */
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaa8aaa8aaa8aaa8aULL, 0xaa8aaa8aaa8aaa8aULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaa2aaa2aaa2aaa2ULL, 0xaaa2aaa2aaa2aaa2ULL, },
{ 0xaaaaaaa2aaaaaaaaULL, 0xaaa2aaaaaaaaaaa2ULL, },
{ 0xaaa8aaaaaa2aaaa8ULL, 0xaaaaaa2aaaa8aaaaULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, }, /* 24 */
{ 0x5554555455545554ULL, 0x5554555455545554ULL, },
{ 0x5155515551555155ULL, 0x5155515551555155ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x4555455545554555ULL, 0x4555455545554555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x1555555554551555ULL, 0x5555545515555555ULL, },
{ 0x5555455555555555ULL, 0x4555555555554555ULL, },
{ 0x4ccc4ccc4ccc4cccULL, 0x4ccc4ccc4ccc4cccULL, }, /* 32 */
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xc8ccc8ccc8ccc8ccULL, 0xc8ccc8ccc8ccc8ccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccc4ccc4ccc4ccc4ULL, 0xccc4ccc4ccc4ccc4ULL, },
{ 0x8cccccc4cccc8cccULL, 0xccc4cccc8cccccc4ULL, },
{ 0xcccccccccc4cccccULL, 0xcccccc4cccccccccULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, }, /* 40 */
{ 0x3332333233323332ULL, 0x3332333233323332ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3313331333133313ULL, 0x3313331333133313ULL, },
{ 0x2333233323332333ULL, 0x2333233323332333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333332333333ULL, 0x3333323333333333ULL, },
{ 0x3331233333333331ULL, 0x2333333333312333ULL, },
{ 0x638e38e30e38638eULL, 0x38e30e38638e38e3ULL, }, /* 48 */
{ 0xe38e38e28e38e38eULL, 0x38e28e38e38e38e2ULL, },
{ 0xe38e38e38a38e38eULL, 0x38e38a38e38e38e3ULL, },
{ 0xe38e38c38e18e38eULL, 0x38c38e18e38e38c3ULL, },
{ 0xe38e28e38e38e38eULL, 0x28e38e38e38e28e3ULL, },
{ 0xe38638e38e30e386ULL, 0x38e38e30e38638e3ULL, },
{ 0xa38e38e38e38a38eULL, 0x38e38e38a38e38e3ULL, },
{ 0xe38c28e38e38e38cULL, 0x28e38e38e38c28e3ULL, },
{ 0x1c71471c71c71c71ULL, 0x471c71c71c71471cULL, }, /* 56 */
{ 0x1c70c71c71c61c70ULL, 0xc71c71c61c70c71cULL, },
{ 0x1871c31c71c71871ULL, 0xc31c71c71871c31cULL, },
{ 0x1c51c71c71c71c51ULL, 0xc71c71c71c51c71cULL, },
{ 0x0c71c71c61c70c71ULL, 0xc71c61c70c71c71cULL, },
{ 0x1c71c71471c71c71ULL, 0xc71471c71c71c714ULL, },
{ 0x1c71c71470c71c71ULL, 0xc71470c71c71c714ULL, },
{ 0x1c71c71c71471c71ULL, 0xc71c71471c71c71cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5ef67ba00cULL, }, /* 64 */
{ 0x886ae6c428625440ULL, 0x4b670b5e7e7ba00cULL, },
{ 0x886ae2cc28625540ULL, 0x4a670b5ef67bb00cULL, },
{ 0x086ac6cc28601540ULL, 0x4b650a5efe7bb00cULL, },
{ 0xfbbe00634d93c708ULL, 0x1277bb1a153f42fcULL, },
{ 0xbbbe00634d93c608ULL, 0x1277bb1a153f42fcULL, },
{ 0xfbbe00634d93c708ULL, 0x12f73b1a153f52ecULL, },
{ 0x7bbe00634d918708ULL, 0x12f5ba1a153b52fcULL, },
{ 0xa85aaeaab9cb8b80ULL, 0x275886ffa32b2514ULL, }, /* 72 */
{ 0xac5aaea2b9c78a80ULL, 0x2758c2ff2b2b2514ULL, },
{ 0xa85aaaaa39cf8b80ULL, 0x26d846ffa32b2504ULL, },
{ 0x2c5a8eaab9cd8b80ULL, 0x27d8c6ffab2b2514ULL, },
{ 0x704f064d5e31e24eULL, 0x8d7188d8a142e2a0ULL, },
{ 0x304f16455e31e24eULL, 0x8d7188d82942e2a0ULL, },
{ 0x704f124d5e31e24eULL, 0x8cf108d8a142e2a0ULL, },
{ 0x704f164d5e31a24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_H(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_H(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BCLR.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BCLR.W";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, }, /* 0 */
{ 0xfffffffefffffffeULL, 0xfffffffefffffffeULL, },
{ 0xfffffbfffffffbffULL, 0xfffffbfffffffbffULL, },
{ 0xffdfffffffdfffffULL, 0xffdfffffffdfffffULL, },
{ 0xffffefffffffefffULL, 0xffffefffffffefffULL, },
{ 0xfff7fffffff7ffffULL, 0xfff7fffffff7ffffULL, },
{ 0xfffffff7ffffbfffULL, 0xfefffffffffffff7ULL, },
{ 0xeffffffffffdffffULL, 0xffffff7fefffffffULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, }, /* 8 */
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaa8aaaaaaa8aaaaaULL, 0xaa8aaaaaaa8aaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaa2aaaaaaa2aaaaULL, 0xaaa2aaaaaaa2aaaaULL, },
{ 0xaaaaaaa2aaaaaaaaULL, 0xaaaaaaaaaaaaaaa2ULL, },
{ 0xaaaaaaaaaaa8aaaaULL, 0xaaaaaa2aaaaaaaaaULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, }, /* 24 */
{ 0x5555555455555554ULL, 0x5555555455555554ULL, },
{ 0x5555515555555155ULL, 0x5555515555555155ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555455555554555ULL, 0x5555455555554555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555551555ULL, 0x5455555555555555ULL, },
{ 0x4555555555555555ULL, 0x5555555545555555ULL, },
{ 0x4ccccccc4cccccccULL, 0x4ccccccc4cccccccULL, }, /* 32 */
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccc8ccccccc8ccULL, 0xccccc8ccccccc8ccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccc4ccccccc4ccccULL, 0xccc4ccccccc4ccccULL, },
{ 0xccccccc4cccc8cccULL, 0xccccccccccccccc4ULL, },
{ 0xccccccccccccccccULL, 0xcccccc4cccccccccULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, }, /* 40 */
{ 0x3333333233333332ULL, 0x3333333233333332ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3313333333133333ULL, 0x3313333333133333ULL, },
{ 0x3333233333332333ULL, 0x3333233333332333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3233333333333333ULL, },
{ 0x2333333333313333ULL, 0x3333333323333333ULL, },
{ 0x638e38e30e38e38eULL, 0x38e38e38638e38e3ULL, }, /* 48 */
{ 0xe38e38e28e38e38eULL, 0x38e38e38e38e38e2ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38a38e38e38e3ULL, },
{ 0xe38e38e38e18e38eULL, 0x38c38e38e38e38e3ULL, },
{ 0xe38e28e38e38e38eULL, 0x38e38e38e38e28e3ULL, },
{ 0xe38638e38e30e38eULL, 0x38e38e38e38638e3ULL, },
{ 0xe38e38e38e38a38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0x1c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, }, /* 56 */
{ 0x1c71c71c71c71c70ULL, 0xc71c71c61c71c71cULL, },
{ 0x1c71c31c71c71871ULL, 0xc71c71c71c71c31cULL, },
{ 0x1c51c71c71c71c71ULL, 0xc71c71c71c51c71cULL, },
{ 0x1c71c71c71c70c71ULL, 0xc71c61c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71471c71c71c71cULL, },
{ 0x1c71c71471c71c71ULL, 0xc61c71c71c71c714ULL, },
{ 0x0c71c71c71c51c71ULL, 0xc71c71470c71c71cULL, },
{ 0x886ae6cc28625540ULL, 0x0b670b5efe7ba00cULL, }, /* 64 */
{ 0x886ae6c428625440ULL, 0x4b670b5eee7bb00cULL, },
{ 0x886ae2cc28625540ULL, 0x4b670b5efe6bb00cULL, },
{ 0x886ac6cc28621540ULL, 0x4a670b5efe7bb00cULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1a153f42fcULL, },
{ 0xfbbe00634d93c608ULL, 0x12f7bb1a053f52fcULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1a152f52fcULL, },
{ 0xfbbe00634d938708ULL, 0x12f7bb1a153f52fcULL, },
{ 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, }, /* 72 */
{ 0xac5aaea2b9cf8a80ULL, 0x23d8c6ffab2b2514ULL, },
{ 0xac5aaaaab9cf8b80ULL, 0x27d8c6ffab2b2514ULL, },
{ 0xac5a8eaab9cf8b80ULL, 0x26d8c6ffab2b2514ULL, },
{ 0x704f064d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
{ 0x704f16455e31e24eULL, 0x89f188d8a942e2a0ULL, },
{ 0x704f124d5e31e24eULL, 0x0df188d8a942e2a0ULL, },
{ 0x704f164d5e31a24eULL, 0x8cf188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_W(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BCLR_W(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BNEG.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BNEG.B";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7f7f7f7f7f7f7f7fULL, 0x7f7f7f7f7f7f7f7fULL, }, /* 0 */
{ 0xfefefefefefefefeULL, 0xfefefefefefefefeULL, },
{ 0xfbfbfbfbfbfbfbfbULL, 0xfbfbfbfbfbfbfbfbULL, },
{ 0xdfdfdfdfdfdfdfdfULL, 0xdfdfdfdfdfdfdfdfULL, },
{ 0xefefefefefefefefULL, 0xefefefefefefefefULL, },
{ 0xf7f7f7f7f7f7f7f7ULL, 0xf7f7f7f7f7f7f7f7ULL, },
{ 0xf7bffef7bffef7bfULL, 0xfef7bffef7bffef7ULL, },
{ 0xeffd7feffd7feffdULL, 0x7feffd7feffd7fefULL, },
{ 0x8080808080808080ULL, 0x8080808080808080ULL, }, /* 8 */
{ 0x0101010101010101ULL, 0x0101010101010101ULL, },
{ 0x0404040404040404ULL, 0x0404040404040404ULL, },
{ 0x2020202020202020ULL, 0x2020202020202020ULL, },
{ 0x1010101010101010ULL, 0x1010101010101010ULL, },
{ 0x0808080808080808ULL, 0x0808080808080808ULL, },
{ 0x0840010840010840ULL, 0x0108400108400108ULL, },
{ 0x1002801002801002ULL, 0x8010028010028010ULL, },
{ 0x2a2a2a2a2a2a2a2aULL, 0x2a2a2a2a2a2a2a2aULL, }, /* 16 */
{ 0xababababababababULL, 0xababababababababULL, },
{ 0xaeaeaeaeaeaeaeaeULL, 0xaeaeaeaeaeaeaeaeULL, },
{ 0x8a8a8a8a8a8a8a8aULL, 0x8a8a8a8a8a8a8a8aULL, },
{ 0xbabababababababaULL, 0xbabababababababaULL, },
{ 0xa2a2a2a2a2a2a2a2ULL, 0xa2a2a2a2a2a2a2a2ULL, },
{ 0xa2eaaba2eaaba2eaULL, 0xaba2eaaba2eaaba2ULL, },
{ 0xbaa82abaa82abaa8ULL, 0x2abaa82abaa82abaULL, },
{ 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, }, /* 24 */
{ 0x5454545454545454ULL, 0x5454545454545454ULL, },
{ 0x5151515151515151ULL, 0x5151515151515151ULL, },
{ 0x7575757575757575ULL, 0x7575757575757575ULL, },
{ 0x4545454545454545ULL, 0x4545454545454545ULL, },
{ 0x5d5d5d5d5d5d5d5dULL, 0x5d5d5d5d5d5d5d5dULL, },
{ 0x5d15545d15545d15ULL, 0x545d15545d15545dULL, },
{ 0x4557d54557d54557ULL, 0xd54557d54557d545ULL, },
{ 0x4c4c4c4c4c4c4c4cULL, 0x4c4c4c4c4c4c4c4cULL, }, /* 32 */
{ 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
{ 0xc8c8c8c8c8c8c8c8ULL, 0xc8c8c8c8c8c8c8c8ULL, },
{ 0xececececececececULL, 0xececececececececULL, },
{ 0xdcdcdcdcdcdcdcdcULL, 0xdcdcdcdcdcdcdcdcULL, },
{ 0xc4c4c4c4c4c4c4c4ULL, 0xc4c4c4c4c4c4c4c4ULL, },
{ 0xc48ccdc48ccdc48cULL, 0xcdc48ccdc48ccdc4ULL, },
{ 0xdcce4cdcce4cdcceULL, 0x4cdcce4cdcce4cdcULL, },
{ 0xb3b3b3b3b3b3b3b3ULL, 0xb3b3b3b3b3b3b3b3ULL, }, /* 40 */
{ 0x3232323232323232ULL, 0x3232323232323232ULL, },
{ 0x3737373737373737ULL, 0x3737373737373737ULL, },
{ 0x1313131313131313ULL, 0x1313131313131313ULL, },
{ 0x2323232323232323ULL, 0x2323232323232323ULL, },
{ 0x3b3b3b3b3b3b3b3bULL, 0x3b3b3b3b3b3b3b3bULL, },
{ 0x3b73323b73323b73ULL, 0x323b73323b73323bULL, },
{ 0x2331b32331b32331ULL, 0xb32331b32331b323ULL, },
{ 0x630eb8630eb8630eULL, 0xb8630eb8630eb863ULL, }, /* 48 */
{ 0xe28f39e28f39e28fULL, 0x39e28f39e28f39e2ULL, },
{ 0xe78a3ce78a3ce78aULL, 0x3ce78a3ce78a3ce7ULL, },
{ 0xc3ae18c3ae18c3aeULL, 0x18c3ae18c3ae18c3ULL, },
{ 0xf39e28f39e28f39eULL, 0x28f39e28f39e28f3ULL, },
{ 0xeb8630eb8630eb86ULL, 0x30eb8630eb8630ebULL, },
{ 0xebce39ebce39ebceULL, 0x39ebce39ebce39ebULL, },
{ 0xf38cb8f38cb8f38cULL, 0xb8f38cb8f38cb8f3ULL, },
{ 0x9cf1479cf1479cf1ULL, 0x479cf1479cf1479cULL, }, /* 56 */
{ 0x1d70c61d70c61d70ULL, 0xc61d70c61d70c61dULL, },
{ 0x1875c31875c31875ULL, 0xc31875c31875c318ULL, },
{ 0x3c51e73c51e73c51ULL, 0xe73c51e73c51e73cULL, },
{ 0x0c61d70c61d70c61ULL, 0xd70c61d70c61d70cULL, },
{ 0x1479cf1479cf1479ULL, 0xcf1479cf1479cf14ULL, },
{ 0x1431c61431c61431ULL, 0xc61431c61431c614ULL, },
{ 0x0c73470c73470c73ULL, 0x470c73470c73470cULL, },
{ 0x896ea6dc29667541ULL, 0x43e7031ebe73b11cULL, }, /* 64 */
{ 0x802ae7c4086ad541ULL, 0x4fe7035adefbb41cULL, },
{ 0x986ea6c82ae25d41ULL, 0xcb664bdef673901cULL, },
{ 0x89eaa6ec68605100ULL, 0x6b650a5ffc7fb40dULL, },
{ 0xfaba40734c97e709ULL, 0x1a77b35a553753ecULL, },
{ 0xf3fe016b6d9b4709ULL, 0x1677b31e35bf56ecULL, },
{ 0xebba40674f13cf09ULL, 0x92f6fb9a1d3772ecULL, },
{ 0xfa3e40430d91c348ULL, 0x32f5ba1b173b56fdULL, },
{ 0xad5eeebab8cbab81ULL, 0x2f58cebfeb232404ULL, }, /* 72 */
{ 0xa41aafa299c70b81ULL, 0x2358cefb8bab2104ULL, },
{ 0xbc5eeeaebb4f8381ULL, 0xa7d9867fa3230504ULL, },
{ 0xaddaee8af9cd8fc0ULL, 0x07dac7fea92f2115ULL, },
{ 0x714b565d5f35c24fULL, 0x85718098e94ae3b0ULL, },
{ 0x780f17457e39624fULL, 0x897180dc89c2e6b0ULL, },
{ 0x604b56495cb1ea4fULL, 0x0df0c858a14ac2b0ULL, },
{ 0x71cf566d1e33e60eULL, 0xadf389d9ab46e6a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_B(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_B(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BNEG.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BNEG.D";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, }, /* 0 */
{ 0xfffffffffffffffeULL, 0xfffffffffffffffeULL, },
{ 0xfffffbffffffffffULL, 0xfffffbffffffffffULL, },
{ 0xffffffffffdfffffULL, 0xffffffffffdfffffULL, },
{ 0xffffffffffffefffULL, 0xffffffffffffefffULL, },
{ 0xfff7ffffffffffffULL, 0xfff7ffffffffffffULL, },
{ 0xffffffffffffbfffULL, 0xfffffff7ffffffffULL, },
{ 0xfffdffffffffffffULL, 0xffffffffefffffffULL, },
{ 0x8000000000000000ULL, 0x8000000000000000ULL, }, /* 8 */
{ 0x0000000000000001ULL, 0x0000000000000001ULL, },
{ 0x0000040000000000ULL, 0x0000040000000000ULL, },
{ 0x0000000000200000ULL, 0x0000000000200000ULL, },
{ 0x0000000000001000ULL, 0x0000000000001000ULL, },
{ 0x0008000000000000ULL, 0x0008000000000000ULL, },
{ 0x0000000000004000ULL, 0x0000000800000000ULL, },
{ 0x0002000000000000ULL, 0x0000000010000000ULL, },
{ 0x2aaaaaaaaaaaaaaaULL, 0x2aaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
{ 0xaaaaaeaaaaaaaaaaULL, 0xaaaaaeaaaaaaaaaaULL, },
{ 0xaaaaaaaaaa8aaaaaULL, 0xaaaaaaaaaa8aaaaaULL, },
{ 0xaaaaaaaaaaaabaaaULL, 0xaaaaaaaaaaaabaaaULL, },
{ 0xaaa2aaaaaaaaaaaaULL, 0xaaa2aaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaeaaaULL, 0xaaaaaaa2aaaaaaaaULL, },
{ 0xaaa8aaaaaaaaaaaaULL, 0xaaaaaaaabaaaaaaaULL, },
{ 0xd555555555555555ULL, 0xd555555555555555ULL, }, /* 24 */
{ 0x5555555555555554ULL, 0x5555555555555554ULL, },
{ 0x5555515555555555ULL, 0x5555515555555555ULL, },
{ 0x5555555555755555ULL, 0x5555555555755555ULL, },
{ 0x5555555555554555ULL, 0x5555555555554555ULL, },
{ 0x555d555555555555ULL, 0x555d555555555555ULL, },
{ 0x5555555555551555ULL, 0x5555555d55555555ULL, },
{ 0x5557555555555555ULL, 0x5555555545555555ULL, },
{ 0x4cccccccccccccccULL, 0x4cccccccccccccccULL, }, /* 32 */
{ 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
{ 0xccccc8ccccccccccULL, 0xccccc8ccccccccccULL, },
{ 0xccccccccccecccccULL, 0xccccccccccecccccULL, },
{ 0xccccccccccccdcccULL, 0xccccccccccccdcccULL, },
{ 0xccc4ccccccccccccULL, 0xccc4ccccccccccccULL, },
{ 0xcccccccccccc8cccULL, 0xccccccc4ccccccccULL, },
{ 0xccceccccccccccccULL, 0xccccccccdcccccccULL, },
{ 0xb333333333333333ULL, 0xb333333333333333ULL, }, /* 40 */
{ 0x3333333333333332ULL, 0x3333333333333332ULL, },
{ 0x3333373333333333ULL, 0x3333373333333333ULL, },
{ 0x3333333333133333ULL, 0x3333333333133333ULL, },
{ 0x3333333333332333ULL, 0x3333333333332333ULL, },
{ 0x333b333333333333ULL, 0x333b333333333333ULL, },
{ 0x3333333333337333ULL, 0x3333333b33333333ULL, },
{ 0x3331333333333333ULL, 0x3333333323333333ULL, },
{ 0x638e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, }, /* 48 */
{ 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e2ULL, },
{ 0xe38e3ce38e38e38eULL, 0x38e38a38e38e38e3ULL, },
{ 0xe38e38e38e18e38eULL, 0x38e38e38e3ae38e3ULL, },
{ 0xe38e38e38e38f38eULL, 0x38e38e38e38e28e3ULL, },
{ 0xe38638e38e38e38eULL, 0x38eb8e38e38e38e3ULL, },
{ 0xe38e38e38e38a38eULL, 0x38e38e30e38e38e3ULL, },
{ 0xe38c38e38e38e38eULL, 0x38e38e38f38e38e3ULL, },
{ 0x9c71c71c71c71c71ULL, 0x471c71c71c71c71cULL, }, /* 56 */
{ 0x1c71c71c71c71c70ULL, 0xc71c71c71c71c71dULL, },
{ 0x1c71c31c71c71c71ULL, 0xc71c75c71c71c71cULL, },
{ 0x1c71c71c71e71c71ULL, 0xc71c71c71c51c71cULL, },
{ 0x1c71c71c71c70c71ULL, 0xc71c71c71c71d71cULL, },
{ 0x1c79c71c71c71c71ULL, 0xc71471c71c71c71cULL, },
{ 0x1c71c71c71c75c71ULL, 0xc71c71cf1c71c71cULL, },
{ 0x1c73c71c71c71c71ULL, 0xc71c71c70c71c71cULL, },
{ 0x886ae6cc28625541ULL, 0x4b670b5efe7ba00cULL, }, /* 64 */
{ 0x886ae6cc28625440ULL, 0x5b670b5efe7bb00cULL, },
{ 0x886ae6cc28625541ULL, 0x4b670b5efe6bb00cULL, },
{ 0x886ae6cc28621540ULL, 0x4b670b5ffe7bb00cULL, },
{ 0xfbbe00634d93c709ULL, 0x12f7bb1a153f42fcULL, },
{ 0xfbbe00634d93c608ULL, 0x02f7bb1a153f52fcULL, },
{ 0xfbbe00634d93c709ULL, 0x12f7bb1a152f52fcULL, },
{ 0xfbbe00634d938708ULL, 0x12f7bb1b153f52fcULL, },
{ 0xac5aaeaab9cf8b81ULL, 0x27d8c6ffab2b3514ULL, }, /* 72 */
{ 0xac5aaeaab9cf8a80ULL, 0x37d8c6ffab2b2514ULL, },
{ 0xac5aaeaab9cf8b81ULL, 0x27d8c6ffab3b2514ULL, },
{ 0xac5aaeaab9cfcb80ULL, 0x27d8c6feab2b2514ULL, },
{ 0x704f164d5e31e24fULL, 0x8df188d8a942f2a0ULL, },
{ 0x704f164d5e31e34eULL, 0x9df188d8a942e2a0ULL, },
{ 0x704f164d5e31e24fULL, 0x8df188d8a952e2a0ULL, },
{ 0x704f164d5e31a24eULL, 0x8df188d9a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_D(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_D(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BNEG.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BNEG.H";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fff7fff7fff7fffULL, 0x7fff7fff7fff7fffULL, }, /* 0 */
{ 0xfffefffefffefffeULL, 0xfffefffefffefffeULL, },
{ 0xfbfffbfffbfffbffULL, 0xfbfffbfffbfffbffULL, },
{ 0xffdfffdfffdfffdfULL, 0xffdfffdfffdfffdfULL, },
{ 0xefffefffefffefffULL, 0xefffefffefffefffULL, },
{ 0xfff7fff7fff7fff7ULL, 0xfff7fff7fff7fff7ULL, },
{ 0xbffffff7feffbfffULL, 0xfff7feffbffffff7ULL, },
{ 0xfffdefffff7ffffdULL, 0xefffff7ffffdefffULL, },
{ 0x8000800080008000ULL, 0x8000800080008000ULL, }, /* 8 */
{ 0x0001000100010001ULL, 0x0001000100010001ULL, },
{ 0x0400040004000400ULL, 0x0400040004000400ULL, },
{ 0x0020002000200020ULL, 0x0020002000200020ULL, },
{ 0x1000100010001000ULL, 0x1000100010001000ULL, },
{ 0x0008000800080008ULL, 0x0008000800080008ULL, },
{ 0x4000000801004000ULL, 0x0008010040000008ULL, },
{ 0x0002100000800002ULL, 0x1000008000021000ULL, },
{ 0x2aaa2aaa2aaa2aaaULL, 0x2aaa2aaa2aaa2aaaULL, }, /* 16 */
{ 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
{ 0xaeaaaeaaaeaaaeaaULL, 0xaeaaaeaaaeaaaeaaULL, },
{ 0xaa8aaa8aaa8aaa8aULL, 0xaa8aaa8aaa8aaa8aULL, },
{ 0xbaaabaaabaaabaaaULL, 0xbaaabaaabaaabaaaULL, },
{ 0xaaa2aaa2aaa2aaa2ULL, 0xaaa2aaa2aaa2aaa2ULL, },
{ 0xeaaaaaa2abaaeaaaULL, 0xaaa2abaaeaaaaaa2ULL, },
{ 0xaaa8baaaaa2aaaa8ULL, 0xbaaaaa2aaaa8baaaULL, },
{ 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, }, /* 24 */
{ 0x5554555455545554ULL, 0x5554555455545554ULL, },
{ 0x5155515551555155ULL, 0x5155515551555155ULL, },
{ 0x5575557555755575ULL, 0x5575557555755575ULL, },
{ 0x4555455545554555ULL, 0x4555455545554555ULL, },
{ 0x555d555d555d555dULL, 0x555d555d555d555dULL, },
{ 0x1555555d54551555ULL, 0x555d54551555555dULL, },
{ 0x5557455555d55557ULL, 0x455555d555574555ULL, },
{ 0x4ccc4ccc4ccc4cccULL, 0x4ccc4ccc4ccc4cccULL, }, /* 32 */
{ 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
{ 0xc8ccc8ccc8ccc8ccULL, 0xc8ccc8ccc8ccc8ccULL, },
{ 0xccecccecccecccecULL, 0xccecccecccecccecULL, },
{ 0xdcccdcccdcccdcccULL, 0xdcccdcccdcccdcccULL, },
{ 0xccc4ccc4ccc4ccc4ULL, 0xccc4ccc4ccc4ccc4ULL, },
{ 0x8cccccc4cdcc8cccULL, 0xccc4cdcc8cccccc4ULL, },
{ 0xcccedccccc4cccceULL, 0xdccccc4ccccedcccULL, },
{ 0xb333b333b333b333ULL, 0xb333b333b333b333ULL, }, /* 40 */
{ 0x3332333233323332ULL, 0x3332333233323332ULL, },
{ 0x3733373337333733ULL, 0x3733373337333733ULL, },
{ 0x3313331333133313ULL, 0x3313331333133313ULL, },
{ 0x2333233323332333ULL, 0x2333233323332333ULL, },
{ 0x333b333b333b333bULL, 0x333b333b333b333bULL, },
{ 0x7333333b32337333ULL, 0x333b32337333333bULL, },
{ 0x3331233333b33331ULL, 0x233333b333312333ULL, },
{ 0x638eb8e30e38638eULL, 0xb8e30e38638eb8e3ULL, }, /* 48 */
{ 0xe38f38e28e39e38fULL, 0x38e28e39e38f38e2ULL, },
{ 0xe78e3ce38a38e78eULL, 0x3ce38a38e78e3ce3ULL, },
{ 0xe3ae38c38e18e3aeULL, 0x38c38e18e3ae38c3ULL, },
{ 0xf38e28e39e38f38eULL, 0x28e39e38f38e28e3ULL, },
{ 0xe38638eb8e30e386ULL, 0x38eb8e30e38638ebULL, },
{ 0xa38e38eb8f38a38eULL, 0x38eb8f38a38e38ebULL, },
{ 0xe38c28e38eb8e38cULL, 0x28e38eb8e38c28e3ULL, },
{ 0x9c71471cf1c79c71ULL, 0x471cf1c79c71471cULL, }, /* 56 */
{ 0x1c70c71d71c61c70ULL, 0xc71d71c61c70c71dULL, },
{ 0x1871c31c75c71871ULL, 0xc31c75c71871c31cULL, },
{ 0x1c51c73c71e71c51ULL, 0xc73c71e71c51c73cULL, },
{ 0x0c71d71c61c70c71ULL, 0xd71c61c70c71d71cULL, },
{ 0x1c79c71471cf1c79ULL, 0xc71471cf1c79c714ULL, },
{ 0x5c71c71470c75c71ULL, 0xc71470c75c71c714ULL, },
{ 0x1c73d71c71471c73ULL, 0xd71c71471c73d71cULL, },
{ 0x8c6af6cc28665541ULL, 0x4be74b5ef67ba00cULL, }, /* 64 */
{ 0xc86ae6c4286a5440ULL, 0x4be70f5e7e7ba00cULL, },
{ 0x8c6ae2cca8625541ULL, 0x4a678b5ef67bb01cULL, },
{ 0x086ac6cc28601540ULL, 0x4b650a5efe7fb00dULL, },
{ 0xffbe10634d97c709ULL, 0x1277fb1a1d3f42fcULL, },
{ 0xbbbe006b4d9bc608ULL, 0x1277bf1a953f42fcULL, },
{ 0xffbe0463cd93c709ULL, 0x13f73b1a1d3f52ecULL, },
{ 0x7bbe20634d918708ULL, 0x12f5ba1a153b52fdULL, },
{ 0xa85abeaab9cb8b81ULL, 0x275886ffa32b3514ULL, }, /* 72 */
{ 0xec5aaea2b9c78a80ULL, 0x2758c2ff2b2b3514ULL, },
{ 0xa85aaaaa39cf8b81ULL, 0x26d846ffa32b2504ULL, },
{ 0x2c5a8eaab9cdcb80ULL, 0x27dac7ffab2f2515ULL, },
{ 0x744f064d5e35e24fULL, 0x8d71c8d8a142f2a0ULL, },
{ 0x304f16455e39e34eULL, 0x8d718cd82942f2a0ULL, },
{ 0x744f124dde31e24fULL, 0x8cf108d8a142e2b0ULL, },
{ 0xf04f364d5e33a24eULL, 0x8df389d8a946e2a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_H(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_H(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BNEG.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BNEG.W";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, }, /* 0 */
{ 0xfffffffefffffffeULL, 0xfffffffefffffffeULL, },
{ 0xfffffbfffffffbffULL, 0xfffffbfffffffbffULL, },
{ 0xffdfffffffdfffffULL, 0xffdfffffffdfffffULL, },
{ 0xffffefffffffefffULL, 0xffffefffffffefffULL, },
{ 0xfff7fffffff7ffffULL, 0xfff7fffffff7ffffULL, },
{ 0xfffffff7ffffbfffULL, 0xfefffffffffffff7ULL, },
{ 0xeffffffffffdffffULL, 0xffffff7fefffffffULL, },
{ 0x8000000080000000ULL, 0x8000000080000000ULL, }, /* 8 */
{ 0x0000000100000001ULL, 0x0000000100000001ULL, },
{ 0x0000040000000400ULL, 0x0000040000000400ULL, },
{ 0x0020000000200000ULL, 0x0020000000200000ULL, },
{ 0x0000100000001000ULL, 0x0000100000001000ULL, },
{ 0x0008000000080000ULL, 0x0008000000080000ULL, },
{ 0x0000000800004000ULL, 0x0100000000000008ULL, },
{ 0x1000000000020000ULL, 0x0000008010000000ULL, },
{ 0x2aaaaaaa2aaaaaaaULL, 0x2aaaaaaa2aaaaaaaULL, }, /* 16 */
{ 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
{ 0xaaaaaeaaaaaaaeaaULL, 0xaaaaaeaaaaaaaeaaULL, },
{ 0xaa8aaaaaaa8aaaaaULL, 0xaa8aaaaaaa8aaaaaULL, },
{ 0xaaaabaaaaaaabaaaULL, 0xaaaabaaaaaaabaaaULL, },
{ 0xaaa2aaaaaaa2aaaaULL, 0xaaa2aaaaaaa2aaaaULL, },
{ 0xaaaaaaa2aaaaeaaaULL, 0xabaaaaaaaaaaaaa2ULL, },
{ 0xbaaaaaaaaaa8aaaaULL, 0xaaaaaa2abaaaaaaaULL, },
{ 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, }, /* 24 */
{ 0x5555555455555554ULL, 0x5555555455555554ULL, },
{ 0x5555515555555155ULL, 0x5555515555555155ULL, },
{ 0x5575555555755555ULL, 0x5575555555755555ULL, },
{ 0x5555455555554555ULL, 0x5555455555554555ULL, },
{ 0x555d5555555d5555ULL, 0x555d5555555d5555ULL, },
{ 0x5555555d55551555ULL, 0x545555555555555dULL, },
{ 0x4555555555575555ULL, 0x555555d545555555ULL, },
{ 0x4ccccccc4cccccccULL, 0x4ccccccc4cccccccULL, }, /* 32 */
{ 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
{ 0xccccc8ccccccc8ccULL, 0xccccc8ccccccc8ccULL, },
{ 0xccecccccccecccccULL, 0xccecccccccecccccULL, },
{ 0xccccdcccccccdcccULL, 0xccccdcccccccdcccULL, },
{ 0xccc4ccccccc4ccccULL, 0xccc4ccccccc4ccccULL, },
{ 0xccccccc4cccc8cccULL, 0xcdccccccccccccc4ULL, },
{ 0xdcccccccccceccccULL, 0xcccccc4cdcccccccULL, },
{ 0xb3333333b3333333ULL, 0xb3333333b3333333ULL, }, /* 40 */
{ 0x3333333233333332ULL, 0x3333333233333332ULL, },
{ 0x3333373333333733ULL, 0x3333373333333733ULL, },
{ 0x3313333333133333ULL, 0x3313333333133333ULL, },
{ 0x3333233333332333ULL, 0x3333233333332333ULL, },
{ 0x333b3333333b3333ULL, 0x333b3333333b3333ULL, },
{ 0x3333333b33337333ULL, 0x323333333333333bULL, },
{ 0x2333333333313333ULL, 0x333333b323333333ULL, },
{ 0x638e38e30e38e38eULL, 0xb8e38e38638e38e3ULL, }, /* 48 */
{ 0xe38e38e28e38e38fULL, 0x38e38e39e38e38e2ULL, },
{ 0xe38e3ce38e38e78eULL, 0x38e38a38e38e3ce3ULL, },
{ 0xe3ae38e38e18e38eULL, 0x38c38e38e3ae38e3ULL, },
{ 0xe38e28e38e38f38eULL, 0x38e39e38e38e28e3ULL, },
{ 0xe38638e38e30e38eULL, 0x38eb8e38e38638e3ULL, },
{ 0xe38e38eb8e38a38eULL, 0x39e38e38e38e38ebULL, },
{ 0xf38e38e38e3ae38eULL, 0x38e38eb8f38e38e3ULL, },
{ 0x9c71c71cf1c71c71ULL, 0x471c71c79c71c71cULL, }, /* 56 */
{ 0x1c71c71d71c71c70ULL, 0xc71c71c61c71c71dULL, },
{ 0x1c71c31c71c71871ULL, 0xc71c75c71c71c31cULL, },
{ 0x1c51c71c71e71c71ULL, 0xc73c71c71c51c71cULL, },
{ 0x1c71d71c71c70c71ULL, 0xc71c61c71c71d71cULL, },
{ 0x1c79c71c71cf1c71ULL, 0xc71471c71c79c71cULL, },
{ 0x1c71c71471c75c71ULL, 0xc61c71c71c71c714ULL, },
{ 0x0c71c71c71c51c71ULL, 0xc71c71470c71c71cULL, },
{ 0x886af6cc28625541ULL, 0x0b670b5efe7ba00cULL, }, /* 64 */
{ 0x886ae6c428625440ULL, 0x4f670b5eee7bb00cULL, },
{ 0x886ae2cc28625541ULL, 0xcb670b5efe6bb00cULL, },
{ 0x886ac6cc28621540ULL, 0x4a670b5efe7bb00dULL, },
{ 0xfbbe10634d93c709ULL, 0x52f7bb1a153f42fcULL, },
{ 0xfbbe006b4d93c608ULL, 0x16f7bb1a053f52fcULL, },
{ 0xfbbe04634d93c709ULL, 0x92f7bb1a152f52fcULL, },
{ 0xfbbe20634d938708ULL, 0x13f7bb1a153f52fdULL, },
{ 0xac5abeaab9cf8b81ULL, 0x67d8c6ffab2b3514ULL, }, /* 72 */
{ 0xac5aaea2b9cf8a80ULL, 0x23d8c6ffbb2b2514ULL, },
{ 0xac5aaaaab9cf8b81ULL, 0xa7d8c6ffab3b2514ULL, },
{ 0xac5a8eaab9cfcb80ULL, 0x26d8c6ffab2b2515ULL, },
{ 0x704f064d5e31e24fULL, 0xcdf188d8a942f2a0ULL, },
{ 0x704f16455e31e34eULL, 0x89f188d8b942e2a0ULL, },
{ 0x704f124d5e31e24fULL, 0x0df188d8a952e2a0ULL, },
{ 0x704f364d5e31a24eULL, 0x8cf188d8a942e2a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_W(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BNEG_W(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BSET.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BSET.B";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, }, /* 0 */
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0x8080808080808080ULL, 0x8080808080808080ULL, }, /* 8 */
{ 0x0101010101010101ULL, 0x0101010101010101ULL, },
{ 0x0404040404040404ULL, 0x0404040404040404ULL, },
{ 0x2020202020202020ULL, 0x2020202020202020ULL, },
{ 0x1010101010101010ULL, 0x1010101010101010ULL, },
{ 0x0808080808080808ULL, 0x0808080808080808ULL, },
{ 0x0840010840010840ULL, 0x0108400108400108ULL, },
{ 0x1002801002801002ULL, 0x8010028010028010ULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xababababababababULL, 0xababababababababULL, },
{ 0xaeaeaeaeaeaeaeaeULL, 0xaeaeaeaeaeaeaeaeULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xbabababababababaULL, 0xbabababababababaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaeaabaaeaabaaeaULL, 0xabaaeaabaaeaabaaULL, },
{ 0xbaaaaabaaaaabaaaULL, 0xaabaaaaabaaaaabaULL, },
{ 0xd5d5d5d5d5d5d5d5ULL, 0xd5d5d5d5d5d5d5d5ULL, }, /* 24 */
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x7575757575757575ULL, 0x7575757575757575ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5d5d5d5d5d5d5d5dULL, 0x5d5d5d5d5d5d5d5dULL, },
{ 0x5d55555d55555d55ULL, 0x555d55555d55555dULL, },
{ 0x5557d55557d55557ULL, 0xd55557d55557d555ULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, }, /* 32 */
{ 0xcdcdcdcdcdcdcdcdULL, 0xcdcdcdcdcdcdcdcdULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xececececececececULL, 0xececececececececULL, },
{ 0xdcdcdcdcdcdcdcdcULL, 0xdcdcdcdcdcdcdcdcULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xcccccdcccccdccccULL, 0xcdcccccdcccccdccULL, },
{ 0xdcceccdcceccdcceULL, 0xccdcceccdcceccdcULL, },
{ 0xb3b3b3b3b3b3b3b3ULL, 0xb3b3b3b3b3b3b3b3ULL, }, /* 40 */
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3737373737373737ULL, 0x3737373737373737ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3b3b3b3b3b3b3b3bULL, 0x3b3b3b3b3b3b3b3bULL, },
{ 0x3b73333b73333b73ULL, 0x333b73333b73333bULL, },
{ 0x3333b33333b33333ULL, 0xb33333b33333b333ULL, },
{ 0xe38eb8e38eb8e38eULL, 0xb8e38eb8e38eb8e3ULL, }, /* 48 */
{ 0xe38f39e38f39e38fULL, 0x39e38f39e38f39e3ULL, },
{ 0xe78e3ce78e3ce78eULL, 0x3ce78e3ce78e3ce7ULL, },
{ 0xe3ae38e3ae38e3aeULL, 0x38e3ae38e3ae38e3ULL, },
{ 0xf39e38f39e38f39eULL, 0x38f39e38f39e38f3ULL, },
{ 0xeb8e38eb8e38eb8eULL, 0x38eb8e38eb8e38ebULL, },
{ 0xebce39ebce39ebceULL, 0x39ebce39ebce39ebULL, },
{ 0xf38eb8f38eb8f38eULL, 0xb8f38eb8f38eb8f3ULL, },
{ 0x9cf1c79cf1c79cf1ULL, 0xc79cf1c79cf1c79cULL, }, /* 56 */
{ 0x1d71c71d71c71d71ULL, 0xc71d71c71d71c71dULL, },
{ 0x1c75c71c75c71c75ULL, 0xc71c75c71c75c71cULL, },
{ 0x3c71e73c71e73c71ULL, 0xe73c71e73c71e73cULL, },
{ 0x1c71d71c71d71c71ULL, 0xd71c71d71c71d71cULL, },
{ 0x1c79cf1c79cf1c79ULL, 0xcf1c79cf1c79cf1cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c73c71c73c71c73ULL, 0xc71c73c71c73c71cULL, },
{ 0x896ee6dc29667541ULL, 0x4be70b5efe7bb11cULL, }, /* 64 */
{ 0x886ae7cc286ad541ULL, 0x4fe70b5efefbb41cULL, },
{ 0x986ee6cc2ae25d41ULL, 0xcb674bdefe7bb01cULL, },
{ 0x89eae6ec68625540ULL, 0x6b670b5ffe7fb40dULL, },
{ 0xfbbe40734d97e709ULL, 0x1af7bb5a553f53fcULL, },
{ 0xfbfe016b6d9bc709ULL, 0x16f7bb1e35bf56fcULL, },
{ 0xfbbe40674f93cf09ULL, 0x92f7fb9a1d3f72fcULL, },
{ 0xfbbe40634d93c748ULL, 0x32f7bb1b173f56fdULL, },
{ 0xad5eeebab9cfab81ULL, 0x2fd8ceffeb2b2514ULL, }, /* 72 */
{ 0xac5aafaab9cf8b81ULL, 0x27d8ceffabab2514ULL, },
{ 0xbc5eeeaebbcf8b81ULL, 0xa7d9c6ffab2b2514ULL, },
{ 0xaddaeeaaf9cf8fc0ULL, 0x27dac7ffab2f2515ULL, },
{ 0x714f565d5f35e24fULL, 0x8df188d8e94ae3b0ULL, },
{ 0x784f174d7e39e24fULL, 0x8df188dca9c2e6b0ULL, },
{ 0x704f564d5eb1ea4fULL, 0x8df1c8d8a94ae2b0ULL, },
{ 0x71cf566d5e33e64eULL, 0xadf389d9ab46e6a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_B(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_B(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BSET.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BSET.D";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, }, /* 0 */
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0x8000000000000000ULL, 0x8000000000000000ULL, }, /* 8 */
{ 0x0000000000000001ULL, 0x0000000000000001ULL, },
{ 0x0000040000000000ULL, 0x0000040000000000ULL, },
{ 0x0000000000200000ULL, 0x0000000000200000ULL, },
{ 0x0000000000001000ULL, 0x0000000000001000ULL, },
{ 0x0008000000000000ULL, 0x0008000000000000ULL, },
{ 0x0000000000004000ULL, 0x0000000800000000ULL, },
{ 0x0002000000000000ULL, 0x0000000010000000ULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xaaaaaaaaaaaaaaabULL, 0xaaaaaaaaaaaaaaabULL, },
{ 0xaaaaaeaaaaaaaaaaULL, 0xaaaaaeaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaabaaaULL, 0xaaaaaaaaaaaabaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaeaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaabaaaaaaaULL, },
{ 0xd555555555555555ULL, 0xd555555555555555ULL, }, /* 24 */
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555755555ULL, 0x5555555555755555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x555d555555555555ULL, 0x555d555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555d55555555ULL, },
{ 0x5557555555555555ULL, 0x5555555555555555ULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, }, /* 32 */
{ 0xcccccccccccccccdULL, 0xcccccccccccccccdULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccecccccULL, 0xccccccccccecccccULL, },
{ 0xccccccccccccdcccULL, 0xccccccccccccdcccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccceccccccccccccULL, 0xccccccccdcccccccULL, },
{ 0xb333333333333333ULL, 0xb333333333333333ULL, }, /* 40 */
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333373333333333ULL, 0x3333373333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x333b333333333333ULL, 0x333b333333333333ULL, },
{ 0x3333333333337333ULL, 0x3333333b33333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0xe38e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, }, /* 48 */
{ 0xe38e38e38e38e38fULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e3ce38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38e3ae38e3ULL, },
{ 0xe38e38e38e38f38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38eb8e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38e38e38f38e38e3ULL, },
{ 0x9c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, }, /* 56 */
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71dULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c75c71c71c71cULL, },
{ 0x1c71c71c71e71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c71d71cULL, },
{ 0x1c79c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c75c71ULL, 0xc71c71cf1c71c71cULL, },
{ 0x1c73c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x886ae6cc28625541ULL, 0x4b670b5efe7bb00cULL, }, /* 64 */
{ 0x886ae6cc28625540ULL, 0x5b670b5efe7bb00cULL, },
{ 0x886ae6cc28625541ULL, 0x4b670b5efe7bb00cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5ffe7bb00cULL, },
{ 0xfbbe00634d93c709ULL, 0x12f7bb1a153f52fcULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1a153f52fcULL, },
{ 0xfbbe00634d93c709ULL, 0x12f7bb1a153f52fcULL, },
{ 0xfbbe00634d93c708ULL, 0x12f7bb1b153f52fcULL, },
{ 0xac5aaeaab9cf8b81ULL, 0x27d8c6ffab2b3514ULL, }, /* 72 */
{ 0xac5aaeaab9cf8b80ULL, 0x37d8c6ffab2b2514ULL, },
{ 0xac5aaeaab9cf8b81ULL, 0x27d8c6ffab3b2514ULL, },
{ 0xac5aaeaab9cfcb80ULL, 0x27d8c6ffab2b2514ULL, },
{ 0x704f164d5e31e24fULL, 0x8df188d8a942f2a0ULL, },
{ 0x704f164d5e31e34eULL, 0x9df188d8a942e2a0ULL, },
{ 0x704f164d5e31e24fULL, 0x8df188d8a952e2a0ULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d9a942e2a0ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_D(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_D(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BSET.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BSET.H";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, }, /* 0 */
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0x8000800080008000ULL, 0x8000800080008000ULL, }, /* 8 */
{ 0x0001000100010001ULL, 0x0001000100010001ULL, },
{ 0x0400040004000400ULL, 0x0400040004000400ULL, },
{ 0x0020002000200020ULL, 0x0020002000200020ULL, },
{ 0x1000100010001000ULL, 0x1000100010001000ULL, },
{ 0x0008000800080008ULL, 0x0008000800080008ULL, },
{ 0x4000000801004000ULL, 0x0008010040000008ULL, },
{ 0x0002100000800002ULL, 0x1000008000021000ULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xaaabaaabaaabaaabULL, 0xaaabaaabaaabaaabULL, },
{ 0xaeaaaeaaaeaaaeaaULL, 0xaeaaaeaaaeaaaeaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xbaaabaaabaaabaaaULL, 0xbaaabaaabaaabaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xeaaaaaaaabaaeaaaULL, 0xaaaaabaaeaaaaaaaULL, },
{ 0xaaaabaaaaaaaaaaaULL, 0xbaaaaaaaaaaabaaaULL, },
{ 0xd555d555d555d555ULL, 0xd555d555d555d555ULL, }, /* 24 */
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5575557555755575ULL, 0x5575557555755575ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x555d555d555d555dULL, 0x555d555d555d555dULL, },
{ 0x5555555d55555555ULL, 0x555d55555555555dULL, },
{ 0x5557555555d55557ULL, 0x555555d555575555ULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, }, /* 32 */
{ 0xcccdcccdcccdcccdULL, 0xcccdcccdcccdcccdULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccecccecccecccecULL, 0xccecccecccecccecULL, },
{ 0xdcccdcccdcccdcccULL, 0xdcccdcccdcccdcccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xcccccccccdccccccULL, 0xcccccdccccccccccULL, },
{ 0xcccedcccccccccceULL, 0xdccccccccccedcccULL, },
{ 0xb333b333b333b333ULL, 0xb333b333b333b333ULL, }, /* 40 */
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3733373337333733ULL, 0x3733373337333733ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x333b333b333b333bULL, 0x333b333b333b333bULL, },
{ 0x7333333b33337333ULL, 0x333b33337333333bULL, },
{ 0x3333333333b33333ULL, 0x333333b333333333ULL, },
{ 0xe38eb8e38e38e38eULL, 0xb8e38e38e38eb8e3ULL, }, /* 48 */
{ 0xe38f38e38e39e38fULL, 0x38e38e39e38f38e3ULL, },
{ 0xe78e3ce38e38e78eULL, 0x3ce38e38e78e3ce3ULL, },
{ 0xe3ae38e38e38e3aeULL, 0x38e38e38e3ae38e3ULL, },
{ 0xf38e38e39e38f38eULL, 0x38e39e38f38e38e3ULL, },
{ 0xe38e38eb8e38e38eULL, 0x38eb8e38e38e38ebULL, },
{ 0xe38e38eb8f38e38eULL, 0x38eb8f38e38e38ebULL, },
{ 0xe38e38e38eb8e38eULL, 0x38e38eb8e38e38e3ULL, },
{ 0x9c71c71cf1c79c71ULL, 0xc71cf1c79c71c71cULL, }, /* 56 */
{ 0x1c71c71d71c71c71ULL, 0xc71d71c71c71c71dULL, },
{ 0x1c71c71c75c71c71ULL, 0xc71c75c71c71c71cULL, },
{ 0x1c71c73c71e71c71ULL, 0xc73c71e71c71c73cULL, },
{ 0x1c71d71c71c71c71ULL, 0xd71c71c71c71d71cULL, },
{ 0x1c79c71c71cf1c79ULL, 0xc71c71cf1c79c71cULL, },
{ 0x5c71c71c71c75c71ULL, 0xc71c71c75c71c71cULL, },
{ 0x1c73d71c71c71c73ULL, 0xd71c71c71c73d71cULL, },
{ 0x8c6af6cc28665541ULL, 0x4be74b5efe7bb00cULL, }, /* 64 */
{ 0xc86ae6cc286a5540ULL, 0x4be70f5efe7bb00cULL, },
{ 0x8c6ae6cca8625541ULL, 0x4b678b5efe7bb01cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5efe7fb00dULL, },
{ 0xffbe10634d97c709ULL, 0x12f7fb1a1d3f52fcULL, },
{ 0xfbbe006b4d9bc708ULL, 0x12f7bf1a953f52fcULL, },
{ 0xffbe0463cd93c709ULL, 0x13f7bb1a1d3f52fcULL, },
{ 0xfbbe20634d93c708ULL, 0x12f7bb1a153f52fdULL, },
{ 0xac5abeaab9cf8b81ULL, 0x27d8c6ffab2b3514ULL, }, /* 72 */
{ 0xec5aaeaab9cf8b80ULL, 0x27d8c6ffab2b3514ULL, },
{ 0xac5aaeaab9cf8b81ULL, 0x27d8c6ffab2b2514ULL, },
{ 0xac5aaeaab9cfcb80ULL, 0x27dac7ffab2f2515ULL, },
{ 0x744f164d5e35e24fULL, 0x8df1c8d8a942f2a0ULL, },
{ 0x704f164d5e39e34eULL, 0x8df18cd8a942f2a0ULL, },
{ 0x744f164dde31e24fULL, 0x8df188d8a942e2b0ULL, },
{ 0xf04f364d5e33e24eULL, 0x8df389d8a946e2a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_H(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_H(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction BSET.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
#include <sys/time.h>
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
(RANDOM_INPUTS_SHORT_COUNT) * (RANDOM_INPUTS_SHORT_COUNT))
int32_t main(void)
{
char *instruction_name = "BSET.W";
int32_t ret;
uint32_t i, j;
struct timeval start, end;
double elapsed_time;
uint64_t b128_result[TEST_COUNT_TOTAL][2];
uint64_t b128_expect[TEST_COUNT_TOTAL][2] = {
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, }, /* 0 */
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffffULL, 0xffffffffffffffffULL, },
{ 0x8000000080000000ULL, 0x8000000080000000ULL, }, /* 8 */
{ 0x0000000100000001ULL, 0x0000000100000001ULL, },
{ 0x0000040000000400ULL, 0x0000040000000400ULL, },
{ 0x0020000000200000ULL, 0x0020000000200000ULL, },
{ 0x0000100000001000ULL, 0x0000100000001000ULL, },
{ 0x0008000000080000ULL, 0x0008000000080000ULL, },
{ 0x0000000800004000ULL, 0x0100000000000008ULL, },
{ 0x1000000000020000ULL, 0x0000008010000000ULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, }, /* 16 */
{ 0xaaaaaaabaaaaaaabULL, 0xaaaaaaabaaaaaaabULL, },
{ 0xaaaaaeaaaaaaaeaaULL, 0xaaaaaeaaaaaaaeaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaabaaaaaaabaaaULL, 0xaaaabaaaaaaabaaaULL, },
{ 0xaaaaaaaaaaaaaaaaULL, 0xaaaaaaaaaaaaaaaaULL, },
{ 0xaaaaaaaaaaaaeaaaULL, 0xabaaaaaaaaaaaaaaULL, },
{ 0xbaaaaaaaaaaaaaaaULL, 0xaaaaaaaabaaaaaaaULL, },
{ 0xd5555555d5555555ULL, 0xd5555555d5555555ULL, }, /* 24 */
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x5575555555755555ULL, 0x5575555555755555ULL, },
{ 0x5555555555555555ULL, 0x5555555555555555ULL, },
{ 0x555d5555555d5555ULL, 0x555d5555555d5555ULL, },
{ 0x5555555d55555555ULL, 0x555555555555555dULL, },
{ 0x5555555555575555ULL, 0x555555d555555555ULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, }, /* 32 */
{ 0xcccccccdcccccccdULL, 0xcccccccdcccccccdULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccecccccccecccccULL, 0xccecccccccecccccULL, },
{ 0xccccdcccccccdcccULL, 0xccccdcccccccdcccULL, },
{ 0xccccccccccccccccULL, 0xccccccccccccccccULL, },
{ 0xccccccccccccccccULL, 0xcdccccccccccccccULL, },
{ 0xdcccccccccceccccULL, 0xccccccccdcccccccULL, },
{ 0xb3333333b3333333ULL, 0xb3333333b3333333ULL, }, /* 40 */
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333373333333733ULL, 0x3333373333333733ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x3333333333333333ULL, 0x3333333333333333ULL, },
{ 0x333b3333333b3333ULL, 0x333b3333333b3333ULL, },
{ 0x3333333b33337333ULL, 0x333333333333333bULL, },
{ 0x3333333333333333ULL, 0x333333b333333333ULL, },
{ 0xe38e38e38e38e38eULL, 0xb8e38e38e38e38e3ULL, }, /* 48 */
{ 0xe38e38e38e38e38fULL, 0x38e38e39e38e38e3ULL, },
{ 0xe38e3ce38e38e78eULL, 0x38e38e38e38e3ce3ULL, },
{ 0xe3ae38e38e38e38eULL, 0x38e38e38e3ae38e3ULL, },
{ 0xe38e38e38e38f38eULL, 0x38e39e38e38e38e3ULL, },
{ 0xe38e38e38e38e38eULL, 0x38eb8e38e38e38e3ULL, },
{ 0xe38e38eb8e38e38eULL, 0x39e38e38e38e38ebULL, },
{ 0xf38e38e38e3ae38eULL, 0x38e38eb8f38e38e3ULL, },
{ 0x9c71c71cf1c71c71ULL, 0xc71c71c79c71c71cULL, }, /* 56 */
{ 0x1c71c71d71c71c71ULL, 0xc71c71c71c71c71dULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c75c71c71c71cULL, },
{ 0x1c71c71c71e71c71ULL, 0xc73c71c71c71c71cULL, },
{ 0x1c71d71c71c71c71ULL, 0xc71c71c71c71d71cULL, },
{ 0x1c79c71c71cf1c71ULL, 0xc71c71c71c79c71cULL, },
{ 0x1c71c71c71c75c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x1c71c71c71c71c71ULL, 0xc71c71c71c71c71cULL, },
{ 0x886af6cc28625541ULL, 0x4b670b5efe7bb00cULL, }, /* 64 */
{ 0x886ae6cc28625540ULL, 0x4f670b5efe7bb00cULL, },
{ 0x886ae6cc28625541ULL, 0xcb670b5efe7bb00cULL, },
{ 0x886ae6cc28625540ULL, 0x4b670b5efe7bb00dULL, },
{ 0xfbbe10634d93c709ULL, 0x52f7bb1a153f52fcULL, },
{ 0xfbbe006b4d93c708ULL, 0x16f7bb1a153f52fcULL, },
{ 0xfbbe04634d93c709ULL, 0x92f7bb1a153f52fcULL, },
{ 0xfbbe20634d93c708ULL, 0x13f7bb1a153f52fdULL, },
{ 0xac5abeaab9cf8b81ULL, 0x67d8c6ffab2b3514ULL, }, /* 72 */
{ 0xac5aaeaab9cf8b80ULL, 0x27d8c6ffbb2b2514ULL, },
{ 0xac5aaeaab9cf8b81ULL, 0xa7d8c6ffab3b2514ULL, },
{ 0xac5aaeaab9cfcb80ULL, 0x27d8c6ffab2b2515ULL, },
{ 0x704f164d5e31e24fULL, 0xcdf188d8a942f2a0ULL, },
{ 0x704f164d5e31e34eULL, 0x8df188d8b942e2a0ULL, },
{ 0x704f164d5e31e24fULL, 0x8df188d8a952e2a0ULL, },
{ 0x704f364d5e31e24eULL, 0x8df188d8a942e2a1ULL, },
};
gettimeofday(&start, NULL);
for (i = 0; i < PATTERN_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < PATTERN_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_W(b128_pattern[i], b128_pattern[j],
b128_result[PATTERN_INPUTS_SHORT_COUNT * i + j]);
}
}
for (i = 0; i < RANDOM_INPUTS_SHORT_COUNT; i++) {
for (j = 0; j < RANDOM_INPUTS_SHORT_COUNT; j++) {
do_msa_BSET_W(b128_random[i], b128_random[j],
b128_result[((PATTERN_INPUTS_SHORT_COUNT) *
(PATTERN_INPUTS_SHORT_COUNT)) +
RANDOM_INPUTS_SHORT_COUNT * i + j]);
}
}
gettimeofday(&end, NULL);
elapsed_time = (end.tv_sec - start.tv_sec) * 1000.0;
elapsed_time += (end.tv_usec - start.tv_usec) / 1000.0;
ret = check_results(instruction_name, TEST_COUNT_TOTAL, elapsed_time,
&b128_result[0][0], &b128_expect[0][0]);
return ret;
}
/*
* Test program for MSA instruction ADD_A.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xc4a968a3a56293ceULL, 0x9a37b229ac6d4374ULL, },
{ 0xe8b930818693738eULL, 0xbe76838659bd6e6cULL, },
{ 0x759116b0ab9e5756ULL, 0x8518bd426c817064ULL, },
{ 0xc4a968a3a56293ceULL, 0x9a37b229ac6d4374ULL, },
{ 0xe09e2c9abc623c9cULL, 0xe61ef050ae843cc0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADD_A.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xc3f467a2a46256ceULL, 0x99e73e2701e84274ULL, },
{ 0xe7e42f8135cf8d0eULL, 0xbd7582865538cd6cULL, },
{ 0x749115ea109e1b46ULL, 0x850632416bfc705cULL, },
{ 0xc3f467a2a46256ceULL, 0x99e73e2701e84274ULL, },
{ 0xe09e2c9abc63c49cULL, 0xe41cee4ead7a3ac0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADD_A.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xc3f567a3a4629232ULL, 0x99e7b029ab934274ULL, },
{ 0xe7e52f81869372f2ULL, 0xbd76828658436d54ULL, },
{ 0x749116b0abc456aaULL, 0x8506bc0e6bfd705cULL, },
{ 0xc3f567a3a4629232ULL, 0x99e7b029ab934274ULL, },
{ 0xe09e2c9abc623b64ULL, 0xe41eee50ad7c3ac0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADD_A.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xc3f467a3a46256ceULL, 0x99e73e27ab91f84cULL, },
{ 0xe7e42f818694378eULL, 0xbd75828658416d54ULL, },
{ 0x749115eaabc5a956ULL, 0x850632426bfc705cULL, },
{ 0xc3f467a3a46256ceULL, 0x99e73e27ab91f84cULL, },
{ 0xe09e2c9abc63c49cULL, 0xe41cee50ad7a3ac0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_A.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x7f7f687f7f627f7fULL, 0x7f377f297f6d4374ULL, },
{ 0x7f7f307f7f7f737fULL, 0x7f767f7f597f6e6cULL, },
{ 0x757f167f7f7f5756ULL, 0x7f187f426c7f7064ULL, },
{ 0x7f7f687f7f627f7fULL, 0x7f377f297f6d4374ULL, },
{ 0x7f7f2c7f7f623c7fULL, 0x7f1e7f507f7f3c7fULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_A.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
{ 0x749115ea109e1b46ULL, 0x7fffffffffffffffULL, },
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
{ 0x7fffffffffffffffULL, 0x7fffffffffffffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_A.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x7fff67a37fff7fffULL, 0x7fff7fff7fff4274ULL, },
{ 0x7fff2f817fff72f2ULL, 0x7fff7fff58436d54ULL, },
{ 0x749116b07fff56aaULL, 0x7fff7fff6bfd705cULL, },
{ 0x7fff67a37fff7fffULL, 0x7fff7fff7fff4274ULL, },
{ 0x7fff2c9a7fff3b64ULL, 0x7fff7fff7fff3ac0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_A.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
{ 0x7fffffff7fffffffULL, 0x7fffffff58416d54ULL, },
{ 0x749115ea7fffffffULL, 0x7fffffff6bfc705cULL, },
{ 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
{ 0x7fffffff7fffffffULL, 0x7fffffff7fffffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_S.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1c7fc4f7170080ceULL, 0xb4c980d7806d07b4ULL, },
{ 0xf87ffc197f7f377fULL, 0xd8589336a77f92acULL, },
{ 0x6b0d167f7fc4a956ULL, 0x9fe880f2be7f349cULL, },
{ 0x1c7fc4f7170080ceULL, 0xb4c980d7806d07b4ULL, },
{ 0x7f7f2c7f7f62c47fULL, 0x80e280b0807fc480ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_S.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f818016dceULL, 0xb5ca4fd8546e07b4ULL, },
{ 0xf8b9fd198694378eULL, 0xd9589437a7be92acULL, },
{ 0x6c0d16b0abc5a956ULL, 0xa0e943f2be82359cULL, },
{ 0x1ca9c4f818016dceULL, 0xb5ca4fd8546e07b4ULL, },
{ 0x7fffffffffffffffULL, 0x8000000000000000ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_S.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f718008000ULL, 0xb5c98000800007b4ULL, },
{ 0xf8b9fd197fff378eULL, 0xd9589436a7bd92acULL, },
{ 0x6c0d16b07fffa956ULL, 0xa0e88000be81359cULL, },
{ 0x1ca9c4f718008000ULL, 0xb5c98000800007b4ULL, },
{ 0x7fff2c9a7fffc49cULL, 0x800080008000c540ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_S.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f718016dceULL, 0xb5ca4fd780000000ULL, },
{ 0xf8b9fd197fffffffULL, 0xd9589436a7be92acULL, },
{ 0x6c0d16b07fffffffULL, 0xa0e943f2be82359cULL, },
{ 0x1ca9c4f718016dceULL, 0xb5ca4fd780000000ULL, },
{ 0x7fffffff7fffffffULL, 0x8000000080000000ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_U.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xffa9c4f7ffffffceULL, 0xb4ffffffff6dffb4ULL, },
{ 0xf8b9fcff8693ff8eULL, 0xd8ff93ffffbdffacULL, },
{ 0xffff16b0abc4ff56ULL, 0x9ffffff2be81ffffULL, },
{ 0xffa9c4f7ffffffceULL, 0xb4ffffffff6dffb4ULL, },
{ 0xe09e2c9abc62ff9cULL, 0xffffffffff84ffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_U.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xffffffffffffffffULL, 0xb5ca4fd8546e07b4ULL, },
{ 0xf8b9fd198694378eULL, 0xd9589437a7be92acULL, },
{ 0xffffffffffffffffULL, 0xa0e943f2be82359cULL, },
{ 0xffffffffffffffffULL, 0xb5ca4fd8546e07b4ULL, },
{ 0xe09e2c9abc63c49cULL, 0xffffffffffffffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_U.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xffffc4f7ffffffffULL, 0xb5c9ffffffffffffULL, },
{ 0xf8b9fd198693ffffULL, 0xd9589436ffffffffULL, },
{ 0xffff16b0abc4ffffULL, 0xa0e8ffffbe81ffffULL, },
{ 0xffffc4f7ffffffffULL, 0xb5c9ffffffffffffULL, },
{ 0xe09e2c9abc62ffffULL, 0xffffffffffffffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDS_U.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xffffffffffffffffULL, 0xb5ca4fd7ffffffffULL, },
{ 0xf8b9fd198694378eULL, 0xd9589436ffffffffULL, },
{ 0xffffffffabc5a956ULL, 0xa0e943f2be82359cULL, },
{ 0xffffffffffffffffULL, 0xb5ca4fd7ffffffffULL, },
{ 0xe09e2c9abc63c49cULL, 0xffffffffffffffffULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDV.B
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f717006dceULL, 0xb4c94ed7546d07b4ULL, },
{ 0xf8b9fc198693378eULL, 0xd8589336a7bd92acULL, },
{ 0x6b0d16b0abc4a956ULL, 0x9fe843f2be81349cULL, },
{ 0x1ca9c4f717006dceULL, 0xb4c94ed7546d07b4ULL, },
{ 0xe09e2c9abc62c49cULL, 0x1ae210b05284c440ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDV.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f818016dceULL, 0xb5ca4fd8546e07b4ULL, },
{ 0xf8b9fd198694378eULL, 0xd9589437a7be92acULL, },
{ 0x6c0d16b0abc5a956ULL, 0xa0e943f2be82359cULL, },
{ 0x1ca9c4f818016dceULL, 0xb5ca4fd8546e07b4ULL, },
{ 0xe09e2c9abc63c49cULL, 0x1be311b15285c540ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDV.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f718006dceULL, 0xb5c94fd7546d07b4ULL, },
{ 0xf8b9fd198693378eULL, 0xd9589436a7bd92acULL, },
{ 0x6c0d16b0abc4a956ULL, 0xa0e843f2be81359cULL, },
{ 0x1ca9c4f718006dceULL, 0xb5c94fd7546d07b4ULL, },
{ 0xe09e2c9abc62c49cULL, 0x1be211b05284c540ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction ADDV.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x1ca9c4f718016dceULL, 0xb5ca4fd7546e07b4ULL, },
{ 0xf8b9fd198694378eULL, 0xd9589436a7be92acULL, },
{ 0x6c0d16b0abc5a956ULL, 0xa0e943f2be82359cULL, },
{ 0x1ca9c4f718016dceULL, 0xb5ca4fd7546e07b4ULL, },
{ 0xe09e2c9abc63c49cULL, 0x1be311b05285c540ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_S.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x000000000a8c90f8ULL, 0xffffffffd11ba99fULL, },
{ 0x0000000098b16b8dULL, 0xffffffff8c6d38e4ULL, },
{ 0x00000000bde2dd55ULL, 0xffffffffa330dbd4ULL, },
{ 0x000000002a1ea1cdULL, 0xffffffff391cadecULL, },
{ 0x00000000ce80f89bULL, 0xffffffff37346b78ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_S.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xfffbfffbffeaffd9ULL, 0x0018ff9effedffc5ULL, },
{ 0x00daffe200c00022ULL, 0xfff4ffe60024ffeeULL, },
{ 0x002e0079fff1ffeaULL, 0xff84ffa2ffe8ffdeULL, },
{ 0x00caffc0002dff62ULL, 0xff65ff87ffd4fff6ULL, },
{ 0x00bf0063008f0030ULL, 0xff7eff60ffebff82ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_S.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xffffc2a7ffff9c1dULL, 0xffffb0b0ffff8dcbULL, },
{ 0x0000571b0000b371ULL, 0xffff994fffff594eULL, },
{ 0x000070b200002539ULL, 0xffff490bfffffc3eULL, },
{ 0x00001ef9ffffe9b1ULL, 0xffff54f0ffffce56ULL, },
{ 0x0000869c0000407fULL, 0xffff16c9ffff8be2ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_U.D
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x000000010a8c90f8ULL, 0x00000000d11ba99fULL, },
{ 0x0000000098b16b8dULL, 0x000000018c6d38e4ULL, },
{ 0x00000000bde2dd55ULL, 0x00000000a330dbd4ULL, },
{ 0x000000012a1ea1cdULL, 0x00000001391cadecULL, },
{ 0x00000000ce80f89bULL, 0x0000000137346b78ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_U.H
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x00fb00fb00ea00d9ULL, 0x0118019e00ed00c5ULL, },
{ 0x00da00e200c00122ULL, 0x00f400e6012400eeULL, },
{ 0x012e007900f100eaULL, 0x018400a200e801deULL, },
{ 0x00ca00c0012d0162ULL, 0x0165018700d400f6ULL, },
{ 0x00bf0063008f0130ULL, 0x017e016000eb0182ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction HADD_U.W
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000c2a700019c1dULL, 0x0000b0b000018dcbULL, },
{ 0x0001571b0000b371ULL, 0x0000994f0001594eULL, },
{ 0x000070b200012539ULL, 0x0001490b0000fc3eULL, },
{ 0x00011ef90000e9b1ULL, 0x000154f00000ce56ULL, },
{ 0x0000869c0001407fULL, 0x000116c900018be2ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_S.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e2fb0b00b6e7ULL, 0xdae4a7ebaa3603daULL, },
{ 0xfc5cfe0c43491b47ULL, 0xec2cc91bd35ec9d6ULL, },
{ 0x35060b5855e2d42bULL, 0xcff4a1f9df401aceULL, },
{ 0x0e54e2fb0b00b6e7ULL, 0xdae4a7ebaa3603daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_S.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
{ 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
{ 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_S.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e27b0c00b6e7ULL, 0xdae4a7ebaa3603daULL, },
{ 0xfc5cfe8c43491bc7ULL, 0xecacca1bd3dec956ULL, },
{ 0x36060b5855e2d4abULL, 0xd074a1f9df401aceULL, },
{ 0x0e54e27b0c00b6e7ULL, 0xdae4a7ebaa3603daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_S.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e27b0c00b6e7ULL, 0xdae527ebaa3703daULL, },
{ 0xfc5cfe8c434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
{ 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
{ 0x0e54e27b0c00b6e7ULL, 0xdae527ebaa3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_U.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54627b8b80b667ULL, 0x5ae4a7ebaa36835aULL, },
{ 0x7c5c7e8c43499b47ULL, 0x6cac499bd35ec956ULL, },
{ 0xb5860b585562d42bULL, 0x4ff4a1795f409aceULL, },
{ 0x8e54627b8b80b667ULL, 0x5ae4a7ebaa36835aULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_U.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
{ 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
{ 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
{ 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_U.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54627b8c00b6e7ULL, 0x5ae4a7ebaa3683daULL, },
{ 0x7c5c7e8c43499bc7ULL, 0x6cac4a1bd3dec956ULL, },
{ 0xb6060b5855e2d4abULL, 0x5074a1f95f409aceULL, },
{ 0x8e54627b8c00b6e7ULL, 0x5ae4a7ebaa3683daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVE_U.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54e27b8c00b6e7ULL, 0x5ae527ebaa3703daULL, },
{ 0x7c5cfe8c434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
{ 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
{ 0x8e54e27b8c00b6e7ULL, 0x5ae527ebaa3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_S.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e55e2fc0c00b7e7ULL, 0xdae5a7ecaa3704daULL, },
{ 0xfc5dfe0d434a1c47ULL, 0xec2cca1bd45fc9d6ULL, },
{ 0x36070b5856e2d52bULL, 0xd0f4a2f9df411aceULL, },
{ 0x0e55e2fc0c00b7e7ULL, 0xdae5a7ecaa3704daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_S.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
{ 0xfc5cfe8cc34a1bc7ULL, 0xecac4a1bd3df4956ULL, },
{ 0x36068b5855e2d4abULL, 0xd074a1f95f411aceULL, },
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ec2a3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_S.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e55e27c0c00b6e7ULL, 0xdae5a7ecaa3703daULL, },
{ 0xfc5dfe8d434a1bc7ULL, 0xecacca1bd3dfc956ULL, },
{ 0x36070b5855e2d4abULL, 0xd074a1f9df411aceULL, },
{ 0x0e55e27c0c00b6e7ULL, 0xdae5a7ecaa3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_S.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ecaa3703daULL, },
{ 0xfc5cfe8d434a1bc7ULL, 0xecac4a1bd3df4956ULL, },
{ 0x36068b5855e2d4abULL, 0xd074a1f9df411aceULL, },
{ 0x0e54e27c0c00b6e7ULL, 0xdae527ecaa3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_U.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e55627c8c80b767ULL, 0x5ae5a7ecaa37845aULL, },
{ 0x7c5d7e8d434a9c47ULL, 0x6cac4a9bd45fc956ULL, },
{ 0xb6870b585662d52bULL, 0x50f4a2795f419aceULL, },
{ 0x8e55627c8c80b767ULL, 0x5ae5a7ecaa37845aULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_U.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
{ 0x7c5cfe8cc34a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
{ 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
{ 0x8e54e27c0c00b6e7ULL, 0x5ae527ec2a3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_U.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e55627c8c00b6e7ULL, 0x5ae5a7ecaa3783daULL, },
{ 0x7c5d7e8d434a9bc7ULL, 0x6cac4a1bd3dfc956ULL, },
{ 0xb6070b5855e2d4abULL, 0x5074a1f95f419aceULL, },
{ 0x8e55627c8c00b6e7ULL, 0x5ae5a7ecaa3783daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction AVER_U.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8e54e27c8c00b6e7ULL, 0x5ae527ecaa3703daULL, },
{ 0x7c5cfe8d434a1bc7ULL, 0x6cac4a1bd3df4956ULL, },
{ 0xb6068b5855e2d4abULL, 0x5074a1f95f411aceULL, },
{ 0x8e54e27c8c00b6e7ULL, 0x5ae527ecaa3703daULL, },
{ 0x704f164d5e31e24eULL, 0x8df188d8a942e2a0ULL, },
};
gettimeofday(&start, NULL);
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
/*
* Test program for MSA instruction DIV_S.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0001fdff00ff03ffULL, 0x000200000000ff00ULL, },
{ 0x000000ff02000001ULL, 0xff00f6002b0000f8ULL, },
{ 0xeaffff0001000009ULL, 0xfa0101fffc010018ULL, },
{ 0xff000000ffff0000ULL, 0xfe000228010100fcULL, },
{ 0x0101010101010101ULL, 0x0101010101010101ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_S.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0xffffffffffffffffULL, },
{ 0xffffffffffffffe6ULL, 0xfffffffffffffffaULL, },
{ 0xffffffffffffffffULL, 0xfffffffffffffffeULL, },
{ 0x0000000000000001ULL, 0x0000000000000001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_S.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000fffd00000003ULL, 0x000000000000ffffULL, },
{ 0x0000000000020000ULL, 0xfffffff600390000ULL, },
{ 0xffe6003900010000ULL, 0xfffa0001fffc0000ULL, },
{ 0xffff0000ffff0000ULL, 0xfffe000200010000ULL, },
{ 0x0001000100010001ULL, 0x0001000100010001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_S.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000000000000000ULL, 0x0000000000000000ULL, },
{ 0x0000000000000002ULL, 0xffffffff00000039ULL, },
{ 0xffffffe600000001ULL, 0xfffffffafffffffcULL, },
{ 0xffffffffffffffffULL, 0xfffffffe00000001ULL, },
{ 0x0000000100000001ULL, 0x0000000100000001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_U.B
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0101070201040001ULL, 0x0000010101000000ULL, },
{ 0x0000000002000201ULL, 0x01020c020000010dULL, },
{ 0x0000ff0001000109ULL, 0x0700000808010200ULL, },
{ 0x0000000000000100ULL, 0x0301000000010608ULL, },
{ 0x0101010101010101ULL, 0x0101010101010101ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_U.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000000000000001ULL, 0x0000000000000000ULL, },
{ 0x0000000000000000ULL, 0x0000000000000001ULL, },
{ 0x0000000000000000ULL, 0x0000000000000007ULL, },
{ 0x0000000000000000ULL, 0x0000000000000003ULL, },
{ 0x0000000000000001ULL, 0x0000000000000001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_U.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0001000700010000ULL, 0x0000000100010000ULL, },
{ 0x0000000000020002ULL, 0x0001000c00000001ULL, },
{ 0x0000003900010001ULL, 0x0007000000070002ULL, },
{ 0x0000000000000001ULL, 0x0003000000000006ULL, },
{ 0x0001000100010001ULL, 0x0001000100010001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DIV_U.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x0000000100000001ULL, 0x0000000000000001ULL, },
{ 0x0000000000000002ULL, 0x0000000100000000ULL, },
{ 0x0000000000000001ULL, 0x0000000700000007ULL, },
{ 0x0000000000000000ULL, 0x0000000300000000ULL, },
{ 0x0000000100000001ULL, 0x0000000100000001ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_S.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xc17a5d0372a2a622ULL, 0x0afd6368668933a8ULL, },
{ 0xda65cd5e9f696cdcULL, 0xdeeb6bec644a26d0ULL, },
{ 0x1aad30609bff5437ULL, 0xf059a43d01b40370ULL, },
{ 0xc17a5d0372a2a622ULL, 0x0afd6368668933a8ULL, },
{ 0x53edf7dbd76122edULL, 0x50347e61c2f51a40ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_S.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xf706df16dc8de6b6ULL, 0xf0d31b5827f9f42aULL, },
{ 0xec36ee202172098aULL, 0xd846ec28206404e0ULL, },
{ 0xe9721dc70769091eULL, 0xf8711c48091bf7e4ULL, },
{ 0xf706df16dc8de6b6ULL, 0xf0d31b5827f9f42aULL, },
{ 0x4961190d2be51b48ULL, 0x348a3e802e952784ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_S.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0xd437b4e8f3b0139fULL, 0x08c7d980187d5896ULL, },
{ 0xc9576c1204f83042ULL, 0xd91d3e4709b06e36ULL, },
{ 0xfe2a6f6923268793ULL, 0x179e9377ef4766beULL, },
{ 0xd437b4e8f3b0139fULL, 0x08c7d980187d5896ULL, },
{ 0x33368b8a2619d525ULL, 0x6a47932120c31904ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_U.D
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x8ffb559e72a2a622ULL, 0x8744321b668933a8ULL, },
{ 0x4ab4e3ab9f696cdcULL, 0xd21109f6644a26d0ULL, },
{ 0x8afc46ad9bff5437ULL, 0x1890b25301b40370ULL, },
{ 0x8ffb559e72a2a622ULL, 0x8744321b668933a8ULL, },
{ 0x53edf7dbd76122edULL, 0xbe9d5551c2f51a40ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_U.H
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x670642166b8da1b6ULL, 0xe0d340587bf92d2aULL, },
{ 0x5c36512021725e8aULL, 0x8a465528c764a2e0ULL, },
{ 0xa8721dc73869b21eULL, 0xf27179481e1be5e4ULL, },
{ 0x670642166b8da1b6ULL, 0xe0d340587bf92d2aULL, },
{ 0x4961190d2be5df48ULL, 0x308afe8080952b84ULL, },
};
gettimeofday(&start, NULL);
......
/*
* Test program for MSA instruction DOTP_U.W
*
* Copyright (C) 2018 Wave Computing, Inc.
* Copyright (C) 2018 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -23,8 +25,8 @@
#include <stdint.h>
#include "../../../../include/wrappers_msa.h"
#include "../../../../include/test_inputs.h"
#include "../../../../include/test_utils.h"
#include "../../../../include/test_inputs_128.h"
#include "../../../../include/test_utils_128.h"
#define TEST_COUNT_TOTAL ( \
(PATTERN_INPUTS_SHORT_COUNT) * (PATTERN_INPUTS_SHORT_COUNT) + \
......@@ -119,6 +121,8 @@ int32_t main(void)
{ 0x5ad3b4e8bfaf139fULL, 0x8076d98091fe5896ULL, },
{ 0x4ff36c125a383042ULL, 0x2fe23e4744196e36ULL, },
{ 0x6e796f69cc7c8793ULL, 0x6e879377578266beULL, },
{ 0x5ad3b4e8bfaf139fULL, 0x8076d98091fe5896ULL, },
{ 0x33368b8aeab5d525ULL, 0x97d9932138871904ULL, },
};
gettimeofday(&start, NULL);
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
......@@ -3,6 +3,8 @@
*
* Copyright (C) 2019 Wave Computing, Inc.
* Copyright (C) 2019 Aleksandar Markovic <amarkovic@wavecomp.com>
* Copyright (C) 2019 RT-RK Computer Based Systems LLC
* Copyright (C) 2019 Mateja Marjanovic <mateja.marjanovic@rt-rk.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册