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

Side by Side Diff: src/trusted/validator_mips/gen/decode.cc

Issue 1535443005: [MIPS] Make validator allow only two load patterns via $t8 (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client@master
Patch Set: Minor update. Created 4 years, 11 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
« no previous file with comments | « src/trusted/validator_mips/build.scons ('k') | src/trusted/validator_mips/inst_classes.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2013 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 // DO NOT EDIT: GENERATED CODE 7 // DO NOT EDIT: GENERATED CODE
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 #include "native_client/src/trusted/validator_mips/decode.h" 10 #include "native_client/src/trusted/validator_mips/decode.h"
(...skipping 10 matching lines...) Expand all
21 const Load _Load_instance; 21 const Load _Load_instance;
22 const JalImm _JalImm_instance; 22 const JalImm _JalImm_instance;
23 const Branch _Branch_instance; 23 const Branch _Branch_instance;
24 const Arithm2 _Arithm2_instance; 24 const Arithm2 _Arithm2_instance;
25 const Arithm3 _Arithm3_instance; 25 const Arithm3 _Arithm3_instance;
26 const Forbidden _Forbidden_instance; 26 const Forbidden _Forbidden_instance;
27 const Safe _Safe_instance; 27 const Safe _Safe_instance;
28 const BranchAndLink _BranchAndLink_instance; 28 const BranchAndLink _BranchAndLink_instance;
29 const JalReg _JalReg_instance; 29 const JalReg _JalReg_instance;
30 const NaClHalt _NaClHalt_instance; 30 const NaClHalt _NaClHalt_instance;
31 const LoadWord _LoadWord_instance;
31 const StoreConditional _StoreConditional_instance; 32 const StoreConditional _StoreConditional_instance;
32 const FPLoadStore _FPLoadStore_instance; 33 const FPLoadStore _FPLoadStore_instance;
33 const JmpImm _JmpImm_instance; 34 const JmpImm _JmpImm_instance;
34 const JmpReg _JmpReg_instance; 35 const JmpReg _JmpReg_instance;
35 const Store _Store_instance; 36 const Store _Store_instance;
36 const ExtIns _ExtIns_instance; 37 const ExtIns _ExtIns_instance;
37 DecoderState() : 38 DecoderState() :
38 _Load_instance() 39 _Load_instance()
39 , _JalImm_instance() 40 , _JalImm_instance()
40 , _Branch_instance() 41 , _Branch_instance()
41 , _Arithm2_instance() 42 , _Arithm2_instance()
42 , _Arithm3_instance() 43 , _Arithm3_instance()
43 , _Forbidden_instance() 44 , _Forbidden_instance()
44 , _Safe_instance() 45 , _Safe_instance()
45 , _BranchAndLink_instance() 46 , _BranchAndLink_instance()
46 , _JalReg_instance() 47 , _JalReg_instance()
47 , _NaClHalt_instance() 48 , _NaClHalt_instance()
49 , _LoadWord_instance()
48 , _StoreConditional_instance() 50 , _StoreConditional_instance()
49 , _FPLoadStore_instance() 51 , _FPLoadStore_instance()
50 , _JmpImm_instance() 52 , _JmpImm_instance()
51 , _JmpReg_instance() 53 , _JmpReg_instance()
52 , _Store_instance() 54 , _Store_instance()
53 , _ExtIns_instance() 55 , _ExtIns_instance()
54 {} 56 {}
55 }; 57 };
56 58
57 /* 59 /*
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 187 }
186 188
187 if (((insn & 0xFC000000) == 0x78000000)) { 189 if (((insn & 0xFC000000) == 0x78000000)) {
188 return state->_Forbidden_instance; 190 return state->_Forbidden_instance;
189 } 191 }
190 192
191 if (((insn & 0xFC000000) == 0x7C000000)) { 193 if (((insn & 0xFC000000) == 0x7C000000)) {
192 return decode_special3(insn, state); 194 return decode_special3(insn, state);
193 } 195 }
194 196
195 if (((insn & 0xFC000000) == 0x98000000)) { 197 if (((insn & 0xFC000000) == 0x8C000000)) {
196 return state->_Load_instance; 198 return state->_LoadWord_instance;
197 } 199 }
198 200
199 if (((insn & 0xFC000000) == 0xB8000000)) { 201 if (((insn & 0xFC000000) == 0xB8000000)) {
200 return state->_Store_instance; 202 return state->_Store_instance;
201 } 203 }
202 204
203 if (((insn & 0xFC000000) == 0xC0000000)) { 205 if (((insn & 0xFC000000) == 0xC0000000)) {
204 return state->_Load_instance; 206 return state->_Load_instance;
205 } 207 }
206 208
207 if (((insn & 0xFC000000) == 0xE0000000)) { 209 if (((insn & 0xFC000000) == 0xE0000000)) {
208 return state->_StoreConditional_instance; 210 return state->_StoreConditional_instance;
209 } 211 }
210 212
211 if (((insn & 0xDC000000) == 0x9C000000)) { 213 if (((insn & 0xDC000000) == 0x9C000000)) {
212 return state->_Forbidden_instance; 214 return state->_Forbidden_instance;
213 } 215 }
214 216
215 if (((insn & 0xDC000000) == 0xD0000000)) { 217 if (((insn & 0xDC000000) == 0xD0000000)) {
216 return state->_Forbidden_instance; 218 return state->_Forbidden_instance;
217 } 219 }
218 220
219 if (((insn & 0xF8000000) == 0x30000000)) { 221 if (((insn & 0xF8000000) == 0x30000000)) {
220 return state->_Arithm2_instance; 222 return state->_Arithm2_instance;
221 } 223 }
222 224
223 if (((insn & 0xF8000000) == 0x90000000)) { 225 if (((insn & 0xEC000000) == 0x88000000)) {
224 return state->_Load_instance; 226 return state->_Load_instance;
225 } 227 }
226 228
227 if (((insn & 0xF8000000) == 0xB0000000)) { 229 if (((insn & 0xF8000000) == 0xB0000000)) {
228 return state->_Forbidden_instance; 230 return state->_Forbidden_instance;
229 } 231 }
230 232
231 if (((insn & 0xB8000000) == 0x10000000)) { 233 if (((insn & 0xB8000000) == 0x10000000)) {
232 return state->_Branch_instance; 234 return state->_Branch_instance;
233 } 235 }
(...skipping 15 matching lines...) Expand all
249 } 251 }
250 252
251 if (((insn & 0xF0000000) == 0x20000000)) { 253 if (((insn & 0xF0000000) == 0x20000000)) {
252 return state->_Arithm2_instance; 254 return state->_Arithm2_instance;
253 } 255 }
254 256
255 if (((insn & 0xF0000000) == 0x60000000)) { 257 if (((insn & 0xF0000000) == 0x60000000)) {
256 return state->_Forbidden_instance; 258 return state->_Forbidden_instance;
257 } 259 }
258 260
259 if (((insn & 0xF0000000) == 0x80000000)) { 261 if (((insn & 0xE8000000) == 0x80000000)) {
260 return state->_Load_instance; 262 return state->_Load_instance;
261 } 263 }
262 264
263 if (((insn & 0xF0000000) == 0xA0000000)) { 265 if (((insn & 0xF0000000) == 0xA0000000)) {
264 return state->_Store_instance; 266 return state->_Store_instance;
265 } 267 }
266 268
267 // Catch any attempt to fall through... 269 // Catch any attempt to fall through...
268 fprintf(stderr, "TABLE IS INCOMPLETE: " 270 fprintf(stderr, "TABLE IS INCOMPLETE: "
269 "MIPS32 could not parse %08X", insn.Bits(31, 0)); 271 "MIPS32 could not parse %08X", insn.Bits(31, 0));
(...skipping 1172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1442 } 1444 }
1443 void delete_state(const DecoderState *state) { 1445 void delete_state(const DecoderState *state) {
1444 delete state; 1446 delete state;
1445 } 1447 }
1446 1448
1447 const ClassDecoder &decode(const Instruction insn, const DecoderState *state) { 1449 const ClassDecoder &decode(const Instruction insn, const DecoderState *state) {
1448 return decode_MIPS32(insn, state); 1450 return decode_MIPS32(insn, state);
1449 } 1451 }
1450 1452
1451 } // namespace nacl_mips_dec 1453 } // namespace nacl_mips_dec
OLDNEW
« no previous file with comments | « src/trusted/validator_mips/build.scons ('k') | src/trusted/validator_mips/inst_classes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698