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

Side by Side Diff: src/ia32/lithium-codegen-ia32.h

Issue 20070005: Adding Smi support to Add, Sub, Mul, and Bitwise (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed nit Created 7 years, 5 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/hydrogen-representation-changes.cc ('k') | src/ia32/lithium-codegen-ia32.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 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 } 102 }
103 103
104 // Support for converting LOperands to assembler types. 104 // Support for converting LOperands to assembler types.
105 Operand ToOperand(LOperand* op) const; 105 Operand ToOperand(LOperand* op) const;
106 Register ToRegister(LOperand* op) const; 106 Register ToRegister(LOperand* op) const;
107 XMMRegister ToDoubleRegister(LOperand* op) const; 107 XMMRegister ToDoubleRegister(LOperand* op) const;
108 X87Register ToX87Register(LOperand* op) const; 108 X87Register ToX87Register(LOperand* op) const;
109 109
110 bool IsInteger32(LConstantOperand* op) const; 110 bool IsInteger32(LConstantOperand* op) const;
111 bool IsSmi(LConstantOperand* op) const; 111 bool IsSmi(LConstantOperand* op) const;
112 Immediate ToInteger32Immediate(LOperand* op) const { 112 Immediate ToImmediate(LOperand* op, const Representation& r) const {
113 return Immediate(ToInteger32(LConstantOperand::cast(op))); 113 return Immediate(ToRepresentation(LConstantOperand::cast(op), r));
114 }
115 Immediate ToSmiImmediate(LOperand* op) const {
116 return Immediate(Smi::FromInt(ToInteger32(LConstantOperand::cast(op))));
117 } 114 }
118 double ToDouble(LConstantOperand* op) const; 115 double ToDouble(LConstantOperand* op) const;
119 116
120 // Support for non-sse2 (x87) floating point stack handling. 117 // Support for non-sse2 (x87) floating point stack handling.
121 // These functions maintain the mapping of physical stack registers to our 118 // These functions maintain the mapping of physical stack registers to our
122 // virtual registers between instructions. 119 // virtual registers between instructions.
123 enum X87OperandType { kX87DoubleOperand, kX87FloatOperand, kX87IntOperand }; 120 enum X87OperandType { kX87DoubleOperand, kX87FloatOperand, kX87IntOperand };
124 121
125 void X87Mov(X87Register reg, Operand src, 122 void X87Mov(X87Register reg, Operand src,
126 X87OperandType operand = kX87DoubleOperand); 123 X87OperandType operand = kX87DoubleOperand);
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 bool is_uint32); 287 bool is_uint32);
291 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); 288 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code);
292 void PopulateDeoptimizationData(Handle<Code> code); 289 void PopulateDeoptimizationData(Handle<Code> code);
293 int DefineDeoptimizationLiteral(Handle<Object> literal); 290 int DefineDeoptimizationLiteral(Handle<Object> literal);
294 291
295 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); 292 void PopulateDeoptimizationLiteralsWithInlinedFunctions();
296 293
297 Register ToRegister(int index) const; 294 Register ToRegister(int index) const;
298 XMMRegister ToDoubleRegister(int index) const; 295 XMMRegister ToDoubleRegister(int index) const;
299 X87Register ToX87Register(int index) const; 296 X87Register ToX87Register(int index) const;
300 int ToInteger32(LConstantOperand* op) const; 297 int ToRepresentation(LConstantOperand* op, const Representation& r) const;
298 int32_t ToInteger32(LConstantOperand* op) const;
301 299
302 Operand BuildFastArrayOperand(LOperand* elements_pointer, 300 Operand BuildFastArrayOperand(LOperand* elements_pointer,
303 LOperand* key, 301 LOperand* key,
304 Representation key_representation, 302 Representation key_representation,
305 ElementsKind elements_kind, 303 ElementsKind elements_kind,
306 uint32_t offset, 304 uint32_t offset,
307 uint32_t additional_index = 0); 305 uint32_t additional_index = 0);
308 306
309 void EmitIntegerMathAbs(LMathAbs* instr); 307 void EmitIntegerMathAbs(LMathAbs* instr);
310 308
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 LCodeGen* codegen_; 492 LCodeGen* codegen_;
495 Label entry_; 493 Label entry_;
496 Label exit_; 494 Label exit_;
497 Label* external_exit_; 495 Label* external_exit_;
498 int instruction_index_; 496 int instruction_index_;
499 }; 497 };
500 498
501 } } // namespace v8::internal 499 } } // namespace v8::internal
502 500
503 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 501 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW
« no previous file with comments | « src/hydrogen-representation-changes.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698