~ubuntu-branches/ubuntu/saucy/qemu/saucy-proposed

« back to all changes in this revision

Viewing changes to tcg/optimize.c

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2013-05-28 08:18:30 UTC
  • mfrom: (1.8.2) (10.1.37 sid)
  • Revision ID: package-import@ubuntu.com-20130528081830-87xl2z9fq516a814
Tags: 1.5.0+dfsg-2ubuntu1
* Merge 1.5.0+dfs-2 from debian unstable.  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
    * 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.
  - Dropped patches:
    * 0001-fix-wrong-output-with-info-chardev-for-tcp-socket.patch
  - Kept patches:
    * expose_vms_qemu64cpu.patch - updated
    * gridcentric patch - updated
    * linaro arm patches from qemu-linaro rebasing branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
554
554
                args[5] = tcg_invert_cond(args[5]);
555
555
            }
556
556
            break;
557
 
        case INDEX_op_add2_i32:
 
557
        CASE_OP_32_64(add2):
558
558
            swap_commutative(args[0], &args[2], &args[4]);
559
559
            swap_commutative(args[1], &args[3], &args[5]);
560
560
            break;
561
 
        case INDEX_op_mulu2_i32:
 
561
        CASE_OP_32_64(mulu2):
 
562
        CASE_OP_32_64(muls2):
562
563
            swap_commutative(args[0], &args[2], &args[3]);
563
564
            break;
564
565
        case INDEX_op_brcond2_i32:
575
576
            break;
576
577
        }
577
578
 
578
 
        /* Simplify expressions for "shift/rot r, 0, a => movi r, 0" */
 
579
        /* Simplify expressions for "shift/rot r, 0, a => movi r, 0",
 
580
           and "sub r, 0, a => neg r, a" case.  */
579
581
        switch (op) {
580
582
        CASE_OP_32_64(shl):
581
583
        CASE_OP_32_64(shr):
591
593
                continue;
592
594
            }
593
595
            break;
 
596
        CASE_OP_32_64(sub):
 
597
            {
 
598
                TCGOpcode neg_op;
 
599
                bool have_neg;
 
600
 
 
601
                if (temps[args[2]].state == TCG_TEMP_CONST) {
 
602
                    /* Proceed with possible constant folding. */
 
603
                    break;
 
604
                }
 
605
                if (op == INDEX_op_sub_i32) {
 
606
                    neg_op = INDEX_op_neg_i32;
 
607
                    have_neg = TCG_TARGET_HAS_neg_i32;
 
608
                } else {
 
609
                    neg_op = INDEX_op_neg_i64;
 
610
                    have_neg = TCG_TARGET_HAS_neg_i64;
 
611
                }
 
612
                if (!have_neg) {
 
613
                    break;
 
614
                }
 
615
                if (temps[args[1]].state == TCG_TEMP_CONST
 
616
                    && temps[args[1]].val == 0) {
 
617
                    s->gen_opc_buf[op_index] = neg_op;
 
618
                    reset_temp(args[0]);
 
619
                    gen_args[0] = args[0];
 
620
                    gen_args[1] = args[2];
 
621
                    args += 3;
 
622
                    gen_args += 2;
 
623
                    continue;
 
624
                }
 
625
            }
 
626
            break;
594
627
        default:
595
628
            break;
596
629
        }
1024
1057
                /* Simplify LT/GE comparisons vs zero to a single compare
1025
1058
                   vs the high word of the input.  */
1026
1059
                s->gen_opc_buf[op_index] = INDEX_op_setcond_i32;
 
1060
                reset_temp(args[0]);
1027
1061
                gen_args[0] = args[0];
1028
1062
                gen_args[1] = args[2];
1029
1063
                gen_args[2] = args[4];