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

Side by Side Diff: src/trusted/validator_arm/gen/arm32_decode.cc

Issue 10879090: ARM validator: continue with extra_load_store_instructions. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Update with more tables. Created 8 years, 3 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 2012 The Native Client Authors. All rights reserved. 2 * Copyright 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 // DO NOT EDIT: GENERATED CODE 7 // DO NOT EDIT: GENERATED CODE
8 8
9 9
10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode.h" 10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode.h"
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
939 // Catch any attempt to fall though ... 939 // Catch any attempt to fall though ...
940 return not_implemented_; 940 return not_implemented_;
941 } 941 }
942 942
943 // Implementation of table: miscellaneous_instructions. 943 // Implementation of table: miscellaneous_instructions.
944 // Specified by: See Section A5.2.12 944 // Specified by: See Section A5.2.12
945 const ClassDecoder& Arm32DecoderState::decode_miscellaneous_instructions( 945 const ClassDecoder& Arm32DecoderState::decode_miscellaneous_instructions(
946 const Instruction insn) const 946 const Instruction insn) const
947 { 947 {
948 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ && 948 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
949 (insn.Bits() & 0x00000200) == 0x00000000 /* B(9:9) == 0 */ &&
949 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 950 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
950 (insn.Bits() & 0x00030000) == 0x00000000 /* op1(19:16) == xx00 */ && 951 (insn.Bits() & 0x00030000) == 0x00000000 /* op1(19:16) == xx00 */ &&
951 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) { 952 (insn.Bits() & 0x0000FD00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx111100x0xxxxxxxx */) {
952 return Unary1RegisterUse_instance_; 953 return Unary1RegisterUse_instance_;
953 } 954 }
954 955
955 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ && 956 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
957 (insn.Bits() & 0x00000200) == 0x00000000 /* B(9:9) == 0 */ &&
956 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 958 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
957 (insn.Bits() & 0x00030000) == 0x00010000 /* op1(19:16) == xx01 */ && 959 (insn.Bits() & 0x00030000) == 0x00010000 /* op1(19:16) == xx01 */ &&
958 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) { 960 (insn.Bits() & 0x0000FD00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx111100x0xxxxxxxx */) {
959 return Forbidden_instance_; 961 return Forbidden_instance_;
960 } 962 }
961 963
962 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ && 964 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
965 (insn.Bits() & 0x00000200) == 0x00000000 /* B(9:9) == 0 */ &&
963 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 966 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
964 (insn.Bits() & 0x00020000) == 0x00020000 /* op1(19:16) == xx1x */ && 967 (insn.Bits() & 0x00020000) == 0x00020000 /* op1(19:16) == xx1x */ &&
965 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) { 968 (insn.Bits() & 0x0000FD00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx111100x0xxxxxxxx */) {
966 return Forbidden_instance_; 969 return Forbidden_instance_;
967 } 970 }
968 971
969 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ && 972 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
973 (insn.Bits() & 0x00000200) == 0x00000000 /* B(9:9) == 0 */ &&
970 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ && 974 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ &&
971 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) { 975 (insn.Bits() & 0x0000FD00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx111100x0xxxxxxxx */) {
972 return Forbidden_instance_; 976 return Forbidden_instance_;
973 } 977 }
974 978
975 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ && 979 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
980 (insn.Bits() & 0x00000200) == 0x00000000 /* B(9:9) == 0 */ &&
976 (insn.Bits() & 0x00200000) == 0x00000000 /* op(22:21) == x0 */ && 981 (insn.Bits() & 0x00200000) == 0x00000000 /* op(22:21) == x0 */ &&
977 (insn.Bits() & 0x000F0F0F) == 0x000F0000 /* $pattern(31:0) == xxxxxxxxxxxx 1111xxxx0000xxxx0000 */) { 982 (insn.Bits() & 0x000F0D0F) == 0x000F0000 /* $pattern(31:0) == xxxxxxxxxxxx 1111xxxx00x0xxxx0000 */) {
978 return Unary1RegisterSet_instance_; 983 return Unary1RegisterSet_instance_;
979 } 984 }
980 985
986 if ((insn.Bits() & 0x00000070) == 0x00000000 /* op2(6:4) == 000 */ &&
987 (insn.Bits() & 0x00000200) == 0x00000200 /* B(9:9) == 1 */) {
988 return Forbidden_instance_;
989 }
990
981 if ((insn.Bits() & 0x00000070) == 0x00000010 /* op2(6:4) == 001 */ && 991 if ((insn.Bits() & 0x00000070) == 0x00000010 /* op2(6:4) == 001 */ &&
982 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 992 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
983 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) { 993 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) {
984 return BxBlx_instance_; 994 return BxBlx_instance_;
985 } 995 }
986 996
987 if ((insn.Bits() & 0x00000070) == 0x00000010 /* op2(6:4) == 001 */ && 997 if ((insn.Bits() & 0x00000070) == 0x00000010 /* op2(6:4) == 001 */ &&
988 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ && 998 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ &&
989 (insn.Bits() & 0x000F0F00) == 0x000F0F00 /* $pattern(31:0) == xxxxxxxxxxxx 1111xxxx1111xxxxxxxx */) { 999 (insn.Bits() & 0x000F0F00) == 0x000F0F00 /* $pattern(31:0) == xxxxxxxxxxxx 1111xxxx1111xxxxxxxx */) {
990 return Defs12To15RdRnNotPc_instance_; 1000 return Defs12To15RdRnNotPc_instance_;
991 } 1001 }
992 1002
993 if ((insn.Bits() & 0x00000070) == 0x00000020 /* op2(6:4) == 010 */ && 1003 if ((insn.Bits() & 0x00000070) == 0x00000020 /* op2(6:4) == 010 */ &&
994 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 1004 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
995 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) { 1005 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) {
996 return Forbidden_instance_; 1006 return Forbidden_instance_;
997 } 1007 }
998 1008
999 if ((insn.Bits() & 0x00000070) == 0x00000030 /* op2(6:4) == 011 */ && 1009 if ((insn.Bits() & 0x00000070) == 0x00000030 /* op2(6:4) == 011 */ &&
1000 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ && 1010 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */ &&
1001 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) { 1011 (insn.Bits() & 0x000FFF00) == 0x000FFF00 /* $pattern(31:0) == xxxxxxxxxxxx 111111111111xxxxxxxx */) {
1002 return BxBlx_instance_; 1012 return BxBlx_instance_;
1003 } 1013 }
1004 1014
1005 if ((insn.Bits() & 0x00000070) == 0x00000050 /* op2(6:4) == 101 */) { 1015 if ((insn.Bits() & 0x00000070) == 0x00000050 /* op2(6:4) == 101 */) {
1006 return decode_saturating_addition_and_subtraction(insn); 1016 return decode_saturating_addition_and_subtraction(insn);
1007 } 1017 }
1008 1018
1019 if ((insn.Bits() & 0x00000070) == 0x00000060 /* op2(6:4) == 110 */ &&
1020 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */) {
1021 return Forbidden_instance_;
1022 }
1023
1009 if ((insn.Bits() & 0x00000070) == 0x00000070 /* op2(6:4) == 111 */ && 1024 if ((insn.Bits() & 0x00000070) == 0x00000070 /* op2(6:4) == 111 */ &&
1010 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */) { 1025 (insn.Bits() & 0x00600000) == 0x00200000 /* op(22:21) == 01 */) {
1011 return Breakpoint_instance_; 1026 return Breakpoint_instance_;
1012 } 1027 }
1013 1028
1014 if ((insn.Bits() & 0x00000070) == 0x00000070 /* op2(6:4) == 111 */ && 1029 if ((insn.Bits() & 0x00000070) == 0x00000070 /* op2(6:4) == 111 */ &&
1030 (insn.Bits() & 0x00600000) == 0x00400000 /* op(22:21) == 10 */) {
1031 return Forbidden_instance_;
1032 }
1033
1034 if ((insn.Bits() & 0x00000070) == 0x00000070 /* op2(6:4) == 111 */ &&
1015 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ && 1035 (insn.Bits() & 0x00600000) == 0x00600000 /* op(22:21) == 11 */ &&
1016 (insn.Bits() & 0x000FFF00) == 0x00000000 /* $pattern(31:0) == xxxxxxxxxxxx 000000000000xxxxxxxx */) { 1036 (insn.Bits() & 0x000FFF00) == 0x00000000 /* $pattern(31:0) == xxxxxxxxxxxx 000000000000xxxxxxxx */) {
1017 return Forbidden_instance_; 1037 return Forbidden_instance_;
1018 } 1038 }
1019 1039
1020 if (true) { 1040 if (true) {
1021 return Undefined_instance_; 1041 return Undefined_instance_;
1022 } 1042 }
1023 1043
1024 // Catch any attempt to fall though ... 1044 // Catch any attempt to fall though ...
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 } 1080 }
1061 1081
1062 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ && 1082 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ &&
1063 (insn.Bits() & 0x000F0000) == 0x00000000 /* op1(19:16) == 0000 */ && 1083 (insn.Bits() & 0x000F0000) == 0x00000000 /* op1(19:16) == 0000 */ &&
1064 (insn.Bits() & 0x000000F0) == 0x000000F0 /* op2(7:0) == 1111xxxx */ && 1084 (insn.Bits() & 0x000000F0) == 0x000000F0 /* op2(7:0) == 1111xxxx */ &&
1065 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) { 1085 (insn.Bits() & 0x0000FF00) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx11110000xxxxxxxx */) {
1066 return DontCareInst_instance_; 1086 return DontCareInst_instance_;
1067 } 1087 }
1068 1088
1069 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ && 1089 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ &&
1070 (insn.Bits() & 0x000F0000) == 0x00040000 /* op1(19:16) == 0100 */) { 1090 (insn.Bits() & 0x000F0000) == 0x00040000 /* op1(19:16) == 0100 */ &&
1091 (insn.Bits() & 0x0000F000) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx1111xxxxxxxxxxxx */) {
1071 return DontCareInst_instance_; 1092 return DontCareInst_instance_;
1072 } 1093 }
1073 1094
1074 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ && 1095 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ &&
1075 (insn.Bits() & 0x000B0000) == 0x00080000 /* op1(19:16) == 1x00 */) { 1096 (insn.Bits() & 0x000B0000) == 0x00080000 /* op1(19:16) == 1x00 */ &&
1097 (insn.Bits() & 0x0000F000) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx1111xxxxxxxxxxxx */) {
1076 return DontCareInst_instance_; 1098 return DontCareInst_instance_;
1077 } 1099 }
1078 1100
1079 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ && 1101 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ &&
1080 (insn.Bits() & 0x00030000) == 0x00010000 /* op1(19:16) == xx01 */ && 1102 (insn.Bits() & 0x00030000) == 0x00010000 /* op1(19:16) == xx01 */ &&
1081 (insn.Bits() & 0x0000F000) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx1111xxxxxxxxxxxx */) { 1103 (insn.Bits() & 0x0000F000) == 0x0000F000 /* $pattern(31:0) == xxxxxxxxxxxx xxxx1111xxxxxxxxxxxx */) {
1082 return Forbidden_instance_; 1104 return Forbidden_instance_;
1083 } 1105 }
1084 1106
1085 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ && 1107 if ((insn.Bits() & 0x00400000) == 0x00000000 /* op(22:22) == 0 */ &&
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 1628
1607 // Catch any attempt to fall though ... 1629 // Catch any attempt to fall though ...
1608 return not_implemented_; 1630 return not_implemented_;
1609 } 1631 }
1610 1632
1611 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const { 1633 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const {
1612 return decode_ARMv7(insn); 1634 return decode_ARMv7(insn);
1613 } 1635 }
1614 1636
1615 } // namespace nacl_arm_dec 1637 } // namespace nacl_arm_dec
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698