decoder.hh (11168:f98eb2da15a4) decoder.hh (12045:31d9a81ba286)
1/*
2 * Copyright (c) 2012 Google
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

173 //This is how much of any immediate value we've gotten. This is used
174 //for both the actual immediate and the displacement.
175 int immediateCollected;
176
177 enum State {
178 ResetState,
179 FromCacheState,
180 PrefixState,
1/*
2 * Copyright (c) 2012 Google
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

173 //This is how much of any immediate value we've gotten. This is used
174 //for both the actual immediate and the displacement.
175 int immediateCollected;
176
177 enum State {
178 ResetState,
179 FromCacheState,
180 PrefixState,
181 TwoByteVexState,
182 ThreeByteVexFirstState,
183 ThreeByteVexSecondState,
181 Vex2Of2State,
182 Vex2Of3State,
183 Vex3Of3State,
184 VexOpcodeState,
184 OneByteOpcodeState,
185 TwoByteOpcodeState,
186 ThreeByte0F38OpcodeState,
187 ThreeByte0F3AOpcodeState,
188 ModRMState,
189 SIBState,
190 DisplacementState,
191 ImmediateState,
192 //We should never get to this state. Getting here is an error.
193 ErrorState
194 };
195
196 State state;
197
198 //Functions to handle each of the states
199 State doResetState();
200 State doFromCacheState();
201 State doPrefixState(uint8_t);
185 OneByteOpcodeState,
186 TwoByteOpcodeState,
187 ThreeByte0F38OpcodeState,
188 ThreeByte0F3AOpcodeState,
189 ModRMState,
190 SIBState,
191 DisplacementState,
192 ImmediateState,
193 //We should never get to this state. Getting here is an error.
194 ErrorState
195 };
196
197 State state;
198
199 //Functions to handle each of the states
200 State doResetState();
201 State doFromCacheState();
202 State doPrefixState(uint8_t);
202 State doTwoByteVexState(uint8_t);
203 State doThreeByteVexFirstState(uint8_t);
204 State doThreeByteVexSecondState(uint8_t);
203 State doVex2Of2State(uint8_t);
204 State doVex2Of3State(uint8_t);
205 State doVex3Of3State(uint8_t);
206 State doVexOpcodeState(uint8_t);
205 State doOneByteOpcodeState(uint8_t);
206 State doTwoByteOpcodeState(uint8_t);
207 State doThreeByte0F38OpcodeState(uint8_t);
208 State doThreeByte0F3AOpcodeState(uint8_t);
209 State doModRMState(uint8_t);
210 State doSIBState(uint8_t);
211 State doDisplacementState();
212 State doImmediateState();

--- 139 unchanged lines hidden ---
207 State doOneByteOpcodeState(uint8_t);
208 State doTwoByteOpcodeState(uint8_t);
209 State doThreeByte0F38OpcodeState(uint8_t);
210 State doThreeByte0F3AOpcodeState(uint8_t);
211 State doModRMState(uint8_t);
212 State doSIBState(uint8_t);
213 State doDisplacementState();
214 State doImmediateState();

--- 139 unchanged lines hidden ---