~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to target-ppc/translate.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-10-22 22:47:07 UTC
  • mfrom: (1.8.3) (10.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20131022224707-1lya34fw3k3f24tv
Tags: 1.6.0+dfsg-2ubuntu1
* Merge 1.6.0~rc0+dfsg-2exp from debian experimental.  Remaining changes:
  - debian/control
    * update maintainer
    * remove libiscsi, usb-redir, vde, vnc-jpeg, and libssh2-1-dev
      from build-deps
    * enable rbd
    * add qemu-system and qemu-common B/R to qemu-keymaps
    * add D:udev, R:qemu, R:qemu-common and B:qemu-common to
      qemu-system-common
    * qemu-system-arm, qemu-system-ppc, qemu-system-sparc:
      - add qemu-kvm to Provides
      - add qemu-common, qemu-kvm, kvm to B/R
      - remove openbios-sparc from qemu-system-sparc D
      - drop openbios-ppc and openhackware Depends to Suggests (for now)
    * qemu-system-x86:
      - add qemu-common to Breaks/Replaces.
      - add cpu-checker to Recommends.
    * qemu-user: add B/R:qemu-kvm
    * qemu-kvm:
      - add armhf armel powerpc sparc to Architecture
      - C/R/P: qemu-kvm-spice
    * add qemu-common package
    * drop qemu-slof which is not packaged in ubuntu
  - add qemu-system-common.links for tap ifup/down scripts and OVMF link.
  - qemu-system-x86.links:
    * remove pxe rom links which are in kvm-ipxe
    * add symlink for kvm.1 manpage
  - debian/rules
    * add kvm-spice symlink to qemu-kvm
    * call dh_installmodules for qemu-system-x86
    * update dh_installinit to install upstart script
    * run dh_installman (Closes: #709241) (cherrypicked from 1.5.0+dfsg-2)
  - Add qemu-utils.links for kvm-* symlinks.
  - Add qemu-system-x86.qemu-kvm.upstart and .default
  - Add qemu-system-x86.modprobe to set nesting=1
  - Add qemu-system-common.preinst to add kvm group
  - qemu-system-common.postinst: remove bad group acl if there, then have
    udev relabel /dev/kvm.
  - New linaro patches from qemu-linaro rebasing branch
  - Dropped patches:
    * xen-simplify-xen_enabled.patch
    * sparc-linux-user-fix-missing-symbols-in-.rel-.rela.plt-sections.patch
    * main_loop-do-not-set-nonblocking-if-xen_enabled.patch
    * xen_machine_pv-do-not-create-a-dummy-CPU-in-machine-.patch
    * virtio-rng-fix-crash
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * linaro arm patches from qemu-linaro rebasing branch
  - New patches:
    * fix-pci-add: change CONFIG variable in ifdef to make sure that
      pci_add is defined.
* Add linaro patches
* Add experimental mach-virt patches for arm virtualization.
* qemu-system-common.install: add debian/tmp/usr/lib to install the
  qemu-bridge-helper

Show diffs side-by-side

added added

removed removed

Lines of Context:
428
428
EXTRACT_HELPER(SR, 16, 4);
429
429
 
430
430
/* mtfsf/mtfsfi */
431
 
EXTRACT_HELPER(FPBF, 19, 3);
 
431
EXTRACT_HELPER(FPBF, 23, 3);
432
432
EXTRACT_HELPER(FPIMM, 12, 4);
433
 
EXTRACT_HELPER(FPL, 21, 1);
 
433
EXTRACT_HELPER(FPL, 25, 1);
434
434
EXTRACT_HELPER(FPFLM, 17, 8);
435
435
EXTRACT_HELPER(FPW, 16, 1);
436
436
 
9526
9526
 
9527
9527
/*****************************************************************************/
9528
9528
/* Misc PowerPC helpers */
9529
 
void cpu_dump_state (CPUPPCState *env, FILE *f, fprintf_function cpu_fprintf,
9530
 
                     int flags)
 
9529
void ppc_cpu_dump_state(CPUState *cs, FILE *f, fprintf_function cpu_fprintf,
 
9530
                        int flags)
9531
9531
{
9532
9532
#define RGPL  4
9533
9533
#define RFPL  4
9534
9534
 
 
9535
    PowerPCCPU *cpu = POWERPC_CPU(cs);
 
9536
    CPUPPCState *env = &cpu->env;
9535
9537
    int i;
9536
9538
 
9537
 
    cpu_synchronize_state(env);
 
9539
    cpu_synchronize_state(cs);
9538
9540
 
9539
9541
    cpu_fprintf(f, "NIP " TARGET_FMT_lx "   LR " TARGET_FMT_lx " CTR "
9540
9542
                TARGET_FMT_lx " XER " TARGET_FMT_lx "\n",
9675
9677
#undef RFPL
9676
9678
}
9677
9679
 
9678
 
void cpu_dump_statistics (CPUPPCState *env, FILE*f, fprintf_function cpu_fprintf,
9679
 
                          int flags)
 
9680
void ppc_cpu_dump_statistics(CPUState *cs, FILE*f,
 
9681
                             fprintf_function cpu_fprintf, int flags)
9680
9682
{
9681
9683
#if defined(DO_PPC_STATISTICS)
 
9684
    PowerPCCPU *cpu = POWERPC_CPU(cs);
9682
9685
    opc_handler_t **t1, **t2, **t3, *handler;
9683
9686
    int op1, op2, op3;
9684
9687
 
9685
 
    t1 = env->opcodes;
 
9688
    t1 = cpu->env.opcodes;
9686
9689
    for (op1 = 0; op1 < 64; op1++) {
9687
9690
        handler = t1[op1];
9688
9691
        if (is_indirect_opcode(handler)) {
9723
9726
}
9724
9727
 
9725
9728
/*****************************************************************************/
9726
 
static inline void gen_intermediate_code_internal(CPUPPCState *env,
 
9729
static inline void gen_intermediate_code_internal(PowerPCCPU *cpu,
9727
9730
                                                  TranslationBlock *tb,
9728
 
                                                  int search_pc)
 
9731
                                                  bool search_pc)
9729
9732
{
 
9733
    CPUState *cs = CPU(cpu);
 
9734
    CPUPPCState *env = &cpu->env;
9730
9735
    DisasContext ctx, *ctxp = &ctx;
9731
9736
    opc_handler_t **table, *handler;
9732
9737
    target_ulong pc_start;
9766
9771
        ctx.singlestep_enabled = 0;
9767
9772
    if ((env->flags & POWERPC_FLAG_BE) && msr_be)
9768
9773
        ctx.singlestep_enabled |= CPU_BRANCH_STEP;
9769
 
    if (unlikely(env->singlestep_enabled))
 
9774
    if (unlikely(cs->singlestep_enabled)) {
9770
9775
        ctx.singlestep_enabled |= GDBSTUB_SINGLE_STEP;
 
9776
    }
9771
9777
#if defined (DO_SINGLE_STEP) && 0
9772
9778
    /* Single step trace mode */
9773
9779
    msr_se = 1;
9869
9875
                     ctx.exception != POWERPC_EXCP_BRANCH)) {
9870
9876
            gen_exception(ctxp, POWERPC_EXCP_TRACE);
9871
9877
        } else if (unlikely(((ctx.nip & (TARGET_PAGE_SIZE - 1)) == 0) ||
9872
 
                            (env->singlestep_enabled) ||
 
9878
                            (cs->singlestep_enabled) ||
9873
9879
                            singlestep ||
9874
9880
                            num_insns >= max_insns)) {
9875
9881
            /* if we reach a page boundary or are single stepping, stop
9883
9889
    if (ctx.exception == POWERPC_EXCP_NONE) {
9884
9890
        gen_goto_tb(&ctx, 0, ctx.nip);
9885
9891
    } else if (ctx.exception != POWERPC_EXCP_BRANCH) {
9886
 
        if (unlikely(env->singlestep_enabled)) {
 
9892
        if (unlikely(cs->singlestep_enabled)) {
9887
9893
            gen_debug_exception(ctxp);
9888
9894
        }
9889
9895
        /* Generate the return instruction */
9914
9920
 
9915
9921
void gen_intermediate_code (CPUPPCState *env, struct TranslationBlock *tb)
9916
9922
{
9917
 
    gen_intermediate_code_internal(env, tb, 0);
 
9923
    gen_intermediate_code_internal(ppc_env_get_cpu(env), tb, false);
9918
9924
}
9919
9925
 
9920
9926
void gen_intermediate_code_pc (CPUPPCState *env, struct TranslationBlock *tb)
9921
9927
{
9922
 
    gen_intermediate_code_internal(env, tb, 1);
 
9928
    gen_intermediate_code_internal(ppc_env_get_cpu(env), tb, true);
9923
9929
}
9924
9930
 
9925
9931
void restore_state_to_opc(CPUPPCState *env, TranslationBlock *tb, int pc_pos)