faults.cc (8578:dee1f3ab92e4) faults.cc (8696:642f83fafffb)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * Authors: Gabe Black
30 * Korey Sewell
31 * Jaidev Patwardhan
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * Copyright (c) 2007 MIPS Technologies, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

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

24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * Authors: Gabe Black
30 * Korey Sewell
31 * Jaidev Patwardhan
32 * Zhengxing Li
33 * Deyuan Guo
32 */
33
34#include "arch/mips/faults.hh"
35#include "arch/mips/pra_constants.hh"
36#include "base/trace.hh"
37#include "cpu/base.hh"
38#include "cpu/thread_context.hh"
39#include "debug/MipsPRA.hh"

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

116 status.exl = 1;
117 tc->setMiscRegNoEffect(MISCREG_STATUS, status);
118
119 // write EPC
120 PCState pc = tc->pcState();
121 DPRINTF(MipsPRA, "PC: %s\n", pc);
122 bool delay_slot = pc.pc() + sizeof(MachInst) != pc.npc();
123 tc->setMiscRegNoEffect(MISCREG_EPC,
34 */
35
36#include "arch/mips/faults.hh"
37#include "arch/mips/pra_constants.hh"
38#include "base/trace.hh"
39#include "cpu/base.hh"
40#include "cpu/thread_context.hh"
41#include "debug/MipsPRA.hh"

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

118 status.exl = 1;
119 tc->setMiscRegNoEffect(MISCREG_STATUS, status);
120
121 // write EPC
122 PCState pc = tc->pcState();
123 DPRINTF(MipsPRA, "PC: %s\n", pc);
124 bool delay_slot = pc.pc() + sizeof(MachInst) != pc.npc();
125 tc->setMiscRegNoEffect(MISCREG_EPC,
124 pc.pc() - delay_slot ? sizeof(MachInst) : 0);
126 pc.pc() - (delay_slot ? sizeof(MachInst) : 0));
125
126 // Set Cause_EXCCODE field
127 CauseReg cause = tc->readMiscReg(MISCREG_CAUSE);
128 cause.excCode = excCode;
129 cause.bd = delay_slot ? 1 : 0;
130 cause.ce = 0;
131 tc->setMiscRegNoEffect(MISCREG_CAUSE, cause);
132}

--- 44 unchanged lines hidden ---
127
128 // Set Cause_EXCCODE field
129 CauseReg cause = tc->readMiscReg(MISCREG_CAUSE);
130 cause.excCode = excCode;
131 cause.bd = delay_slot ? 1 : 0;
132 cause.ce = 0;
133 tc->setMiscRegNoEffect(MISCREG_CAUSE, cause);
134}

--- 44 unchanged lines hidden ---