forked from len0rd/rockbox
Removed msvc-style x86 inline asm. Now the iriver win32 sim builds again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7713 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b12df7eaff
commit
2f4327f760
1 changed files with 1 additions and 92 deletions
|
@ -59,98 +59,7 @@ typedef int32_t real_t;
|
|||
#define Q2_PRECISION (1 << Q2_BITS)
|
||||
#define Q2_CONST(A) (((A) >= 0) ? ((real_t)((A)*(Q2_PRECISION)+0.5)) : ((real_t)((A)*(Q2_PRECISION)-0.5)))
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN32_WCE)
|
||||
|
||||
/* multiply with real shift */
|
||||
static INLINE real_t MUL_R(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,REAL_BITS
|
||||
}
|
||||
}
|
||||
|
||||
/* multiply with coef shift */
|
||||
static INLINE real_t MUL_C(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,COEF_BITS
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE real_t MUL_Q2(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,Q2_BITS
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE real_t MUL_SHIFT6(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,6
|
||||
}
|
||||
}
|
||||
|
||||
static INLINE real_t MUL_SHIFT23(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,23
|
||||
}
|
||||
}
|
||||
|
||||
#if 1
|
||||
static INLINE real_t _MulHigh(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
mov eax,edx
|
||||
}
|
||||
}
|
||||
|
||||
/* multiply with fractional shift */
|
||||
static INLINE real_t MUL_F(real_t A, real_t B)
|
||||
{
|
||||
return _MulHigh(A,B) << (FRAC_SIZE-FRAC_BITS);
|
||||
}
|
||||
|
||||
/* Complex multiplication */
|
||||
static INLINE void ComplexMult(real_t *y1, real_t *y2,
|
||||
real_t x1, real_t x2, real_t c1, real_t c2)
|
||||
{
|
||||
*y1 = (_MulHigh(x1, c1) + _MulHigh(x2, c2))<<(FRAC_SIZE-FRAC_BITS);
|
||||
*y2 = (_MulHigh(x2, c1) - _MulHigh(x1, c2))<<(FRAC_SIZE-FRAC_BITS);
|
||||
}
|
||||
#else
|
||||
static INLINE real_t MUL_F(real_t A, real_t B)
|
||||
{
|
||||
_asm {
|
||||
mov eax,A
|
||||
imul B
|
||||
shrd eax,edx,FRAC_BITS
|
||||
}
|
||||
}
|
||||
|
||||
/* Complex multiplication */
|
||||
static INLINE void ComplexMult(real_t *y1, real_t *y2,
|
||||
real_t x1, real_t x2, real_t c1, real_t c2)
|
||||
{
|
||||
*y1 = MUL_F(x1, c1) + MUL_F(x2, c2);
|
||||
*y2 = MUL_F(x2, c1) - MUL_F(x1, c2);
|
||||
}
|
||||
#endif
|
||||
|
||||
#elif defined(__GNUC__) && defined (__arm__)
|
||||
#if defined(__GNUC__) && defined (__arm__)
|
||||
|
||||
/* taken from MAD */
|
||||
#define arm_mul(x, y, SCALEBITS) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue