branch.c (a8ff66f52d3f17b5ae793955270675c197f73d6c) branch.c (f1b44067c19258b7614e3cd09dfe8d8e12ff5895)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 97, 2000, 2001 by Ralf Baechle
7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 */

--- 621 unchanged lines hidden (view full) ---

630 epc += 8;
631 regs->cp0_epc = epc;
632 break;
633
634 case bgtzl_op:
635 if (NO_R6EMU)
636 goto sigill_r6;
637 case bgtz_op:
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1996, 97, 2000, 2001 by Ralf Baechle
7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 */

--- 621 unchanged lines hidden (view full) ---

630 epc += 8;
631 regs->cp0_epc = epc;
632 break;
633
634 case bgtzl_op:
635 if (NO_R6EMU)
636 goto sigill_r6;
637 case bgtz_op:
638 /*
639 * Compact branches for R6 for the
640 * bgtz and bgtzl opcodes.
641 * BGTZ | rs = 0 | rt != 0 == BGTZALC
642 * BGTZ | rs = rt != 0 == BLTZALC
643 * BGTZ | rs != 0 | rt != 0 == BLTUC
644 * BGTZL | rs = 0 | rt != 0 == BGTZC
645 * BGTZL | rs = rt != 0 == BLTZC
646 * BGTZL | rs != 0 | rt != 0 == BLTC
647 *
648 * *ZALC varint for BGTZ &&& rt != 0
649 * For real GTZ{,L}, rt is always 0.
650 */
651 if (cpu_has_mips_r6 && insn.i_format.rt) {
652 if ((insn.i_format.opcode == blez_op) &&
653 ((!insn.i_format.rs && insn.i_format.rt) ||
654 (insn.i_format.rs == insn.i_format.rt)))
655 regs->regs[31] = epc + 4;
656 regs->cp0_epc += 8;
657 break;
658 }
659
638 /* rt field assumed to be zero */
639 if ((long)regs->regs[insn.i_format.rs] > 0) {
640 epc = epc + 4 + (insn.i_format.simmediate << 2);
641 if (insn.i_format.opcode == bgtzl_op)
642 ret = BRANCH_LIKELY_TAKEN;
643 } else
644 epc += 8;
645 regs->cp0_epc = epc;

--- 158 unchanged lines hidden ---
660 /* rt field assumed to be zero */
661 if ((long)regs->regs[insn.i_format.rs] > 0) {
662 epc = epc + 4 + (insn.i_format.simmediate << 2);
663 if (insn.i_format.opcode == bgtzl_op)
664 ret = BRANCH_LIKELY_TAKEN;
665 } else
666 epc += 8;
667 regs->cp0_epc = epc;

--- 158 unchanged lines hidden ---