| OLD | NEW |
| 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" |
| 11 | 11 |
| 12 #include <stdio.h> | 12 #include <stdio.h> |
| 13 | 13 |
| 14 namespace nacl_arm_dec { | 14 namespace nacl_arm_dec { |
| 15 | 15 |
| 16 | 16 |
| 17 Arm32DecoderState::Arm32DecoderState() : DecoderState() | 17 Arm32DecoderState::Arm32DecoderState() : DecoderState() |
| 18 , Binary2RegisterImmedShiftedTest_instance_() | 18 , Binary2RegisterImmedShiftedTest_instance_() |
| 19 , Binary3RegisterImmedShiftedOp_instance_() | 19 , Binary3RegisterImmedShiftedOp_instance_() |
| 20 , Binary3RegisterImmedShiftedOpRnNotSp_instance_() |
| 20 , Binary3RegisterOp_instance_() | 21 , Binary3RegisterOp_instance_() |
| 21 , Binary3RegisterShiftedTest_instance_() | 22 , Binary3RegisterShiftedTest_instance_() |
| 22 , Binary4RegisterShiftedOp_instance_() | 23 , Binary4RegisterShiftedOp_instance_() |
| 23 , Branch_instance_() | 24 , Branch_instance_() |
| 24 , Breakpoint_instance_() | 25 , Breakpoint_instance_() |
| 25 , BxBlx_instance_() | 26 , BxBlx_instance_() |
| 26 , CoprocessorOp_instance_() | 27 , CoprocessorOp_instance_() |
| 27 , DataProc_instance_() | 28 , DataProc_instance_() |
| 28 , Defs12To15RdRnRsRmNotPc_instance_() | 29 , Defs12To15RdRnRsRmNotPc_instance_() |
| 29 , Deprecated_instance_() | 30 , Deprecated_instance_() |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 insn.bits(31, 0)); | 253 insn.bits(31, 0)); |
| 253 return Forbidden_instance_; | 254 return Forbidden_instance_; |
| 254 } | 255 } |
| 255 | 256 |
| 256 // Implementation of table: dp_reg. | 257 // Implementation of table: dp_reg. |
| 257 // Specified by: See Section A5.2.1 | 258 // Specified by: See Section A5.2.1 |
| 258 const ClassDecoder& Arm32DecoderState::decode_dp_reg( | 259 const ClassDecoder& Arm32DecoderState::decode_dp_reg( |
| 259 const Instruction insn) const | 260 const Instruction insn) const |
| 260 { | 261 { |
| 261 UNREFERENCED_PARAMETER(insn); | 262 UNREFERENCED_PARAMETER(insn); |
| 263 if ((insn & 0x01E00000) == 0x00400000 /* op1(24:20) == 0010x */ && |
| 264 true && |
| 265 true) |
| 266 return Binary3RegisterImmedShiftedOpRnNotSp_instance_; |
| 267 |
| 268 if ((insn & 0x01E00000) == 0x00800000 /* op1(24:20) == 0100x */ && |
| 269 true && |
| 270 true) |
| 271 return Binary3RegisterImmedShiftedOpRnNotSp_instance_; |
| 272 |
| 273 if ((insn & 0x01E00000) == 0x00A00000 /* op1(24:20) == 0101x */ && |
| 274 true && |
| 275 true) |
| 276 return Binary3RegisterImmedShiftedOp_instance_; |
| 277 |
| 278 if ((insn & 0x01E00000) == 0x01800000 /* op1(24:20) == 1100x */ && |
| 279 true && |
| 280 true) |
| 281 return Binary3RegisterImmedShiftedOp_instance_; |
| 282 |
| 262 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && | 283 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && |
| 263 (insn & 0x00000F80) != 0x00000000 /* op2(11:7) == ~00000 */ && | 284 (insn & 0x00000F80) != 0x00000000 /* op2(11:7) == ~00000 */ && |
| 264 (insn & 0x00000060) == 0x00000000 /* op3(6:5) == 00 */) | 285 (insn & 0x00000060) == 0x00000000 /* op3(6:5) == 00 */) |
| 265 return Unary2RegisterImmedShiftedOp_instance_; | 286 return Unary2RegisterImmedShiftedOp_instance_; |
| 266 | 287 |
| 267 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && | 288 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && |
| 268 (insn & 0x00000F80) != 0x00000000 /* op2(11:7) == ~00000 */ && | 289 (insn & 0x00000F80) != 0x00000000 /* op2(11:7) == ~00000 */ && |
| 269 (insn & 0x00000060) == 0x00000060 /* op3(6:5) == 11 */) | 290 (insn & 0x00000060) == 0x00000060 /* op3(6:5) == 11 */) |
| 270 return Unary2RegisterImmedShiftedOp_instance_; | 291 return Unary2RegisterImmedShiftedOp_instance_; |
| 271 | 292 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 287 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && | 308 if ((insn & 0x01E00000) == 0x01A00000 /* op1(24:20) == 1101x */ && |
| 288 true && | 309 true && |
| 289 (insn & 0x00000060) == 0x00000040 /* op3(6:5) == 10 */) | 310 (insn & 0x00000060) == 0x00000040 /* op3(6:5) == 10 */) |
| 290 return Unary2RegisterImmedShiftedOp_instance_; | 311 return Unary2RegisterImmedShiftedOp_instance_; |
| 291 | 312 |
| 292 if ((insn & 0x01E00000) == 0x01E00000 /* op1(24:20) == 1111x */ && | 313 if ((insn & 0x01E00000) == 0x01E00000 /* op1(24:20) == 1111x */ && |
| 293 true && | 314 true && |
| 294 true) | 315 true) |
| 295 return Unary2RegisterImmedShiftedOp_instance_; | 316 return Unary2RegisterImmedShiftedOp_instance_; |
| 296 | 317 |
| 318 if ((insn & 0x00E00000) == 0x00C00000 /* op1(24:20) == x110x */ && |
| 319 true && |
| 320 true) |
| 321 return Binary3RegisterImmedShiftedOp_instance_; |
| 322 |
| 323 if ((insn & 0x01600000) == 0x00600000 /* op1(24:20) == 0x11x */ && |
| 324 true && |
| 325 true) |
| 326 return Binary3RegisterImmedShiftedOp_instance_; |
| 327 |
| 297 if ((insn & 0x01900000) == 0x01100000 /* op1(24:20) == 10xx1 */ && | 328 if ((insn & 0x01900000) == 0x01100000 /* op1(24:20) == 10xx1 */ && |
| 298 true && | 329 true && |
| 299 true) | 330 true) |
| 300 return Binary2RegisterImmedShiftedTest_instance_; | 331 return Binary2RegisterImmedShiftedTest_instance_; |
| 301 | 332 |
| 302 if ((insn & 0x01A00000) == 0x01800000 /* op1(24:20) == 11x0x */ && | 333 if ((insn & 0x01C00000) == 0x00000000 /* op1(24:20) == 000xx */ && |
| 303 true && | |
| 304 true) | |
| 305 return Binary3RegisterImmedShiftedOp_instance_; | |
| 306 | |
| 307 if ((insn & 0x01000000) == 0x00000000 /* op1(24:20) == 0xxxx */ && | |
| 308 true && | 334 true && |
| 309 true) | 335 true) |
| 310 return Binary3RegisterImmedShiftedOp_instance_; | 336 return Binary3RegisterImmedShiftedOp_instance_; |
| 311 | 337 |
| 312 // Catch any attempt to fall though ... | 338 // Catch any attempt to fall though ... |
| 313 fprintf(stderr, "TABLE IS INCOMPLETE: dp_reg could not parse %08X", | 339 fprintf(stderr, "TABLE IS INCOMPLETE: dp_reg could not parse %08X", |
| 314 insn.bits(31, 0)); | 340 insn.bits(31, 0)); |
| 315 return Forbidden_instance_; | 341 return Forbidden_instance_; |
| 316 } | 342 } |
| 317 | 343 |
| (...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 fprintf(stderr, "TABLE IS INCOMPLETE: unconditional could not parse %08X", | 1679 fprintf(stderr, "TABLE IS INCOMPLETE: unconditional could not parse %08X", |
| 1654 insn.bits(31, 0)); | 1680 insn.bits(31, 0)); |
| 1655 return Forbidden_instance_; | 1681 return Forbidden_instance_; |
| 1656 } | 1682 } |
| 1657 | 1683 |
| 1658 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const { | 1684 const ClassDecoder& Arm32DecoderState::decode(const Instruction insn) const { |
| 1659 return decode_ARMv7(insn); | 1685 return decode_ARMv7(insn); |
| 1660 } | 1686 } |
| 1661 | 1687 |
| 1662 } // namespace nacl_arm_dec | 1688 } // namespace nacl_arm_dec |
| OLD | NEW |