types.hh (6329:5d8b91875859) types.hh (6437:ecebd7cccb06)
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 *

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

170 uint64_t displacement;
171
172 //The effective operand size.
173 uint8_t opSize;
174 //The effective address size.
175 uint8_t addrSize;
176 //The effective stack size.
177 uint8_t stackSize;
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 *

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

170 uint64_t displacement;
171
172 //The effective operand size.
173 uint8_t opSize;
174 //The effective address size.
175 uint8_t addrSize;
176 //The effective stack size.
177 uint8_t stackSize;
178 //The size of the displacement
179 uint8_t dispSize;
178
179 //Mode information
180 OperatingMode mode;
181 };
182
183 inline static std::ostream &
184 operator << (std::ostream & os, const ExtMachInst & emi)
185 {
186 ccprintf(os, "\n{\n\tleg = %#x,\n\trex = %#x,\n\t"
187 "op = {\n\t\tnum = %d,\n\t\top = %#x,\n\t\t"
188 "prefixA = %#x,\n\t\tprefixB = %#x\n\t},\n\t"
189 "modRM = %#x,\n\tsib = %#x,\n\t"
180
181 //Mode information
182 OperatingMode mode;
183 };
184
185 inline static std::ostream &
186 operator << (std::ostream & os, const ExtMachInst & emi)
187 {
188 ccprintf(os, "\n{\n\tleg = %#x,\n\trex = %#x,\n\t"
189 "op = {\n\t\tnum = %d,\n\t\top = %#x,\n\t\t"
190 "prefixA = %#x,\n\t\tprefixB = %#x\n\t},\n\t"
191 "modRM = %#x,\n\tsib = %#x,\n\t"
190 "immediate = %#x,\n\tdisplacement = %#x\n}\n",
192 "immediate = %#x,\n\tdisplacement = %#x\n\t"
193 "dispSize = %d}\n",
191 (uint8_t)emi.legacy, (uint8_t)emi.rex,
192 emi.opcode.num, (uint8_t)emi.opcode.op,
193 emi.opcode.prefixA, emi.opcode.prefixB,
194 (uint8_t)emi.modRM, (uint8_t)emi.sib,
194 (uint8_t)emi.legacy, (uint8_t)emi.rex,
195 emi.opcode.num, (uint8_t)emi.opcode.op,
196 emi.opcode.prefixA, emi.opcode.prefixB,
197 (uint8_t)emi.modRM, (uint8_t)emi.sib,
195 emi.immediate, emi.displacement);
198 emi.immediate, emi.displacement, emi.dispSize);
196 return os;
197 }
198
199 inline static bool
200 operator == (const ExtMachInst &emi1, const ExtMachInst &emi2)
201 {
202 if(emi1.legacy != emi2.legacy)
203 return false;

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

222 if(emi1.mode != emi2.mode)
223 return false;
224 if(emi1.opSize != emi2.opSize)
225 return false;
226 if(emi1.addrSize != emi2.addrSize)
227 return false;
228 if(emi1.stackSize != emi2.stackSize)
229 return false;
199 return os;
200 }
201
202 inline static bool
203 operator == (const ExtMachInst &emi1, const ExtMachInst &emi2)
204 {
205 if(emi1.legacy != emi2.legacy)
206 return false;

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

225 if(emi1.mode != emi2.mode)
226 return false;
227 if(emi1.opSize != emi2.opSize)
228 return false;
229 if(emi1.addrSize != emi2.addrSize)
230 return false;
231 if(emi1.stackSize != emi2.stackSize)
232 return false;
233 if(emi1.dispSize != emi2.dispSize)
234 return false;
230 return true;
231 }
232
233 struct CoreSpecific {
234 int core_type;
235 };
236};
237
238#endif // __ARCH_X86_TYPES_HH__
235 return true;
236 }
237
238 struct CoreSpecific {
239 int core_type;
240 };
241};
242
243#endif // __ARCH_X86_TYPES_HH__