Deleted Added
sdiff udiff text old ( 6071:551b62d68f43 ) new ( 6437:ecebd7cccb06 )
full compact
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) ||
122 0/*Has an immediate offset*/) {
123 seg = SEGMENT_REG_DS;
124 //Handle any segment override that might have been in the instruction
125 int segFromInst = machInst.legacy.seg;
126 if (segFromInst)
127 seg = (SegmentRegIndex)(segFromInst - 1);
128 } else {
129 seg = SEGMENT_REG_SS;
130 }
131}
132
133void EmulEnv::setSeg(const ExtMachInst & machInst)
134{
135 seg = SEGMENT_REG_DS;
136 //Handle any segment override that might have been in the instruction
137 int segFromInst = machInst.legacy.seg;
138 if (segFromInst)
139 seg = (SegmentRegIndex)(segFromInst - 1);
140}