isa.cc (9384:877293183bdf) isa.cc (9423:43caa4ca5979)
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;

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

186 regVal[MISCREG_EFER] = efer;
187 } else {
188 //Turning off long mode
189 efer.lma = 0;
190 regVal[MISCREG_EFER] = efer;
191 }
192 }
193 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;

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

186 regVal[MISCREG_EFER] = efer;
187 } else {
188 //Turning off long mode
189 efer.lma = 0;
190 regVal[MISCREG_EFER] = efer;
191 }
192 }
193 if (toggled.pg) {
194 tc->getITBPtr()->invalidateAll();
195 tc->getDTBPtr()->invalidateAll();
194 tc->getITBPtr()->flushAll();
195 tc->getDTBPtr()->flushAll();
196 }
197 //This must always be 1.
198 newCR0.et = 1;
199 newVal = newCR0;
200 updateHandyM5Reg(regVal[MISCREG_EFER],
201 newCR0,
202 regVal[MISCREG_CS_ATTR],
203 regVal[MISCREG_SS_ATTR],
204 regVal[MISCREG_RFLAGS],
205 tc);
206 }
207 break;
208 case MISCREG_CR2:
209 break;
210 case MISCREG_CR3:
196 }
197 //This must always be 1.
198 newCR0.et = 1;
199 newVal = newCR0;
200 updateHandyM5Reg(regVal[MISCREG_EFER],
201 newCR0,
202 regVal[MISCREG_CS_ATTR],
203 regVal[MISCREG_SS_ATTR],
204 regVal[MISCREG_RFLAGS],
205 tc);
206 }
207 break;
208 case MISCREG_CR2:
209 break;
210 case MISCREG_CR3:
211 tc->getITBPtr()->invalidateNonGlobal();
212 tc->getDTBPtr()->invalidateNonGlobal();
211 tc->getITBPtr()->flushNonGlobal();
212 tc->getDTBPtr()->flushNonGlobal();
213 break;
214 case MISCREG_CR4:
215 {
216 CR4 toggled = regVal[miscReg] ^ val;
217 if (toggled.pae || toggled.pse || toggled.pge) {
213 break;
214 case MISCREG_CR4:
215 {
216 CR4 toggled = regVal[miscReg] ^ val;
217 if (toggled.pae || toggled.pse || toggled.pge) {
218 tc->getITBPtr()->invalidateAll();
219 tc->getDTBPtr()->invalidateAll();
218 tc->getITBPtr()->flushAll();
219 tc->getDTBPtr()->flushAll();
220 }
221 }
222 break;
223 case MISCREG_CR8:
224 break;
225 case MISCREG_CS_ATTR:
226 {
227 SegAttr toggled = regVal[miscReg] ^ val;

--- 170 unchanged lines hidden ---
220 }
221 }
222 break;
223 case MISCREG_CR8:
224 break;
225 case MISCREG_CS_ATTR:
226 {
227 SegAttr toggled = regVal[miscReg] ^ val;

--- 170 unchanged lines hidden ---