isa.cc (12392:e0dbdf30a2a5) isa.cc (12406:86bde4a026b5)
1/*
2 * Copyright (c) 2009 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;

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

211 regVal[MISCREG_EFER] = efer;
212 } else {
213 //Turning off long mode
214 efer.lma = 0;
215 regVal[MISCREG_EFER] = efer;
216 }
217 }
218 if (toggled.pg) {
1/*
2 * Copyright (c) 2009 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;

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

211 regVal[MISCREG_EFER] = efer;
212 } else {
213 //Turning off long mode
214 efer.lma = 0;
215 regVal[MISCREG_EFER] = efer;
216 }
217 }
218 if (toggled.pg) {
219 tc->getITBPtr()->flushAll();
220 tc->getDTBPtr()->flushAll();
219 dynamic_cast<TLB *>(tc->getITBPtr())->flushAll();
220 dynamic_cast<TLB *>(tc->getDTBPtr())->flushAll();
221 }
222 //This must always be 1.
223 newCR0.et = 1;
224 newVal = newCR0;
225 updateHandyM5Reg(regVal[MISCREG_EFER],
226 newCR0,
227 regVal[MISCREG_CS_ATTR],
228 regVal[MISCREG_SS_ATTR],
229 regVal[MISCREG_RFLAGS],
230 tc);
231 }
232 break;
233 case MISCREG_CR2:
234 break;
235 case MISCREG_CR3:
221 }
222 //This must always be 1.
223 newCR0.et = 1;
224 newVal = newCR0;
225 updateHandyM5Reg(regVal[MISCREG_EFER],
226 newCR0,
227 regVal[MISCREG_CS_ATTR],
228 regVal[MISCREG_SS_ATTR],
229 regVal[MISCREG_RFLAGS],
230 tc);
231 }
232 break;
233 case MISCREG_CR2:
234 break;
235 case MISCREG_CR3:
236 tc->getITBPtr()->flushNonGlobal();
237 tc->getDTBPtr()->flushNonGlobal();
236 dynamic_cast<TLB *>(tc->getITBPtr())->flushNonGlobal();
237 dynamic_cast<TLB *>(tc->getDTBPtr())->flushNonGlobal();
238 break;
239 case MISCREG_CR4:
240 {
241 CR4 toggled = regVal[miscReg] ^ val;
242 if (toggled.pae || toggled.pse || toggled.pge) {
238 break;
239 case MISCREG_CR4:
240 {
241 CR4 toggled = regVal[miscReg] ^ val;
242 if (toggled.pae || toggled.pse || toggled.pge) {
243 tc->getITBPtr()->flushAll();
244 tc->getDTBPtr()->flushAll();
243 dynamic_cast<TLB *>(tc->getITBPtr())->flushAll();
244 dynamic_cast<TLB *>(tc->getDTBPtr())->flushAll();
245 }
246 }
247 break;
248 case MISCREG_CR8:
249 break;
250 case MISCREG_CS_ATTR:
251 {
252 SegAttr toggled = regVal[miscReg] ^ val;

--- 175 unchanged lines hidden ---
245 }
246 }
247 break;
248 case MISCREG_CR8:
249 break;
250 case MISCREG_CS_ATTR:
251 {
252 SegAttr toggled = regVal[miscReg] ^ val;

--- 175 unchanged lines hidden ---