Skip to content

Commit

Permalink
Implement iwMMXt instruction set for the PXA270 cpu.
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2752 c046a42c-6fe2-441c-8c8c-71466251a162
  • Loading branch information
balrog committed Apr 30, 2007
1 parent a171fe3 commit 18c9b56
Show file tree
Hide file tree
Showing 9 changed files with 1,882 additions and 6 deletions.
19 changes: 19 additions & 0 deletions target-arm/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@ typedef struct CPUARMState {
float_status fp_status;
} vfp;

/* iwMMXt coprocessor state. */
struct {
uint64_t regs[16];
uint64_t val;

uint32_t cregs[16];
} iwmmxt;

#if defined(CONFIG_USER_ONLY)
/* For usermode syscall translation. */
int eabi;
Expand Down Expand Up @@ -218,10 +226,21 @@ enum arm_cpu_mode {
#define ARM_VFP_FPINST 9
#define ARM_VFP_FPINST2 10

/* iwMMXt coprocessor control registers. */
#define ARM_IWMMXT_wCID 0
#define ARM_IWMMXT_wCon 1
#define ARM_IWMMXT_wCSSF 2
#define ARM_IWMMXT_wCASF 3
#define ARM_IWMMXT_wCGR0 8
#define ARM_IWMMXT_wCGR1 9
#define ARM_IWMMXT_wCGR2 10
#define ARM_IWMMXT_wCGR3 11

enum arm_features {
ARM_FEATURE_VFP,
ARM_FEATURE_AUXCR, /* ARM1026 Auxiliary control register. */
ARM_FEATURE_XSCALE, /* Intel XScale extensions. */
ARM_FEATURE_IWMMXT /* Intel iwMMXt extension. */
};

static inline int arm_feature(CPUARMState *env, int feature)
Expand Down
2 changes: 2 additions & 0 deletions target-arm/exec.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ register uint32_t T2 asm(AREG3);
#define FT0d env->vfp.tmp0d
#define FT1d env->vfp.tmp1d

#define M0 env->iwmmxt.val

#include "cpu.h"
#include "exec-all.h"

Expand Down
2 changes: 2 additions & 0 deletions target-arm/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id)
case ARM_CPUID_PXA270_C5:
set_feature(env, ARM_FEATURE_XSCALE);
/* JTAG_ID is ((id << 28) | 0x09265013) */
set_feature(env, ARM_FEATURE_IWMMXT);
env->iwmmxt.cregs[ARM_IWMMXT_wCID] = 0x69051000 | 'Q';
env->cp15.c0_cachetype = 0xd172172;
break;
default:
Expand Down
3 changes: 3 additions & 0 deletions target-arm/op.c
Original file line number Diff line number Diff line change
Expand Up @@ -1213,3 +1213,6 @@ void OPPROTO op_movl_T0_T2(void)
{
T0 = T2;
}

/* iwMMXt support */
#include "op_iwmmxt.c"
Loading

0 comments on commit 18c9b56

Please sign in to comment.