regop.isa (6060:3d524dc980a8) | regop.isa (6222:9ee4a06a960b) |
---|---|
1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 1233 unchanged lines hidden (view full) --- 1242 DestReg = M5Reg; 1243 ''' 1244 1245 class Wrdl(RegOp): 1246 code = ''' 1247 SegDescriptor desc = SrcReg1; 1248 SegSelector selector = SrcReg2; 1249 if (selector.si || selector.ti) { | 1// Copyright (c) 2007-2008 The Hewlett-Packard Development Company 2// All rights reserved. 3// 4// Redistribution and use of this software in source and binary forms, 5// with or without modification, are permitted provided that the 6// following conditions are met: 7// 8// The software must be used only for Non-Commercial Use which means any --- 1233 unchanged lines hidden (view full) --- 1242 DestReg = M5Reg; 1243 ''' 1244 1245 class Wrdl(RegOp): 1246 code = ''' 1247 SegDescriptor desc = SrcReg1; 1248 SegSelector selector = SrcReg2; 1249 if (selector.si || selector.ti) { |
1250 if (!desc.p) 1251 panic("Segment not present.\\n"); |
|
1250 SegAttr attr = 0; 1251 attr.dpl = desc.dpl; | 1252 SegAttr attr = 0; 1253 attr.dpl = desc.dpl; |
1254 attr.unusable = 0; |
|
1252 attr.defaultSize = desc.d; | 1255 attr.defaultSize = desc.d; |
1256 attr.longMode = desc.l; 1257 attr.avl = desc.avl; 1258 attr.granularity = desc.g; 1259 attr.present = desc.p; 1260 attr.system = desc.s; 1261 attr.type = desc.type; |
|
1253 if (!desc.s) { 1254 // The expand down bit happens to be set for gates. 1255 if (desc.type.e) { 1256 panic("Gate descriptor encountered.\\n"); 1257 } 1258 attr.readable = 1; 1259 attr.writable = 1; | 1262 if (!desc.s) { 1263 // The expand down bit happens to be set for gates. 1264 if (desc.type.e) { 1265 panic("Gate descriptor encountered.\\n"); 1266 } 1267 attr.readable = 1; 1268 attr.writable = 1; |
1269 attr.expandDown = 0; |
|
1260 } else { | 1270 } else { |
1261 if (!desc.p) 1262 panic("Segment not present.\\n"); | |
1263 if (desc.type.codeOrData) { | 1271 if (desc.type.codeOrData) { |
1272 attr.expandDown = 0; |
|
1264 attr.readable = desc.type.r; | 1273 attr.readable = desc.type.r; |
1265 attr.longMode = desc.l; | 1274 attr.writable = 0; |
1266 } else { 1267 attr.expandDown = desc.type.e; 1268 attr.readable = 1; 1269 attr.writable = desc.type.w; 1270 } 1271 } 1272 Addr base = desc.baseLow | (desc.baseHigh << 24); 1273 Addr limit = desc.limitLow | (desc.limitHigh << 16); --- 12 unchanged lines hidden --- | 1275 } else { 1276 attr.expandDown = desc.type.e; 1277 attr.readable = 1; 1278 attr.writable = desc.type.w; 1279 } 1280 } 1281 Addr base = desc.baseLow | (desc.baseHigh << 24); 1282 Addr limit = desc.limitLow | (desc.limitHigh << 16); --- 12 unchanged lines hidden --- |