| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2021 | 2021 |
| 2022 LOperand* value() { return inputs_[0]; } | 2022 LOperand* value() { return inputs_[0]; } |
| 2023 LOperand* temp() { return temps_[0]; } | 2023 LOperand* temp() { return temps_[0]; } |
| 2024 LOperand* temp2() { return temps_[1]; } | 2024 LOperand* temp2() { return temps_[1]; } |
| 2025 | 2025 |
| 2026 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 2026 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
| 2027 DECLARE_HYDROGEN_ACCESSOR(Change) | 2027 DECLARE_HYDROGEN_ACCESSOR(Change) |
| 2028 }; | 2028 }; |
| 2029 | 2029 |
| 2030 | 2030 |
| 2031 class LDoubleToSmi: public LTemplateInstruction<1, 1, 2> { | 2031 class LDoubleToSmi: public LTemplateInstruction<1, 1, 0> { |
| 2032 public: | 2032 public: |
| 2033 LDoubleToSmi(LOperand* value, LOperand* temp, LOperand* temp2) { | 2033 explicit LDoubleToSmi(LOperand* value) { |
| 2034 inputs_[0] = value; | 2034 inputs_[0] = value; |
| 2035 temps_[0] = temp; | |
| 2036 temps_[1] = temp2; | |
| 2037 } | 2035 } |
| 2038 | 2036 |
| 2039 LOperand* value() { return inputs_[0]; } | 2037 LOperand* value() { return inputs_[0]; } |
| 2040 LOperand* temp() { return temps_[0]; } | |
| 2041 LOperand* temp2() { return temps_[1]; } | |
| 2042 | 2038 |
| 2043 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") | 2039 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") |
| 2044 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2040 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
| 2045 | 2041 |
| 2046 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2042 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
| 2047 }; | 2043 }; |
| 2048 | 2044 |
| 2049 | 2045 |
| 2050 // Sometimes truncating conversion from a tagged value to an int32. | 2046 // Sometimes truncating conversion from a tagged value to an int32. |
| 2051 class LDoubleToI: public LTemplateInstruction<1, 1, 2> { | 2047 class LDoubleToI: public LTemplateInstruction<1, 1, 0> { |
| 2052 public: | 2048 public: |
| 2053 LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { | 2049 explicit LDoubleToI(LOperand* value) { |
| 2054 inputs_[0] = value; | 2050 inputs_[0] = value; |
| 2055 temps_[0] = temp; | |
| 2056 temps_[1] = temp2; | |
| 2057 } | 2051 } |
| 2058 | 2052 |
| 2059 LOperand* value() { return inputs_[0]; } | 2053 LOperand* value() { return inputs_[0]; } |
| 2060 LOperand* temp() { return temps_[0]; } | |
| 2061 LOperand* temp2() { return temps_[1]; } | |
| 2062 | 2054 |
| 2063 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") | 2055 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") |
| 2064 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2056 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
| 2065 | 2057 |
| 2066 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2058 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
| 2067 }; | 2059 }; |
| 2068 | 2060 |
| 2069 | 2061 |
| 2070 // Truncating conversion from a tagged value to an int32. | 2062 // Truncating conversion from a tagged value to an int32. |
| 2071 class LTaggedToI: public LTemplateInstruction<1, 1, 3> { | 2063 class LTaggedToI: public LTemplateInstruction<1, 1, 2> { |
| 2072 public: | 2064 public: |
| 2073 LTaggedToI(LOperand* value, | 2065 LTaggedToI(LOperand* value, |
| 2074 LOperand* temp, | 2066 LOperand* temp, |
| 2075 LOperand* temp2, | 2067 LOperand* temp2) { |
| 2076 LOperand* temp3) { | |
| 2077 inputs_[0] = value; | 2068 inputs_[0] = value; |
| 2078 temps_[0] = temp; | 2069 temps_[0] = temp; |
| 2079 temps_[1] = temp2; | 2070 temps_[1] = temp2; |
| 2080 temps_[2] = temp3; | |
| 2081 } | 2071 } |
| 2082 | 2072 |
| 2083 LOperand* value() { return inputs_[0]; } | 2073 LOperand* value() { return inputs_[0]; } |
| 2084 LOperand* temp() { return temps_[0]; } | 2074 LOperand* temp() { return temps_[0]; } |
| 2085 LOperand* temp2() { return temps_[1]; } | 2075 LOperand* temp2() { return temps_[1]; } |
| 2086 LOperand* temp3() { return temps_[2]; } | |
| 2087 | 2076 |
| 2088 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 2077 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
| 2089 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2078 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
| 2090 | 2079 |
| 2091 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2080 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
| 2092 }; | 2081 }; |
| 2093 | 2082 |
| 2094 | 2083 |
| 2095 class LSmiTag: public LTemplateInstruction<1, 1, 0> { | 2084 class LSmiTag: public LTemplateInstruction<1, 1, 0> { |
| 2096 public: | 2085 public: |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2761 | 2750 |
| 2762 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2751 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
| 2763 }; | 2752 }; |
| 2764 | 2753 |
| 2765 #undef DECLARE_HYDROGEN_ACCESSOR | 2754 #undef DECLARE_HYDROGEN_ACCESSOR |
| 2766 #undef DECLARE_CONCRETE_INSTRUCTION | 2755 #undef DECLARE_CONCRETE_INSTRUCTION |
| 2767 | 2756 |
| 2768 } } // namespace v8::internal | 2757 } } // namespace v8::internal |
| 2769 | 2758 |
| 2770 #endif // V8_ARM_LITHIUM_ARM_H_ | 2759 #endif // V8_ARM_LITHIUM_ARM_H_ |
| OLD | NEW |