faults.cc (3926:c57925da8d38) faults.cc (3928:9486450f013f)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

307 MiscReg CWP = tc->readMiscReg(MISCREG_CWP);
308 MiscReg CANSAVE = tc->readMiscReg(MISCREG_CANSAVE);
309 MiscReg GL = tc->readMiscReg(MISCREG_GL);
310 MiscReg PC = tc->readPC();
311 MiscReg NPC = tc->readNextPC();
312
313 TL++;
314
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

307 MiscReg CWP = tc->readMiscReg(MISCREG_CWP);
308 MiscReg CANSAVE = tc->readMiscReg(MISCREG_CANSAVE);
309 MiscReg GL = tc->readMiscReg(MISCREG_GL);
310 MiscReg PC = tc->readPC();
311 MiscReg NPC = tc->readNextPC();
312
313 TL++;
314
315 if (bits(PSTATE, 3,3)) {
316 PC &= mask(32);
317 NPC &= mask(32);
318 }
319
315 //set TSTATE.gl to gl
316 replaceBits(TSTATE, 42, 40, GL);
317 //set TSTATE.ccr to ccr
318 replaceBits(TSTATE, 39, 32, CCR);
319 //set TSTATE.asi to asi
320 replaceBits(TSTATE, 31, 24, ASI);
321 //set TSTATE.pstate to pstate
322 replaceBits(TSTATE, 20, 8, PSTATE);

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

385 MiscReg CCR = tc->readMiscReg(MISCREG_CCR);
386 MiscReg ASI = tc->readMiscReg(MISCREG_ASI);
387 MiscReg CWP = tc->readMiscReg(MISCREG_CWP);
388 MiscReg CANSAVE = tc->readMiscReg(MISCREG_CANSAVE);
389 MiscReg GL = tc->readMiscReg(MISCREG_GL);
390 MiscReg PC = tc->readPC();
391 MiscReg NPC = tc->readNextPC();
392
320 //set TSTATE.gl to gl
321 replaceBits(TSTATE, 42, 40, GL);
322 //set TSTATE.ccr to ccr
323 replaceBits(TSTATE, 39, 32, CCR);
324 //set TSTATE.asi to asi
325 replaceBits(TSTATE, 31, 24, ASI);
326 //set TSTATE.pstate to pstate
327 replaceBits(TSTATE, 20, 8, PSTATE);

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

390 MiscReg CCR = tc->readMiscReg(MISCREG_CCR);
391 MiscReg ASI = tc->readMiscReg(MISCREG_ASI);
392 MiscReg CWP = tc->readMiscReg(MISCREG_CWP);
393 MiscReg CANSAVE = tc->readMiscReg(MISCREG_CANSAVE);
394 MiscReg GL = tc->readMiscReg(MISCREG_GL);
395 MiscReg PC = tc->readPC();
396 MiscReg NPC = tc->readNextPC();
397
398 if (bits(PSTATE, 3,3)) {
399 PC &= mask(32);
400 NPC &= mask(32);
401 }
402
393 //Increment the trap level
394 TL++;
395 tc->setMiscReg(MISCREG_TL, TL);
396
397 //Save off state
398
399 //set TSTATE.gl to gl
400 replaceBits(TSTATE, 42, 40, GL);

--- 268 unchanged lines hidden ---
403 //Increment the trap level
404 TL++;
405 tc->setMiscReg(MISCREG_TL, TL);
406
407 //Save off state
408
409 //set TSTATE.gl to gl
410 replaceBits(TSTATE, 42, 40, GL);

--- 268 unchanged lines hidden ---