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

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

Issue 16206004: Add smi support to all binops minus shr, sar, shl, div and mod. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 105 }
106 106
107 // Support for converting LOperands to assembler types. 107 // Support for converting LOperands to assembler types.
108 Operand ToOperand(LOperand* op) const; 108 Operand ToOperand(LOperand* op) const;
109 Register ToRegister(LOperand* op) const; 109 Register ToRegister(LOperand* op) const;
110 XMMRegister ToDoubleRegister(LOperand* op) const; 110 XMMRegister ToDoubleRegister(LOperand* op) const;
111 bool IsX87TopOfStack(LOperand* op) const; 111 bool IsX87TopOfStack(LOperand* op) const;
112 112
113 bool IsInteger32(LConstantOperand* op) const; 113 bool IsInteger32(LConstantOperand* op) const;
114 bool IsSmi(LConstantOperand* op) const; 114 bool IsSmi(LConstantOperand* op) const;
115 Immediate ToInteger32Immediate(LOperand* op) const { 115 Immediate ToImmediate(LOperand* op, const Representation& r) const {
116 return Immediate(ToInteger32(LConstantOperand::cast(op))); 116 return Immediate(ToRepresentation(LConstantOperand::cast(op), r));
117 }
118 Immediate ToSmiImmediate(LOperand* op) const {
119 return Immediate(Smi::FromInt(ToInteger32(LConstantOperand::cast(op))));
120 } 117 }
121 118
122 // Support for non-sse2 (x87) floating point stack handling. 119 // Support for non-sse2 (x87) floating point stack handling.
123 // These functions maintain the depth of the stack (either 0 or 1) 120 // These functions maintain the depth of the stack (either 0 or 1)
124 void PushX87DoubleOperand(Operand src); 121 void PushX87DoubleOperand(Operand src);
125 void PushX87FloatOperand(Operand src); 122 void PushX87FloatOperand(Operand src);
126 void ReadX87Operand(Operand dst); 123 void ReadX87Operand(Operand dst);
127 bool X87StackNonEmpty() const { return x87_stack_depth_ > 0; } 124 bool X87StackNonEmpty() const { return x87_stack_depth_ > 0; }
128 void PopX87(); 125 void PopX87();
129 void CurrentInstructionReturnsX87Result(); 126 void CurrentInstructionReturnsX87Result();
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 int arguments_index, 289 int arguments_index,
293 int arguments_count); 290 int arguments_count);
294 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code); 291 void RegisterDependentCodeForEmbeddedMaps(Handle<Code> code);
295 void PopulateDeoptimizationData(Handle<Code> code); 292 void PopulateDeoptimizationData(Handle<Code> code);
296 int DefineDeoptimizationLiteral(Handle<Object> literal); 293 int DefineDeoptimizationLiteral(Handle<Object> literal);
297 294
298 void PopulateDeoptimizationLiteralsWithInlinedFunctions(); 295 void PopulateDeoptimizationLiteralsWithInlinedFunctions();
299 296
300 Register ToRegister(int index) const; 297 Register ToRegister(int index) const;
301 XMMRegister ToDoubleRegister(int index) const; 298 XMMRegister ToDoubleRegister(int index) const;
299 int ToRepresentation(LConstantOperand* op, const Representation& r) const;
302 int ToInteger32(LConstantOperand* op) const; 300 int ToInteger32(LConstantOperand* op) const;
303 301
304 double ToDouble(LConstantOperand* op) const; 302 double ToDouble(LConstantOperand* op) const;
305 Operand BuildFastArrayOperand(LOperand* elements_pointer, 303 Operand BuildFastArrayOperand(LOperand* elements_pointer,
306 LOperand* key, 304 LOperand* key,
307 Representation key_representation, 305 Representation key_representation,
308 ElementsKind elements_kind, 306 ElementsKind elements_kind,
309 uint32_t offset, 307 uint32_t offset,
310 uint32_t additional_index = 0); 308 uint32_t additional_index = 0);
311 309
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 LCodeGen* codegen_; 483 LCodeGen* codegen_;
486 Label entry_; 484 Label entry_;
487 Label exit_; 485 Label exit_;
488 Label* external_exit_; 486 Label* external_exit_;
489 int instruction_index_; 487 int instruction_index_;
490 }; 488 };
491 489
492 } } // namespace v8::internal 490 } } // namespace v8::internal
493 491
494 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ 492 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698