29#ifndef __ARCH_MIPS_DSP_HH__
30#define __ARCH_MIPS_DSP_HH__
91{ 0x0000003f, 0x00001f80, 0x00002000,
92 0x00ff0000, 0x0f000000, 0x00004000 };
137int32_t
bitrev(int32_t value);
138uint64_t
dspSaturate(uint64_t value, int32_t fmt, int32_t sign,
140uint64_t
checkOverflow(uint64_t value, int32_t fmt, int32_t sign,
142uint64_t
signExtend(uint64_t value, int32_t signpos);
143uint64_t
addHalfLsb(uint64_t value, int32_t lsbpos);
144int32_t
dspAbs(int32_t
a, int32_t fmt, uint32_t *dspctl);
145int32_t
dspAdd(int32_t
a, int32_t
b, int32_t fmt, int32_t saturate,
146 int32_t sign, uint32_t *dspctl);
147int32_t
dspAddh(int32_t
a, int32_t
b, int32_t fmt, int32_t round,
149int32_t
dspSub(int32_t
a, int32_t
b, int32_t fmt, int32_t saturate,
150 int32_t sign, uint32_t *dspctl);
151int32_t
dspSubh(int32_t
a, int32_t
b, int32_t fmt, int32_t round,
153int32_t
dspShll(int32_t
a, uint32_t
sa, int32_t fmt, int32_t saturate,
154 int32_t sign, uint32_t *dspctl);
155int32_t
dspShrl(int32_t
a, uint32_t
sa, int32_t fmt, int32_t sign);
156int32_t
dspShra(int32_t
a, uint32_t
sa, int32_t fmt, int32_t round,
157 int32_t sign, uint32_t *dspctl);
158int32_t
dspMul(int32_t
a, int32_t
b, int32_t fmt, int32_t saturate,
160int32_t
dspMulq(int32_t
a, int32_t
b, int32_t fmt, int32_t saturate,
161 int32_t round, uint32_t *dspctl);
162int32_t
dspMuleu(int32_t
a, int32_t
b, int32_t
mode, uint32_t *dspctl);
163int32_t
dspMuleq(int32_t
a, int32_t
b, int32_t
mode, uint32_t *dspctl);
164int64_t
dspDpaq(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac,
165 int32_t infmt, int32_t outfmt, int32_t postsat, int32_t
mode,
167int64_t
dspDpsq(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac,
168 int32_t infmt, int32_t outfmt, int32_t postsat, int32_t
mode,
170int64_t
dspDpa(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac, int32_t fmt,
171 int32_t sign, int32_t
mode);
172int64_t
dspDps(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac, int32_t fmt,
173 int32_t sign, int32_t
mode);
174int64_t
dspMaq(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac,
175 int32_t fmt, int32_t
mode, int32_t saturate, uint32_t *dspctl);
176int64_t
dspMulsa(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac, int32_t fmt);
177int64_t
dspMulsaq(int64_t dspac, int32_t
a, int32_t
b, int32_t
ac, int32_t fmt,
179void dspCmp(int32_t
a, int32_t
b, int32_t fmt, int32_t sign, int32_t
op,
181int32_t
dspCmpg(int32_t
a, int32_t
b, int32_t fmt, int32_t sign, int32_t
op);
182int32_t
dspCmpgd(int32_t
a, int32_t
b, int32_t fmt, int32_t sign, int32_t
op,
184int32_t
dspPrece(int32_t
a, int32_t infmt, int32_t insign, int32_t outfmt,
185 int32_t outsign, int32_t
mode);
186int32_t
dspPrecrqu(int32_t
a, int32_t
b, uint32_t *dspctl);
187int32_t
dspPrecrq(int32_t
a, int32_t
b, int32_t fmt, uint32_t *dspctl);
190int32_t
dspPick(int32_t
a, int32_t
b, int32_t fmt, uint32_t *dspctl);
191int32_t
dspPack(int32_t
a, int32_t
b, int32_t fmt);
192int32_t
dspExtr(int64_t dspac, int32_t fmt, int32_t
sa, int32_t round,
193 int32_t saturate, uint32_t *dspctl);
194int32_t
dspExtp(int64_t dspac, int32_t size, uint32_t *dspctl);
195int32_t
dspExtpd(int64_t dspac, int32_t size, uint32_t *dspctl);
198void simdPack(uint64_t *values_ptr, int32_t *
reg, int32_t fmt);
199void simdUnpack(int32_t
reg, uint64_t *values_ptr, int32_t fmt, int32_t sign);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
void simdUnpack(int32_t reg, uint64_t *values_ptr, int32_t fmt, int32_t sign)
const uint32_t DSP_CTL_POS[DSP_NUM_FIELDS]
const uint64_t FIXED_SMIN[SIMD_NUM_FMTS]
const uint64_t FIXED_SMAX[SIMD_NUM_FMTS]
const uint64_t FIXED_W_SMAX
const uint64_t FIXED_W_UMIN
const uint32_t SIMD_MAX_VALS
int32_t dspPrecrqu(int32_t a, int32_t b, uint32_t *dspctl)
const uint64_t FIXED_B_SMIN
uint64_t checkOverflow(uint64_t value, int32_t fmt, int32_t sign, uint32_t *overflow)
const uint64_t FIXED_B_UMIN
int32_t dspCmpgd(int32_t a, int32_t b, int32_t fmt, int32_t sign, int32_t op, uint32_t *dspctl)
uint64_t signExtend(uint64_t value, int32_t signpos)
int32_t bitrev(int32_t value)
int64_t dspMulsaq(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t fmt, uint32_t *dspctl)
int32_t dspPack(int32_t a, int32_t b, int32_t fmt)
const uint64_t FIXED_B_SMAX
const uint64_t FIXED_H_SMAX
void simdPack(uint64_t *values_ptr, int32_t *reg, int32_t fmt)
const uint64_t FIXED_L_SMAX
int32_t dspPrece(int32_t a, int32_t infmt, int32_t insign, int32_t outfmt, int32_t outsign, int32_t mode)
int32_t dspAddh(int32_t a, int32_t b, int32_t fmt, int32_t round, int32_t sign)
uint64_t addHalfLsb(uint64_t value, int32_t lsbpos)
int32_t dspSubh(int32_t a, int32_t b, int32_t fmt, int32_t round, int32_t sign)
int64_t dspMulsa(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t fmt)
void writeDSPControl(uint32_t *dspctl, uint32_t value, uint32_t mask)
int64_t dspDps(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t fmt, int32_t sign, int32_t mode)
int32_t dspMuleu(int32_t a, int32_t b, int32_t mode, uint32_t *dspctl)
int32_t dspMul(int32_t a, int32_t b, int32_t fmt, int32_t saturate, uint32_t *dspctl)
int64_t dspDpsq(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t infmt, int32_t outfmt, int32_t postsat, int32_t mode, uint32_t *dspctl)
int32_t dspShra(int32_t a, uint32_t sa, int32_t fmt, int32_t round, int32_t sign, uint32_t *dspctl)
const uint64_t FIXED_H_SMIN
const uint64_t FIXED_H_UMAX
int32_t dspAdd(int32_t a, int32_t b, int32_t fmt, int32_t saturate, int32_t sign, uint32_t *dspctl)
int32_t dspMulq(int32_t a, int32_t b, int32_t fmt, int32_t saturate, int32_t round, uint32_t *dspctl)
const uint32_t SIMD_NBITS[SIMD_NUM_FMTS]
const uint32_t SIMD_NVALS[SIMD_NUM_FMTS]
int32_t dspPick(int32_t a, int32_t b, int32_t fmt, uint32_t *dspctl)
int32_t dspAbs(int32_t a, int32_t fmt, uint32_t *dspctl)
int32_t dspShrl(int32_t a, uint32_t sa, int32_t fmt, int32_t sign)
int32_t dspExtr(int64_t dspac, int32_t fmt, int32_t sa, int32_t round, int32_t saturate, uint32_t *dspctl)
int64_t dspMaq(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t fmt, int32_t mode, int32_t saturate, uint32_t *dspctl)
const uint64_t FIXED_L_UMIN
const uint64_t FIXED_W_UMAX
int32_t dspShll(int32_t a, uint32_t sa, int32_t fmt, int32_t saturate, int32_t sign, uint32_t *dspctl)
const uint64_t FIXED_W_SMIN
int64_t dspDpaq(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t infmt, int32_t outfmt, int32_t postsat, int32_t mode, uint32_t *dspctl)
const uint64_t FIXED_UMIN[SIMD_NUM_FMTS]
int32_t dspCmpg(int32_t a, int32_t b, int32_t fmt, int32_t sign, int32_t op)
const uint64_t FIXED_H_UMIN
const uint64_t FIXED_UMAX[SIMD_NUM_FMTS]
int32_t dspSub(int32_t a, int32_t b, int32_t fmt, int32_t saturate, int32_t sign, uint32_t *dspctl)
const uint64_t FIXED_L_SMIN
int32_t dspExtp(int64_t dspac, int32_t size, uint32_t *dspctl)
const uint64_t FIXED_L_UMAX
const uint32_t DSP_CTL_MASK[DSP_NUM_FIELDS]
uint64_t dspSaturate(uint64_t value, int32_t fmt, int32_t sign, uint32_t *overflow)
int64_t dspDpa(int64_t dspac, int32_t a, int32_t b, int32_t ac, int32_t fmt, int32_t sign, int32_t mode)
int32_t dspMuleq(int32_t a, int32_t b, int32_t mode, uint32_t *dspctl)
int32_t dspPrecrSra(int32_t a, int32_t b, int32_t sa, int32_t fmt, int32_t round)
uint32_t readDSPControl(uint32_t *dspctl, uint32_t mask)
void dspCmp(int32_t a, int32_t b, int32_t fmt, int32_t sign, int32_t op, uint32_t *dspctl)
const uint64_t FIXED_B_UMAX
int32_t dspPrecrq(int32_t a, int32_t b, int32_t fmt, uint32_t *dspctl)
int32_t dspExtpd(int64_t dspac, int32_t size, uint32_t *dspctl)
const uint32_t SIMD_LOG2N[SIMD_NUM_FMTS]
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.