mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ARMv7 support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3572 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
ee4e83ed8d
commit
9ee6e8bb85
35 changed files with 11799 additions and 653 deletions
106
target-arm/op_addsub.h
Normal file
106
target-arm/op_addsub.h
Normal file
|
@ -0,0 +1,106 @@
|
|||
/*
|
||||
* ARMv6 integer SIMD operations.
|
||||
*
|
||||
* Copyright (c) 2007 CodeSourcery.
|
||||
* Written by Paul Brook
|
||||
*
|
||||
* This code is licenced under the GPL.
|
||||
*/
|
||||
|
||||
#ifdef ARITH_GE
|
||||
#define DECLARE_GE uint32_t ge = 0
|
||||
#define SET_GE env->GE = ge
|
||||
#else
|
||||
#define DECLARE_GE do{}while(0)
|
||||
#define SET_GE do{}while(0)
|
||||
#endif
|
||||
|
||||
#define RESULT(val, n, width) \
|
||||
res |= ((uint32_t)(glue(glue(uint,width),_t))(val)) << (n * width)
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),add16_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
ADD16(T0, T1, 0);
|
||||
ADD16(T0 >> 16, T1 >> 16, 1);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),add8_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
ADD8(T0, T1, 0);
|
||||
ADD8(T0 >> 8, T1 >> 8, 1);
|
||||
ADD8(T0 >> 16, T1 >> 16, 2);
|
||||
ADD8(T0 >> 24, T1 >> 24, 3);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),sub16_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
SUB16(T0, T1, 0);
|
||||
SUB16(T0 >> 16, T1 >> 16, 1);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),sub8_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
SUB8(T0, T1, 0);
|
||||
SUB8(T0 >> 8, T1 >> 8, 1);
|
||||
SUB8(T0 >> 16, T1 >> 16, 2);
|
||||
SUB8(T0 >> 24, T1 >> 24, 3);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),subaddx_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
ADD16(T0, T1, 0);
|
||||
SUB16(T0 >> 16, T1 >> 16, 1);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
void OPPROTO glue(glue(op_,PFX),addsubx_T0_T1)(void)
|
||||
{
|
||||
uint32_t res = 0;
|
||||
DECLARE_GE;
|
||||
|
||||
SUB16(T0, T1, 0);
|
||||
ADD16(T0 >> 16, T1 >> 16, 1);
|
||||
SET_GE;
|
||||
T0 = res;
|
||||
FORCE_RET();
|
||||
}
|
||||
|
||||
#undef DECLARE_GE
|
||||
#undef SET_GE
|
||||
#undef RESULT
|
||||
|
||||
#undef ARITH_GE
|
||||
#undef PFX
|
||||
#undef ADD16
|
||||
#undef SUB16
|
||||
#undef ADD8
|
||||
#undef SUB8
|
Loading…
Add table
Add a link
Reference in a new issue