1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 104 unchanged lines hidden (view full) --- 113 //instruction anyway, just ignore the base in those cases 114 base = NUM_INTREGS; 115 } 116 } 117 } 118 //Figure out what segment to use. This won't be entirely accurate since 119 //the presence of a displacement is supposed to make the instruction 120 //default to the data segment. |
121 if ((base != INTREG_RBP && base != INTREG_RSP) || machInst.dispSize) { |
122 seg = SEGMENT_REG_DS; 123 //Handle any segment override that might have been in the instruction 124 int segFromInst = machInst.legacy.seg; 125 if (segFromInst) 126 seg = (SegmentRegIndex)(segFromInst - 1); 127 } else { 128 seg = SEGMENT_REG_SS; 129 } 130} 131 132void EmulEnv::setSeg(const ExtMachInst & machInst) 133{ 134 seg = SEGMENT_REG_DS; 135 //Handle any segment override that might have been in the instruction 136 int segFromInst = machInst.legacy.seg; 137 if (segFromInst) 138 seg = (SegmentRegIndex)(segFromInst - 1); 139} |