| Index: src/trusted/validator_ragel/decoder_x86_32.rl
|
| ===================================================================
|
| --- src/trusted/validator_ragel/decoder_x86_32.rl (revision 11020)
|
| +++ src/trusted/validator_ragel/decoder_x86_32.rl (working copy)
|
| @@ -20,7 +20,7 @@
|
| #include <string.h>
|
|
|
| #include "native_client/src/shared/utils/types.h"
|
| -#include "native_client/src/trusted/validator_ragel/unreviewed/decoder_internal.h"
|
| +#include "native_client/src/trusted/validator_ragel/decoder_internal.h"
|
|
|
| %%{
|
| machine x86_32_decoder;
|
| @@ -67,9 +67,9 @@
|
| process_instruction(instruction_begin, current_position + 1, &instruction,
|
| userdata);
|
| instruction_begin = current_position + 1;
|
| - SET_DISP_TYPE(DISPNONE);
|
| - SET_IMM_TYPE(IMMNONE);
|
| - SET_IMM2_TYPE(IMMNONE);
|
| + SET_DISPLACEMENT_FORMAT(DISPNONE);
|
| + SET_IMMEDIATE_FORMAT(IMMNONE);
|
| + SET_SECOND_IMMEDIATE_FORMAT(IMMNONE);
|
| SET_DATA16_PREFIX(FALSE);
|
| SET_LOCK_PREFIX(FALSE);
|
| SET_REPNZ_PREFIX(FALSE);
|
| @@ -90,6 +90,10 @@
|
| $!report_fatal_error;
|
| }%%
|
|
|
| +/*
|
| + * The "write data" statement causes Ragel to emit the constant static data
|
| + * needed by the ragel machine.
|
| + */
|
| %% write data;
|
|
|
| int DecodeChunkIA32(const uint8_t *data, size_t size,
|
| @@ -108,7 +112,15 @@
|
|
|
| memset(&instruction, 0, sizeof instruction);
|
|
|
| + /*
|
| + * The "write init" statement causes Ragel to emit initialization code.
|
| + * This should be executed once before the ragel machine is started.
|
| + */
|
| %% write init;
|
| + /*
|
| + * The "write exec" statement causes Ragel to emit the ragel machine's
|
| + * execution code.
|
| + */
|
| %% write exec;
|
|
|
| error_detected:
|
|
|