Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: src/a64/lithium-a64.h

Issue 204583002: Implement flooring division by a constant via truncating division by a constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/a64/lithium-a64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 1949
1950 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I, 1950 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByPowerOf2I,
1951 "flooring-div-by-power-of-2-i") 1951 "flooring-div-by-power-of-2-i")
1952 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 1952 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
1953 1953
1954 private: 1954 private:
1955 int32_t divisor_; 1955 int32_t divisor_;
1956 }; 1956 };
1957 1957
1958 1958
1959 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 0> { 1959 class LFlooringDivByConstI V8_FINAL : public LTemplateInstruction<1, 1, 2> {
1960 public: 1960 public:
1961 LFlooringDivByConstI(LOperand* dividend, int32_t divisor) { 1961 LFlooringDivByConstI(LOperand* dividend, int32_t divisor, LOperand* temp) {
1962 inputs_[0] = dividend; 1962 inputs_[0] = dividend;
1963 divisor_ = divisor; 1963 divisor_ = divisor;
1964 temps_[0] = temp;
1964 } 1965 }
1965 1966
1966 LOperand* dividend() { return inputs_[0]; } 1967 LOperand* dividend() { return inputs_[0]; }
1967 int32_t divisor() const { return divisor_; } 1968 int32_t divisor() const { return divisor_; }
1968 LOperand* temp1() { return temps_[0]; } 1969 LOperand* temp() { return temps_[0]; }
1969 1970
1970 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i") 1971 DECLARE_CONCRETE_INSTRUCTION(FlooringDivByConstI, "flooring-div-by-const-i")
1971 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv) 1972 DECLARE_HYDROGEN_ACCESSOR(MathFloorOfDiv)
1972 1973
1973 private: 1974 private:
1974 int32_t divisor_; 1975 int32_t divisor_;
1975 }; 1976 };
1976 1977
1977 1978
1978 class LFlooringDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> { 1979 class LFlooringDivI V8_FINAL : public LTemplateInstruction<1, 2, 1> {
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
3090 3091
3091 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 3092 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
3092 }; 3093 };
3093 3094
3094 #undef DECLARE_HYDROGEN_ACCESSOR 3095 #undef DECLARE_HYDROGEN_ACCESSOR
3095 #undef DECLARE_CONCRETE_INSTRUCTION 3096 #undef DECLARE_CONCRETE_INSTRUCTION
3096 3097
3097 } } // namespace v8::internal 3098 } } // namespace v8::internal
3098 3099
3099 #endif // V8_A64_LITHIUM_A64_H_ 3100 #endif // V8_A64_LITHIUM_A64_H_
OLDNEW
« no previous file with comments | « no previous file | src/a64/lithium-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698