Deleted Added
sdiff udiff text old ( 11168:f98eb2da15a4 ) new ( 12045:31d9a81ba286 )
full compact
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,
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);
202 State doTwoByteVexState(uint8_t);
203 State doThreeByteVexFirstState(uint8_t);
204 State doThreeByteVexSecondState(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 ---