OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 return Immediate(static_cast<int32_t>(literal->Number())); | 243 return Immediate(static_cast<int32_t>(literal->Number())); |
244 } else if (r.IsDouble()) { | 244 } else if (r.IsDouble()) { |
245 Abort("unsupported double immediate"); | 245 Abort("unsupported double immediate"); |
246 } | 246 } |
247 ASSERT(r.IsTagged()); | 247 ASSERT(r.IsTagged()); |
248 return Immediate(literal); | 248 return Immediate(literal); |
249 } | 249 } |
250 | 250 |
251 | 251 |
252 Operand LCodeGen::ToOperand(LOperand* op) const { | 252 Operand LCodeGen::ToOperand(LOperand* op) const { |
253 if (op->IsRegister()) return Operand(ToRegister(op)); | 253 ASSERT(!op->IsRegister()); |
254 if (op->IsDoubleRegister()) return Operand(ToDoubleRegister(op)); | 254 ASSERT(!op->IsDoubleRegister()); |
255 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); | 255 ASSERT(op->IsStackSlot() || op->IsDoubleStackSlot()); |
256 int index = op->index(); | 256 int index = op->index(); |
257 if (index >= 0) { | 257 if (index >= 0) { |
258 // Local or spill slot. Skip the frame pointer, function, and | 258 // Local or spill slot. Skip the frame pointer, function, and |
259 // context in the fixed part of the frame. | 259 // context in the fixed part of the frame. |
260 return Operand(ebp, -(index + 3) * kPointerSize); | 260 return Operand(ebp, -(index + 3) * kPointerSize); |
261 } else { | 261 } else { |
262 // Incoming parameter. Skip the return address. | 262 // Incoming parameter. Skip the return address. |
263 return Operand(ebp, -(index - 1) * kPointerSize); | 263 return Operand(ebp, -(index - 1) * kPointerSize); |
264 } | 264 } |
(...skipping 3216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3481 ASSERT(osr_pc_offset_ == -1); | 3481 ASSERT(osr_pc_offset_ == -1); |
3482 osr_pc_offset_ = masm()->pc_offset(); | 3482 osr_pc_offset_ = masm()->pc_offset(); |
3483 } | 3483 } |
3484 | 3484 |
3485 | 3485 |
3486 #undef __ | 3486 #undef __ |
3487 | 3487 |
3488 } } // namespace v8::internal | 3488 } } // namespace v8::internal |
3489 | 3489 |
3490 #endif // V8_TARGET_ARCH_IA32 | 3490 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |