Chromium Code Reviews| 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 17 matching lines...) Expand all Loading... | |
| 28 #include "v8.h" | 28 #include "v8.h" |
| 29 #include "lithium.h" | 29 #include "lithium.h" |
| 30 #include "scopes.h" | 30 #include "scopes.h" |
| 31 | 31 |
| 32 #if V8_TARGET_ARCH_IA32 | 32 #if V8_TARGET_ARCH_IA32 |
| 33 #include "ia32/lithium-ia32.h" | 33 #include "ia32/lithium-ia32.h" |
| 34 #include "ia32/lithium-codegen-ia32.h" | 34 #include "ia32/lithium-codegen-ia32.h" |
| 35 #elif V8_TARGET_ARCH_X64 | 35 #elif V8_TARGET_ARCH_X64 |
| 36 #include "x64/lithium-x64.h" | 36 #include "x64/lithium-x64.h" |
| 37 #include "x64/lithium-codegen-x64.h" | 37 #include "x64/lithium-codegen-x64.h" |
| 38 #elif V8_TARGET_ARCH_X32 | |
| 39 #include "x32/lithium-x32.h" | |
| 40 #include "x32/lithium-codegen-x32.h" | |
| 38 #elif V8_TARGET_ARCH_ARM | 41 #elif V8_TARGET_ARCH_ARM |
| 39 #include "arm/lithium-arm.h" | 42 #include "arm/lithium-arm.h" |
| 40 #include "arm/lithium-codegen-arm.h" | 43 #include "arm/lithium-codegen-arm.h" |
| 41 #elif V8_TARGET_ARCH_MIPS | 44 #elif V8_TARGET_ARCH_MIPS |
| 42 #include "mips/lithium-mips.h" | 45 #include "mips/lithium-mips.h" |
| 43 #include "mips/lithium-codegen-mips.h" | 46 #include "mips/lithium-codegen-mips.h" |
| 44 #else | 47 #else |
| 45 #error "Unknown architecture." | 48 #error "Unknown architecture." |
| 46 #endif | 49 #endif |
| 47 | 50 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 262 return 0; | 265 return 0; |
| 263 } | 266 } |
| 264 | 267 |
| 265 | 268 |
| 266 int StackSlotOffset(int index) { | 269 int StackSlotOffset(int index) { |
| 267 if (index >= 0) { | 270 if (index >= 0) { |
| 268 // Local or spill slot. Skip the frame pointer, function, and | 271 // Local or spill slot. Skip the frame pointer, function, and |
| 269 // context in the fixed part of the frame. | 272 // context in the fixed part of the frame. |
| 270 return -(index + 3) * kPointerSize; | 273 return -(index + 3) * kPointerSize; |
| 271 } else { | 274 } else { |
| 275 #ifndef V8_TARGET_ARCH_X32 | |
|
danno
2013/07/17 13:33:21
Eliminate this ifdef through use of constants disc
| |
| 272 // Incoming parameter. Skip the return address. | 276 // Incoming parameter. Skip the return address. |
| 273 return -(index - 1) * kPointerSize; | 277 return -(index - 1) * kPointerSize; |
| 278 #else | |
| 279 return -index * kPointerSize - 1 * kPointerSize + 2 * kHWRegSize; | |
| 280 #endif | |
| 274 } | 281 } |
| 275 } | 282 } |
| 276 | 283 |
| 277 | 284 |
| 278 LChunk::LChunk(CompilationInfo* info, HGraph* graph) | 285 LChunk::LChunk(CompilationInfo* info, HGraph* graph) |
| 279 : spill_slot_count_(0), | 286 : spill_slot_count_(0), |
| 280 info_(info), | 287 info_(info), |
| 281 graph_(graph), | 288 graph_(graph), |
| 282 instructions_(32, graph->zone()), | 289 instructions_(32, graph->zone()), |
| 283 pointer_maps_(8, graph->zone()), | 290 pointer_maps_(8, graph->zone()), |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 492 | 499 |
| 493 | 500 |
| 494 LPhase::~LPhase() { | 501 LPhase::~LPhase() { |
| 495 if (ShouldProduceTraceOutput()) { | 502 if (ShouldProduceTraceOutput()) { |
| 496 isolate()->GetHTracer()->TraceLithium(name(), chunk_); | 503 isolate()->GetHTracer()->TraceLithium(name(), chunk_); |
| 497 } | 504 } |
| 498 } | 505 } |
| 499 | 506 |
| 500 | 507 |
| 501 } } // namespace v8::internal | 508 } } // namespace v8::internal |
| OLD | NEW |