OLD | NEW |
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 #include "native_client/src/trusted/validator_arm/actual_classes.h" | 7 #include "native_client/src/trusted/validator_arm/actual_classes.h" |
8 | 8 |
9 #include <assert.h> | 9 #include <assert.h> |
10 #include <string.h> | 10 #include <string.h> |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 | 771 |
772 RegisterList Unary1RegisterUse::defs(const Instruction i) const { | 772 RegisterList Unary1RegisterUse::defs(const Instruction i) const { |
773 return RegisterList((mask.value(i) < 2) ? | 773 return RegisterList((mask.value(i) < 2) ? |
774 Register::None() : Register::Conditions()); | 774 Register::None() : Register::Conditions()); |
775 } | 775 } |
776 | 776 |
777 RegisterList Unary1RegisterUse::uses(const Instruction i) const { | 777 RegisterList Unary1RegisterUse::uses(const Instruction i) const { |
778 return RegisterList(n.reg(i)); | 778 return RegisterList(n.reg(i)); |
779 } | 779 } |
780 | 780 |
781 // Unary1RegisterBitRangeMsbGeLsb | |
782 SafetyLevel Unary1RegisterBitRangeMsbGeLsb::safety(Instruction i) const { | |
783 if (d.reg(i).Equals(Register::Pc()) || | |
784 msb.value(i) < lsb.value(i)) | |
785 return UNPREDICTABLE; | |
786 | |
787 // Note: We would restrict out PC as well for Rd in NaCl, but no need | |
788 // since the ARM restriction doesn't allow it anyway. | |
789 return MAY_BE_SAFE; | |
790 } | |
791 | |
792 RegisterList Unary1RegisterBitRangeMsbGeLsb::defs(Instruction i) const { | |
793 return RegisterList(d.reg(i)); | |
794 } | |
795 | |
796 } // namespace nacl_arm_dec | 781 } // namespace nacl_arm_dec |
OLD | NEW |