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

Side by Side Diff: src/assembler.h

Issue 190383002: Handle non-power-of-2 divisors in division-like operations (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 | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after
1030 }; 1030 };
1031 1031
1032 class NullCallWrapper : public CallWrapper { 1032 class NullCallWrapper : public CallWrapper {
1033 public: 1033 public:
1034 NullCallWrapper() { } 1034 NullCallWrapper() { }
1035 virtual ~NullCallWrapper() { } 1035 virtual ~NullCallWrapper() { }
1036 virtual void BeforeCall(int call_size) const { } 1036 virtual void BeforeCall(int call_size) const { }
1037 virtual void AfterCall() const { } 1037 virtual void AfterCall() const { }
1038 }; 1038 };
1039 1039
1040
1041 // The multiplier and shift for signed division via multiplication, see Warren's
1042 // "Hacker's Delight", chapter 10.
1043 class MultiplierAndShift {
1044 public:
1045 explicit MultiplierAndShift(int32_t d);
1046 int32_t multiplier() const { return multiplier_; }
1047 int32_t shift() const { return shift_; }
1048
1049 private:
1050 int32_t multiplier_;
1051 int32_t shift_;
1052 };
1053
1054
1040 } } // namespace v8::internal 1055 } } // namespace v8::internal
1041 1056
1042 #endif // V8_ASSEMBLER_H_ 1057 #endif // V8_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698