| Index: src/trusted/validator_ragel/gen/validator_x86_64.c
|
| ===================================================================
|
| --- src/trusted/validator_ragel/gen/validator_x86_64.c (revision 10976)
|
| +++ src/trusted/validator_ragel/gen/validator_x86_64.c (working copy)
|
| @@ -19,11 +19,15 @@
|
| #include <string.h>
|
|
|
| #include "native_client/src/trusted/validator_ragel/bitmap.h"
|
| -#include "native_client/src/trusted/validator_ragel/unreviewed/validator_internal.h"
|
| +#include "native_client/src/trusted/validator_ragel/validator_internal.h"
|
|
|
|
|
|
|
|
|
| +/*
|
| + * The "write data" statement causes Ragel to emit the constant static data
|
| + * needed by the ragel machine.
|
| + */
|
|
|
| static const int x86_64_validator_start = 798;
|
| static const int x86_64_validator_first_final = 798;
|
| @@ -554,7 +558,7 @@
|
| /*
|
| * This option is usually used in tests: we will process the whole chunk
|
| * in one pass. Usually each bundle is processed separately which means
|
| - * instructions (and super-instructions) can not cross borders of the bundle.
|
| + * instructions (and "superinstructions") can not cross borders of the bundle.
|
| */
|
| if (options & PROCESS_CHUNK_AS_A_CONTIGUOUS_STREAM)
|
| end_of_bundle = data + size;
|
| @@ -590,11 +594,19 @@
|
| uint8_t vex_prefix2 = VEX_R | VEX_X | VEX_B;
|
| uint8_t vex_prefix3 = 0x00;
|
|
|
| + /*
|
| + * The "write init" statement causes Ragel to emit initialization code.
|
| + * This should be executed once before the ragel machine is started.
|
| + */
|
|
|
| {
|
| ( current_state) = x86_64_validator_start;
|
| }
|
|
|
| + /*
|
| + * The "write exec" statement causes Ragel to emit the ragel machine's
|
| + * execution code.
|
| + */
|
|
|
| {
|
| if ( ( current_position) == ( end_of_bundle) )
|
| @@ -7921,8 +7933,10 @@
|
| goto st798;
|
| tr645:
|
| { if (restricted_register == REG_RBP)
|
| + /* RESTRICTED_REGISTER_USED is informational flag used in tests. */
|
| instruction_info_collected |= RESTRICTED_REGISTER_USED;
|
| else
|
| + /* UNRESTRICTED_RSP_PROCESSED is error flag used in production. */
|
| instruction_info_collected |= UNRESTRICTED_RBP_PROCESSED;
|
| restricted_register = NO_REG;
|
| UnmarkValidJumpTarget((instruction_begin - data), valid_targets);
|
| @@ -20279,9 +20293,9 @@
|
| if ( ++( current_position) == ( end_of_bundle) )
|
| goto _test_eof225;
|
| case 225:
|
| - if ( 128u <= (*( current_position)) )
|
| - goto tr603;
|
| - goto tr52;
|
| + if ( (*( current_position)) <= 127u )
|
| + goto tr52;
|
| + goto tr603;
|
| st226:
|
| if ( ++( current_position) == ( end_of_bundle) )
|
| goto _test_eof226;
|
| @@ -23185,8 +23199,10 @@
|
| goto st808;
|
| tr956:
|
| { if (restricted_register == REG_RBP)
|
| + /* RESTRICTED_REGISTER_USED is informational flag used in tests. */
|
| instruction_info_collected |= RESTRICTED_REGISTER_USED;
|
| else
|
| + /* UNRESTRICTED_RSP_PROCESSED is error flag used in production. */
|
| instruction_info_collected |= UNRESTRICTED_RBP_PROCESSED;
|
| restricted_register = NO_REG;
|
| UnmarkValidJumpTarget((instruction_begin - data), valid_targets);
|
| @@ -28526,8 +28542,10 @@
|
| goto st817;
|
| tr1487:
|
| { if (restricted_register == REG_RBP)
|
| + /* RESTRICTED_REGISTER_USED is informational flag used in tests. */
|
| instruction_info_collected |= RESTRICTED_REGISTER_USED;
|
| else
|
| + /* UNRESTRICTED_RSP_PROCESSED is error flag used in production. */
|
| instruction_info_collected |= UNRESTRICTED_RBP_PROCESSED;
|
| restricted_register = NO_REG;
|
| UnmarkValidJumpTarget((instruction_begin - data), valid_targets);
|
| @@ -29624,8 +29642,10 @@
|
| goto st822;
|
| tr1522:
|
| { if (restricted_register == REG_RBP)
|
| + /* RESTRICTED_REGISTER_USED is informational flag used in tests. */
|
| instruction_info_collected |= RESTRICTED_REGISTER_USED;
|
| else
|
| + /* UNRESTRICTED_RSP_PROCESSED is error flag used in production. */
|
| instruction_info_collected |= UNRESTRICTED_RBP_PROCESSED;
|
| restricted_register = NO_REG;
|
| UnmarkValidJumpTarget((instruction_begin - data), valid_targets);
|
| @@ -29893,8 +29913,10 @@
|
| goto st823;
|
| tr1528:
|
| { if (restricted_register == REG_RBP)
|
| + /* RESTRICTED_REGISTER_USED is informational flag used in tests. */
|
| instruction_info_collected |= RESTRICTED_REGISTER_USED;
|
| else
|
| + /* UNRESTRICTED_RSP_PROCESSED is error flag used in production. */
|
| instruction_info_collected |= UNRESTRICTED_RBP_PROCESSED;
|
| restricted_register = NO_REG;
|
| UnmarkValidJumpTarget((instruction_begin - data), valid_targets);
|
|
|