| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 The Native Client Authors. All rights reserved. | 2 * Copyright 2013 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 #include "native_client/src/trusted/validator_arm/inst_classes.h" | 9 #include "native_client/src/trusted/validator_arm/inst_classes.h" |
| 10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode_actuals.h" | 10 #include "native_client/src/trusted/validator_arm/gen/arm32_decode_actuals.h" |
| (...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 // uses: '{inst(3:0)}' | 677 // uses: '{inst(3:0)}' |
| 678 return RegisterList(). | 678 return RegisterList(). |
| 679 Add(Register((inst.Bits() & 0x0000000F))); | 679 Add(Register((inst.Bits() & 0x0000000F))); |
| 680 } | 680 } |
| 681 | 681 |
| 682 // Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1 | 682 // Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1 |
| 683 // | 683 // |
| 684 // Actual: | 684 // Actual: |
| 685 // {defs: {15, 14}, | 685 // {defs: {15, 14}, |
| 686 // relative: true, | 686 // relative: true, |
| 687 // relative_offset: SignExtend(inst(23:0):'00'(1:0), 32), | 687 // relative_offset: SignExtend(inst(23:0):'00'(1:0), 32) + 8, |
| 688 // safety: [true => MAY_BE_SAFE], | 688 // safety: [true => MAY_BE_SAFE], |
| 689 // uses: {15}} | 689 // uses: {15}} |
| 690 | 690 |
| 691 RegisterList Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 691 RegisterList Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 692 defs(Instruction inst) const { | 692 defs(Instruction inst) const { |
| 693 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 693 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 694 // defs: '{15, 14}' | 694 // defs: '{15, 14}' |
| 695 return RegisterList(). | 695 return RegisterList(). |
| 696 Add(Register(15)). | 696 Add(Register(15)). |
| 697 Add(Register(14)); | 697 Add(Register(14)); |
| 698 } | 698 } |
| 699 | 699 |
| 700 bool Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 700 bool Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 701 is_relative_branch(Instruction inst) const { | 701 is_relative_branch(Instruction inst) const { |
| 702 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 702 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 703 // relative: 'true' | 703 // relative: 'true' |
| 704 return true; | 704 return true; |
| 705 } | 705 } |
| 706 | 706 |
| 707 int32_t Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 707 int32_t Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 708 branch_target_offset(Instruction inst) const { | 708 branch_target_offset(Instruction inst) const { |
| 709 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 709 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 710 // relative_offset: "SignExtend(inst(23:0):'00'(1:0), 32)" | 710 // relative_offset: "SignExtend(inst(23:0):'00'(1:0), 32) + 8" |
| 711 return (((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) & 0x020000
00) | 711 return (((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) & 0x020000
00) |
| 712 ? ((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) | 0xFC00000
0) | 712 ? ((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) | 0xFC00000
0) |
| 713 : ((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))); | 713 : ((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) + 8; |
| 714 } | 714 } |
| 715 | 715 |
| 716 SafetyLevel Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 716 SafetyLevel Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 717 safety(Instruction inst) const { | 717 safety(Instruction inst) const { |
| 718 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 718 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 719 | 719 |
| 720 // true => MAY_BE_SAFE | 720 // true => MAY_BE_SAFE |
| 721 if (true) | 721 if (true) |
| 722 return MAY_BE_SAFE; | 722 return MAY_BE_SAFE; |
| 723 | 723 |
| 724 return MAY_BE_SAFE; | 724 return MAY_BE_SAFE; |
| 725 } | 725 } |
| 726 | 726 |
| 727 | 727 |
| 728 RegisterList Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 728 RegisterList Actual_BL_BLX_immediate_cccc1011iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 729 uses(Instruction inst) const { | 729 uses(Instruction inst) const { |
| 730 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 730 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 731 // uses: '{15}' | 731 // uses: '{15}' |
| 732 return RegisterList(). | 732 return RegisterList(). |
| 733 Add(Register(15)); | 733 Add(Register(15)); |
| 734 } | 734 } |
| 735 | 735 |
| 736 // Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1 | 736 // Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1 |
| 737 // | 737 // |
| 738 // Actual: | 738 // Actual: |
| 739 // {defs: {15}, | 739 // {defs: {15}, |
| 740 // relative: true, | 740 // relative: true, |
| 741 // relative_offset: SignExtend(inst(23:0):'00'(1:0), 32), | 741 // relative_offset: SignExtend(inst(23:0):'00'(1:0), 32) + 8, |
| 742 // safety: [true => MAY_BE_SAFE], | 742 // safety: [true => MAY_BE_SAFE], |
| 743 // uses: {15}} | 743 // uses: {15}} |
| 744 | 744 |
| 745 RegisterList Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 745 RegisterList Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 746 defs(Instruction inst) const { | 746 defs(Instruction inst) const { |
| 747 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 747 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 748 // defs: '{15}' | 748 // defs: '{15}' |
| 749 return RegisterList(). | 749 return RegisterList(). |
| 750 Add(Register(15)); | 750 Add(Register(15)); |
| 751 } | 751 } |
| 752 | 752 |
| 753 bool Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 753 bool Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 754 is_relative_branch(Instruction inst) const { | 754 is_relative_branch(Instruction inst) const { |
| 755 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 755 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 756 // relative: 'true' | 756 // relative: 'true' |
| 757 return true; | 757 return true; |
| 758 } | 758 } |
| 759 | 759 |
| 760 int32_t Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 760 int32_t Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 761 branch_target_offset(Instruction inst) const { | 761 branch_target_offset(Instruction inst) const { |
| 762 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 762 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 763 // relative_offset: "SignExtend(inst(23:0):'00'(1:0), 32)" | 763 // relative_offset: "SignExtend(inst(23:0):'00'(1:0), 32) + 8" |
| 764 return (((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) & 0x020000
00) | 764 return (((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) & 0x020000
00) |
| 765 ? ((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) | 0xFC00000
0) | 765 ? ((((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) | 0xFC00000
0) |
| 766 : ((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))); | 766 : ((((inst.Bits() & 0x00FFFFFF)) << 2) | (0 & 0x00000003))) + 8; |
| 767 } | 767 } |
| 768 | 768 |
| 769 SafetyLevel Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: | 769 SafetyLevel Actual_B_cccc1010iiiiiiiiiiiiiiiiiiiiiiii_case_1:: |
| 770 safety(Instruction inst) const { | 770 safety(Instruction inst) const { |
| 771 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 771 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 772 | 772 |
| 773 // true => MAY_BE_SAFE | 773 // true => MAY_BE_SAFE |
| 774 if (true) | 774 if (true) |
| 775 return MAY_BE_SAFE; | 775 return MAY_BE_SAFE; |
| 776 | 776 |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 // defs: Union({inst(19:16) | 1105 // defs: Union({inst(19:16) |
| 1106 // if inst(21)=1 | 1106 // if inst(21)=1 |
| 1107 // else 32}, RegisterList(inst(15:0))), | 1107 // else 32}, RegisterList(inst(15:0))), |
| 1108 // safety: [15 == | 1108 // safety: [15 == |
| 1109 // inst(19:16) || | 1109 // inst(19:16) || |
| 1110 // NumGPRs(RegisterList(inst(15:0))) < | 1110 // NumGPRs(RegisterList(inst(15:0))) < |
| 1111 // 1 => UNPREDICTABLE, | 1111 // 1 => UNPREDICTABLE, |
| 1112 // Contains(RegisterList(inst(15:0)), 15) => FORBIDDEN_OPERANDS, | 1112 // Contains(RegisterList(inst(15:0)), 15) => FORBIDDEN_OPERANDS, |
| 1113 // inst(21)=1 && | 1113 // inst(21)=1 && |
| 1114 // Contains(RegisterList(inst(15:0)), inst(19:16)) => UNKNOWN], | 1114 // Contains(RegisterList(inst(15:0)), inst(19:16)) => UNKNOWN], |
| 1115 // small_imm_base_wb: true, | 1115 // small_imm_base_wb: inst(21)=1, |
| 1116 // uses: {inst(19:16)}} | 1116 // uses: {inst(19:16)}} |
| 1117 | 1117 |
| 1118 Register Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: | 1118 Register Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 1119 base_address_register(Instruction inst) const { | 1119 base_address_register(Instruction inst) const { |
| 1120 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 1120 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 1121 // base: 'inst(19:16)' | 1121 // base: 'inst(19:16)' |
| 1122 return Register(((inst.Bits() & 0x000F0000) >> 16)); | 1122 return Register(((inst.Bits() & 0x000F0000) >> 16)); |
| 1123 } | 1123 } |
| 1124 | 1124 |
| 1125 RegisterList Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: | 1125 RegisterList Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 return FORBIDDEN_OPERANDS; | 1159 return FORBIDDEN_OPERANDS; |
| 1160 | 1160 |
| 1161 return MAY_BE_SAFE; | 1161 return MAY_BE_SAFE; |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 | 1164 |
| 1165 bool Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: | 1165 bool Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 1166 base_address_register_writeback_small_immediate( | 1166 base_address_register_writeback_small_immediate( |
| 1167 Instruction inst) const { | 1167 Instruction inst) const { |
| 1168 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 1168 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 1169 // small_imm_base_wb: 'true' | 1169 // small_imm_base_wb: 'inst(21)=1' |
| 1170 return true; | 1170 return (inst.Bits() & 0x00200000) == |
| 1171 0x00200000; |
| 1171 } | 1172 } |
| 1172 | 1173 |
| 1173 RegisterList Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: | 1174 RegisterList Actual_LDMDA_LDMFA_cccc100000w1nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 1174 uses(Instruction inst) const { | 1175 uses(Instruction inst) const { |
| 1175 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 1176 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 1176 // uses: '{inst(19:16)}' | 1177 // uses: '{inst(19:16)}' |
| 1177 return RegisterList(). | 1178 return RegisterList(). |
| 1178 Add(Register(((inst.Bits() & 0x000F0000) >> 16))); | 1179 Add(Register(((inst.Bits() & 0x000F0000) >> 16))); |
| 1179 } | 1180 } |
| 1180 | 1181 |
| (...skipping 2742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3923 // if inst(21)=1 | 3924 // if inst(21)=1 |
| 3924 // else 32}, | 3925 // else 32}, |
| 3925 // safety: [15 == | 3926 // safety: [15 == |
| 3926 // inst(19:16) || | 3927 // inst(19:16) || |
| 3927 // NumGPRs(RegisterList(inst(15:0))) < | 3928 // NumGPRs(RegisterList(inst(15:0))) < |
| 3928 // 1 => UNPREDICTABLE, | 3929 // 1 => UNPREDICTABLE, |
| 3929 // inst(21)=1 && | 3930 // inst(21)=1 && |
| 3930 // Contains(RegisterList(inst(15:0)), inst(19:16)) && | 3931 // Contains(RegisterList(inst(15:0)), inst(19:16)) && |
| 3931 // SmallestGPR(RegisterList(inst(15:0))) != | 3932 // SmallestGPR(RegisterList(inst(15:0))) != |
| 3932 // inst(19:16) => UNKNOWN], | 3933 // inst(19:16) => UNKNOWN], |
| 3933 // small_imm_base_wb: true, | 3934 // small_imm_base_wb: inst(21)=1, |
| 3934 // uses: Union({inst(19:16)}, RegisterList(inst(15:0)))} | 3935 // uses: Union({inst(19:16)}, RegisterList(inst(15:0)))} |
| 3935 | 3936 |
| 3936 Register Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: | 3937 Register Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 3937 base_address_register(Instruction inst) const { | 3938 base_address_register(Instruction inst) const { |
| 3938 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 3939 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 3939 // base: 'inst(19:16)' | 3940 // base: 'inst(19:16)' |
| 3940 return Register(((inst.Bits() & 0x000F0000) >> 16)); | 3941 return Register(((inst.Bits() & 0x000F0000) >> 16)); |
| 3941 } | 3942 } |
| 3942 | 3943 |
| 3943 RegisterList Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: | 3944 RegisterList Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3976 return UNKNOWN; | 3977 return UNKNOWN; |
| 3977 | 3978 |
| 3978 return MAY_BE_SAFE; | 3979 return MAY_BE_SAFE; |
| 3979 } | 3980 } |
| 3980 | 3981 |
| 3981 | 3982 |
| 3982 bool Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: | 3983 bool Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 3983 base_address_register_writeback_small_immediate( | 3984 base_address_register_writeback_small_immediate( |
| 3984 Instruction inst) const { | 3985 Instruction inst) const { |
| 3985 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 3986 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 3986 // small_imm_base_wb: 'true' | 3987 // small_imm_base_wb: 'inst(21)=1' |
| 3987 return true; | 3988 return (inst.Bits() & 0x00200000) == |
| 3989 0x00200000; |
| 3988 } | 3990 } |
| 3989 | 3991 |
| 3990 RegisterList Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: | 3992 RegisterList Actual_STMDA_STMED_cccc100000w0nnnnrrrrrrrrrrrrrrrr_case_1:: |
| 3991 uses(Instruction inst) const { | 3993 uses(Instruction inst) const { |
| 3992 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 3994 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 3993 // uses: 'Union({inst(19:16)}, RegisterList(inst(15:0)))' | 3995 // uses: 'Union({inst(19:16)}, RegisterList(inst(15:0)))' |
| 3994 return nacl_arm_dec::Union(RegisterList(). | 3996 return nacl_arm_dec::Union(RegisterList(). |
| 3995 Add(Register(((inst.Bits() & 0x000F0000) >> 16))), nacl_arm_dec::RegisterList
((inst.Bits() & 0x0000FFFF))); | 3997 Add(Register(((inst.Bits() & 0x000F0000) >> 16))), nacl_arm_dec::RegisterList
((inst.Bits() & 0x0000FFFF))); |
| 3996 } | 3998 } |
| 3997 | 3999 |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5283 | 5285 |
| 5284 | 5286 |
| 5285 RegisterList Actual_VABA_1111001u0dssnnnndddd0111nqm1mmmm_case_1:: | 5287 RegisterList Actual_VABA_1111001u0dssnnnndddd0111nqm1mmmm_case_1:: |
| 5286 uses(Instruction inst) const { | 5288 uses(Instruction inst) const { |
| 5287 UNREFERENCED_PARAMETER(inst); // To silence compiler. | 5289 UNREFERENCED_PARAMETER(inst); // To silence compiler. |
| 5288 // uses: '{}' | 5290 // uses: '{}' |
| 5289 return RegisterList(); | 5291 return RegisterList(); |
| 5290 } | 5292 } |
| 5291 | 5293 |
| 5292 } // namespace nacl_arm_dec | 5294 } // namespace nacl_arm_dec |
| OLD | NEW |