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

Unified Diff: runtime/vm/intermediate_language.h

Issue 11027060: Faster 64-bit right-shift for the ia32 compiler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 13286)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -259,6 +259,7 @@
M(UnboxInteger) \
M(BoxInteger) \
M(BinaryMintOp) \
+ M(ShiftMintOp) \
M(UnaryMintOp) \
M(CheckArrayBound) \
M(Constraint) \
@@ -516,6 +517,7 @@
friend class UnboxDoubleInstr;
friend class BinaryDoubleOpInstr;
friend class BinaryMintOpInstr;
+ friend class ShiftMintOpInstr;
friend class UnaryMintOpInstr;
friend class MathSqrtInstr;
friend class CheckClassInstr;
@@ -3584,6 +3586,65 @@
};
+class ShiftMintOpInstr : public TemplateDefinition<2> {
+ public:
+ ShiftMintOpInstr(Token::Kind op_kind,
+ Value* left,
+ Value* right,
+ InstanceCallInstr* instance_call)
+ : op_kind_(op_kind) {
+ ASSERT(left != NULL);
+ ASSERT(right != NULL);
+ ASSERT(op_kind == Token::kSHR);
+ inputs_[0] = left;
+ inputs_[1] = right;
+ deopt_id_ = instance_call->deopt_id();
+ }
+
+ Value* left() const { return inputs_[0]; }
+ Value* right() const { return inputs_[1]; }
+
+ Token::Kind op_kind() const { return op_kind_; }
+
+ virtual void PrintOperandsTo(BufferFormatter* f) const;
+
+ virtual bool CanDeoptimize() const { return true; }
+
+ virtual bool HasSideEffect() const { return false; }
+
+ virtual bool AffectedBySideEffect() const { return false; }
+
+ virtual bool AttributesEqual(Instruction* other) const {
+ return op_kind() == other->AsShiftMintOp()->op_kind();
+ }
+
+ virtual intptr_t ResultCid() const;
+ virtual RawAbstractType* CompileType() const;
+
+ virtual Representation representation() const {
+ return kUnboxedMint;
+ }
+
+ virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+ ASSERT((idx == 0) || (idx == 1));
+ return (idx == 0) ? kUnboxedMint : kTagged;
+ }
+
+ virtual intptr_t DeoptimizationTarget() const {
+ // Direct access since this instuction cannot deoptimize, and the deopt-id
+ // was inherited from another instuction that could deoptimize.
+ return deopt_id_;
+ }
+
+ DECLARE_INSTRUCTION(ShiftMintOp)
+
+ private:
+ const Token::Kind op_kind_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShiftMintOpInstr);
+};
+
+
class UnaryMintOpInstr : public TemplateDefinition<1> {
public:
UnaryMintOpInstr(Token::Kind op_kind,
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698