OLD | NEW |
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 ToInteger32Immediate(LOperand* op) const { |
116 return Immediate(ToInteger32(LConstantOperand::cast(op))); | 116 return Immediate(ToInteger32(LConstantOperand::cast(op))); |
117 } | 117 } |
| 118 Immediate ToSmiImmediate(LOperand* op) const { |
| 119 return Immediate(Smi::FromInt(ToInteger32(LConstantOperand::cast(op)))); |
| 120 } |
118 | 121 |
119 // Support for non-sse2 (x87) floating point stack handling. | 122 // Support for non-sse2 (x87) floating point stack handling. |
120 // These functions maintain the depth of the stack (either 0 or 1) | 123 // These functions maintain the depth of the stack (either 0 or 1) |
121 void PushX87DoubleOperand(Operand src); | 124 void PushX87DoubleOperand(Operand src); |
122 void PushX87FloatOperand(Operand src); | 125 void PushX87FloatOperand(Operand src); |
123 void ReadX87Operand(Operand dst); | 126 void ReadX87Operand(Operand dst); |
124 bool X87StackNonEmpty() const { return x87_stack_depth_ > 0; } | 127 bool X87StackNonEmpty() const { return x87_stack_depth_ > 0; } |
125 void PopX87(); | 128 void PopX87(); |
126 void CurrentInstructionReturnsX87Result(); | 129 void CurrentInstructionReturnsX87Result(); |
127 void FlushX87StackIfNecessary(LInstruction* instr); | 130 void FlushX87StackIfNecessary(LInstruction* instr); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 LCodeGen* codegen_; | 486 LCodeGen* codegen_; |
484 Label entry_; | 487 Label entry_; |
485 Label exit_; | 488 Label exit_; |
486 Label* external_exit_; | 489 Label* external_exit_; |
487 int instruction_index_; | 490 int instruction_index_; |
488 }; | 491 }; |
489 | 492 |
490 } } // namespace v8::internal | 493 } } // namespace v8::internal |
491 | 494 |
492 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ | 495 #endif // V8_IA32_LITHIUM_CODEGEN_IA32_H_ |
OLD | NEW |