]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/qemu-xen.git/commitdiff
target-ppc: Make use of gen_spr_book3s_altivec() for POWER7/8
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 4 Jun 2014 12:50:51 +0000 (22:50 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:44 +0000 (13:24 +0200)
This replaces VRSAVE registration and vscr_init() call with
gen_spr_book3s_altivec() which is generic and does the same thing if
insns_flags has PPC_ALTIVEC bit set (which POWER7/8 have set).

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Tom Musta <tommusta@gmail.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
target-ppc/translate_init.c

index ac8c8c1124e1e6c4a784b16a007f64581f6ea142..3617f5b34b0974fbe0831cd8495adc7015aff6c9 100644 (file)
@@ -7785,6 +7785,7 @@ static void init_proc_POWER7 (CPUPPCState *env)
 {
     gen_spr_ne_601(env);
     gen_spr_7xx(env);
+    gen_spr_book3s_altivec(env);
     /* Time base */
     gen_tbl(env);
 #if !defined(CONFIG_USER_ONLY)
@@ -7808,10 +7809,6 @@ static void init_proc_POWER7 (CPUPPCState *env)
     gen_spr_power6_common(env);
     gen_spr_power6_dbg(env);
     gen_spr_amr(env);
-    spr_register(env, SPR_VRSAVE, "SPR_VRSAVE",
-                 &spr_read_generic, &spr_write_generic,
-                 &spr_read_generic, &spr_write_generic,
-                 0x00000000);
     /* Logical partitionning */
     spr_register_kvm(env, SPR_LPCR, "LPCR",
                      SPR_NOACCESS, SPR_NOACCESS,
@@ -7826,9 +7823,6 @@ static void init_proc_POWER7 (CPUPPCState *env)
 
     /* Allocate hardware IRQ controller */
     ppcPOWER7_irq_init(env);
-    /* Can't find information on what this should be on reset.  This
-     * value is the one used by 74xx processors. */
-    vscr_init(env, 0x00010000);
 }
 
 POWERPC_FAMILY(POWER7)(ObjectClass *oc, void *data)