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 2023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2034 | 2034 |
2035 LOperand* value() { return inputs_[0]; } | 2035 LOperand* value() { return inputs_[0]; } |
2036 LOperand* temp() { return temps_[0]; } | 2036 LOperand* temp() { return temps_[0]; } |
2037 LOperand* temp2() { return temps_[1]; } | 2037 LOperand* temp2() { return temps_[1]; } |
2038 | 2038 |
2039 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") | 2039 DECLARE_CONCRETE_INSTRUCTION(NumberTagD, "number-tag-d") |
2040 DECLARE_HYDROGEN_ACCESSOR(Change) | 2040 DECLARE_HYDROGEN_ACCESSOR(Change) |
2041 }; | 2041 }; |
2042 | 2042 |
2043 | 2043 |
2044 class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 2044 class LDoubleToSmi V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2045 public: | 2045 public: |
2046 LDoubleToSmi(LOperand* value, LOperand* temp, LOperand* temp2) { | 2046 explicit LDoubleToSmi(LOperand* value) { |
2047 inputs_[0] = value; | 2047 inputs_[0] = value; |
2048 temps_[0] = temp; | |
2049 temps_[1] = temp2; | |
2050 } | 2048 } |
2051 | 2049 |
2052 LOperand* value() { return inputs_[0]; } | 2050 LOperand* value() { return inputs_[0]; } |
2053 LOperand* temp() { return temps_[0]; } | |
2054 LOperand* temp2() { return temps_[1]; } | |
2055 | 2051 |
2056 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") | 2052 DECLARE_CONCRETE_INSTRUCTION(DoubleToSmi, "double-to-smi") |
2057 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2053 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
2058 | 2054 |
2059 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2055 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
2060 }; | 2056 }; |
2061 | 2057 |
2062 | 2058 |
2063 // Sometimes truncating conversion from a tagged value to an int32. | 2059 // Sometimes truncating conversion from a tagged value to an int32. |
2064 class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 2> { | 2060 class LDoubleToI V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2065 public: | 2061 public: |
2066 LDoubleToI(LOperand* value, LOperand* temp, LOperand* temp2) { | 2062 explicit LDoubleToI(LOperand* value) { |
2067 inputs_[0] = value; | 2063 inputs_[0] = value; |
2068 temps_[0] = temp; | |
2069 temps_[1] = temp2; | |
2070 } | 2064 } |
2071 | 2065 |
2072 LOperand* value() { return inputs_[0]; } | 2066 LOperand* value() { return inputs_[0]; } |
2073 LOperand* temp() { return temps_[0]; } | |
2074 LOperand* temp2() { return temps_[1]; } | |
2075 | 2067 |
2076 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") | 2068 DECLARE_CONCRETE_INSTRUCTION(DoubleToI, "double-to-i") |
2077 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2069 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
2078 | 2070 |
2079 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2071 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
2080 }; | 2072 }; |
2081 | 2073 |
2082 | 2074 |
2083 // Truncating conversion from a tagged value to an int32. | 2075 // Truncating conversion from a tagged value to an int32. |
2084 class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 3> { | 2076 class LTaggedToI V8_FINAL : public LTemplateInstruction<1, 1, 2> { |
2085 public: | 2077 public: |
2086 LTaggedToI(LOperand* value, | 2078 LTaggedToI(LOperand* value, |
2087 LOperand* temp, | 2079 LOperand* temp, |
2088 LOperand* temp2, | 2080 LOperand* temp2) { |
2089 LOperand* temp3) { | |
2090 inputs_[0] = value; | 2081 inputs_[0] = value; |
2091 temps_[0] = temp; | 2082 temps_[0] = temp; |
2092 temps_[1] = temp2; | 2083 temps_[1] = temp2; |
2093 temps_[2] = temp3; | |
2094 } | 2084 } |
2095 | 2085 |
2096 LOperand* value() { return inputs_[0]; } | 2086 LOperand* value() { return inputs_[0]; } |
2097 LOperand* temp() { return temps_[0]; } | 2087 LOperand* temp() { return temps_[0]; } |
2098 LOperand* temp2() { return temps_[1]; } | 2088 LOperand* temp2() { return temps_[1]; } |
2099 LOperand* temp3() { return temps_[2]; } | |
2100 | 2089 |
2101 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") | 2090 DECLARE_CONCRETE_INSTRUCTION(TaggedToI, "tagged-to-i") |
2102 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) | 2091 DECLARE_HYDROGEN_ACCESSOR(UnaryOperation) |
2103 | 2092 |
2104 bool truncating() { return hydrogen()->CanTruncateToInt32(); } | 2093 bool truncating() { return hydrogen()->CanTruncateToInt32(); } |
2105 }; | 2094 }; |
2106 | 2095 |
2107 | 2096 |
2108 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { | 2097 class LSmiTag V8_FINAL : public LTemplateInstruction<1, 1, 0> { |
2109 public: | 2098 public: |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2771 | 2760 |
2772 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2761 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2773 }; | 2762 }; |
2774 | 2763 |
2775 #undef DECLARE_HYDROGEN_ACCESSOR | 2764 #undef DECLARE_HYDROGEN_ACCESSOR |
2776 #undef DECLARE_CONCRETE_INSTRUCTION | 2765 #undef DECLARE_CONCRETE_INSTRUCTION |
2777 | 2766 |
2778 } } // namespace v8::internal | 2767 } } // namespace v8::internal |
2779 | 2768 |
2780 #endif // V8_MIPS_LITHIUM_MIPS_H_ | 2769 #endif // V8_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |