]> Git Repo - qemu.git/commitdiff
target-arm: Add register_cp_regs_for_features()
authorPeter Maydell <[email protected]>
Wed, 20 Jun 2012 11:57:09 +0000 (11:57 +0000)
committerPeter Maydell <[email protected]>
Wed, 20 Jun 2012 12:02:54 +0000 (12:02 +0000)
Add new function register_cp_regs_for_features() as a place to
register coprocessor registers dependent on feature flags.

Signed-off-by: Peter Maydell <[email protected]>
target-arm/cpu-qom.h
target-arm/cpu.c
target-arm/helper.c

index 848ac2ffdf1d929e460561f9098add59c0fc2e76..4ccfc897c28fc8d801b0caf10a64a57e5ca73f7d 100644 (file)
@@ -107,5 +107,6 @@ static inline ARMCPU *arm_env_get_cpu(CPUARMState *env)
 #define ENV_GET_CPU(e) CPU(arm_env_get_cpu(e))
 
 void arm_cpu_realize(ARMCPU *cpu);
+void register_cp_regs_for_features(ARMCPU *cpu);
 
 #endif
index 6456a3dfa80cb18704540c8b670df7640b547a75..1aff266b6b83ecc761eba24c7fc99edc93de32eb 100644 (file)
@@ -216,6 +216,8 @@ void arm_cpu_realize(ARMCPU *cpu)
     if (arm_feature(env, ARM_FEATURE_VFP3)) {
         set_feature(env, ARM_FEATURE_VFP);
     }
+
+    register_cp_regs_for_features(cpu);
 }
 
 /* CPU models */
index 57bb78b7bd651fadb53d032ac77f2d79eaf82452..f7c9a3a1e8d4d2ff3baa73d41fba55a03fcaa124 100644 (file)
@@ -56,6 +56,17 @@ static int vfp_gdb_set_reg(CPUARMState *env, uint8_t *buf, int reg)
     return 0;
 }
 
+void register_cp_regs_for_features(ARMCPU *cpu)
+{
+    /* Register all the coprocessor registers based on feature bits */
+    CPUARMState *env = &cpu->env;
+    if (arm_feature(env, ARM_FEATURE_M)) {
+        /* M profile has no coprocessor registers */
+        return;
+    }
+
+}
+
 ARMCPU *cpu_arm_init(const char *cpu_model)
 {
     ARMCPU *cpu;
This page took 0.035646 seconds and 4 git commands to generate.