emulenv.cc (4848:25a45e79f9ea) emulenv.cc (4863:b6dacc9a39ff)
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 *

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

83 base = machInst.modRM.rm | (machInst.rex.b << 3);
84 if (machInst.modRM.mod == 0 && machInst.modRM.rm == 5) {
85 //Since we need to use a different encoding of this
86 //instruction anyway, just ignore the base in those cases
87 base = NUM_INTREGS;
88 }
89 }
90 }
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 *

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

83 base = machInst.modRM.rm | (machInst.rex.b << 3);
84 if (machInst.modRM.mod == 0 && machInst.modRM.rm == 5) {
85 //Since we need to use a different encoding of this
86 //instruction anyway, just ignore the base in those cases
87 base = NUM_INTREGS;
88 }
89 }
90 }
91 //Figure out what segment to use. This won't be entirely accurate since
92 //the presence of a displacement is supposed to make the instruction
93 //default to the data segment.
94 if (base != INTREG_RBP && base != INTREG_RSP ||
95 0/*Has an immediate offset*/) {
96 seg = SEGMENT_REG_DS;
97 //Handle any segment override that might have been in the instruction
98 int segFromInst = machInst.legacy.seg;
99 if (segFromInst)
100 seg = (SegmentRegIndex)(segFromInst - 1);
101 } else {
102 seg = SEGMENT_REG_SS;
103 }
91}
92
104}
105