regop.isa (5294:7222bdaed33b) | regop.isa (5295:5268691561b4) |
---|---|
1// Copyright (c) 2007 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 --- 996 unchanged lines hidden (view full) --- 1005 code = ''' 1006 1007 ''' 1008 1009 class Wrdl(RegOp): 1010 code = ''' 1011 SegDescriptor desc = SrcReg1; 1012 SegAttr attr = 0; | 1// Copyright (c) 2007 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 --- 996 unchanged lines hidden (view full) --- 1005 code = ''' 1006 1007 ''' 1008 1009 class Wrdl(RegOp): 1010 code = ''' 1011 SegDescriptor desc = SrcReg1; 1012 SegAttr attr = 0; |
1013 Addr base = 0, limit = 0; | |
1014 attr.dpl = desc.dpl; 1015 attr.defaultSize = desc.d; | 1013 attr.dpl = desc.dpl; 1014 attr.defaultSize = desc.d; |
1016 if (!desc.p) 1017 panic("Segment not present.\\n"); 1018 if (!desc.s) | 1015 if (!desc.s) { 1016 SegBaseDest = SegBaseDest; 1017 SegLimitDest = SegLimitDest; 1018 SegAttrDest = SegAttrDest; |
1019 panic("System segment encountered.\\n"); | 1019 panic("System segment encountered.\\n"); |
1020 if (desc.type.codeOrData) { 1021 panic("Code segment encountered with c = %d, r = %d, a = %d.\\n", 1022 desc.type.c, desc.type.r, desc.type.a); | |
1023 } else { | 1020 } else { |
1024 attr.expandDown = desc.type.e; 1025 attr.readable = 1; 1026 attr.writable = desc.type.w; 1027 base = desc.baseLow | (desc.baseHigh << 24); 1028 limit = desc.limitLow | (desc.limitHigh << 16); | 1021 if (!desc.p) 1022 panic("Segment not present.\\n"); 1023 if (desc.type.codeOrData) { 1024 attr.readable = desc.type.r; 1025 attr.longMode = desc.l; 1026 } else { 1027 attr.expandDown = desc.type.e; 1028 attr.readable = 1; 1029 attr.writable = desc.type.w; 1030 } 1031 Addr base = desc.baseLow | (desc.baseHigh << 24); 1032 Addr limit = desc.limitLow | (desc.limitHigh << 16); |
1029 if (desc.g) 1030 limit = (limit << 12) | mask(12); | 1033 if (desc.g) 1034 limit = (limit << 12) | mask(12); |
1035 SegBaseDest = base; 1036 SegLimitDest = limit; 1037 SegAttrDest = attr; |
|
1031 } | 1038 } |
1032 SegBaseDest = base; 1033 SegLimitDest = limit; 1034 SegAttrDest = attr; | |
1035 ''' 1036}}; | 1039 ''' 1040}}; |