Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: src/trusted/validator_ragel/unreviewed/parse_instruction.rl

Issue 12716018: Remove defines by duplicating end_of_instruction_cleanup. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * Hand-written Ragel machines and actions used in validator and decoding. 8 * Hand-written Ragel machines and actions used in validator and decoding.
9 * 9 *
10 * Note: this file includes many different machines which are supposed to be 10 * Note: this file includes many different machines which are supposed to be
(...skipping 898 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 action att_show_name_suffix_b { SET_ATT_INSTRUCTION_SUFFIX("b"); } 909 action att_show_name_suffix_b { SET_ATT_INSTRUCTION_SUFFIX("b"); }
910 action att_show_name_suffix_l { SET_ATT_INSTRUCTION_SUFFIX("l"); } 910 action att_show_name_suffix_l { SET_ATT_INSTRUCTION_SUFFIX("l"); }
911 action att_show_name_suffix_ll { SET_ATT_INSTRUCTION_SUFFIX("ll"); } 911 action att_show_name_suffix_ll { SET_ATT_INSTRUCTION_SUFFIX("ll"); }
912 action att_show_name_suffix_t { SET_ATT_INSTRUCTION_SUFFIX("t"); } 912 action att_show_name_suffix_t { SET_ATT_INSTRUCTION_SUFFIX("t"); }
913 action att_show_name_suffix_s { SET_ATT_INSTRUCTION_SUFFIX("s"); } 913 action att_show_name_suffix_s { SET_ATT_INSTRUCTION_SUFFIX("s"); }
914 action att_show_name_suffix_q { SET_ATT_INSTRUCTION_SUFFIX("q"); } 914 action att_show_name_suffix_q { SET_ATT_INSTRUCTION_SUFFIX("q"); }
915 action att_show_name_suffix_w { SET_ATT_INSTRUCTION_SUFFIX("w"); } 915 action att_show_name_suffix_w { SET_ATT_INSTRUCTION_SUFFIX("w"); }
916 action att_show_name_suffix_x { SET_ATT_INSTRUCTION_SUFFIX("x"); } 916 action att_show_name_suffix_x { SET_ATT_INSTRUCTION_SUFFIX("x"); }
917 action att_show_name_suffix_y { SET_ATT_INSTRUCTION_SUFFIX("y"); } 917 action att_show_name_suffix_y { SET_ATT_INSTRUCTION_SUFFIX("y"); }
918 }%% 918 }%%
919
920 %%{
921 machine decoder;
922
923 action end_of_instruction_cleanup {
924 process_instruction(instruction_begin, current_position + 1, &instruction,
925 userdata);
926 instruction_begin = current_position + 1;
927 SET_DISP_TYPE(DISPNONE);
928 SET_IMM_TYPE(IMMNONE);
929 SET_IMM2_TYPE(IMMNONE);
930 SET_REX_PREFIX(FALSE);
931 SET_DATA16_PREFIX(FALSE);
932 SET_LOCK_PREFIX(FALSE);
933 SET_REPNZ_PREFIX(FALSE);
934 SET_REPZ_PREFIX(FALSE);
935 SET_BRANCH_NOT_TAKEN(FALSE);
936 SET_BRANCH_TAKEN(FALSE);
937 /* Top three bis of VEX2 are inverted: see AMD/Intel manual. */
938 SET_VEX_PREFIX2(VEX_R | VEX_X | VEX_B);
939 SET_VEX_PREFIX3(0x00);
940 SET_ATT_INSTRUCTION_SUFFIX(NULL);
941 CLEAR_SPURIOUS_REX_B();
942 CLEAR_SPURIOUS_REX_X();
943 CLEAR_SPURIOUS_REX_R();
944 CLEAR_SPURIOUS_REX_W();
945 }
946
947 action report_fatal_error {
948 process_error(current_position, userdata);
949 result = FALSE;
950 goto error_detected;
951 }
952
953 decoder = (one_instruction @end_of_instruction_cleanup)*
954 $!report_fatal_error;
955 }%%
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698