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

Side by Side Diff: src/arm/lithium-arm.h

Issue 142813003: A64: Synchronize with r15358. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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/arm/ic-arm.cc ('k') | src/arm/lithium-arm.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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \ 43 #define LITHIUM_ALL_INSTRUCTION_LIST(V) \
44 V(ControlInstruction) \ 44 V(ControlInstruction) \
45 V(Call) \ 45 V(Call) \
46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V) 46 LITHIUM_CONCRETE_INSTRUCTION_LIST(V)
47 47
48 48
49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \ 49 #define LITHIUM_CONCRETE_INSTRUCTION_LIST(V) \
50 V(AccessArgumentsAt) \ 50 V(AccessArgumentsAt) \
51 V(AddI) \ 51 V(AddI) \
52 V(AllocateObject) \
52 V(Allocate) \ 53 V(Allocate) \
53 V(ApplyArguments) \ 54 V(ApplyArguments) \
54 V(ArgumentsElements) \ 55 V(ArgumentsElements) \
55 V(ArgumentsLength) \ 56 V(ArgumentsLength) \
56 V(ArithmeticD) \ 57 V(ArithmeticD) \
57 V(ArithmeticT) \ 58 V(ArithmeticT) \
58 V(BitI) \ 59 V(BitI) \
59 V(BitNotI) \ 60 V(BitNotI) \
60 V(BoundsCheck) \ 61 V(BoundsCheck) \
61 V(Branch) \ 62 V(Branch) \
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> { 483 class LUnknownOSRValue: public LTemplateInstruction<1, 0, 0> {
483 public: 484 public:
484 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 485 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
485 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value") 486 DECLARE_CONCRETE_INSTRUCTION(UnknownOSRValue, "unknown-osr-value")
486 }; 487 };
487 488
488 489
489 template<int I, int T> 490 template<int I, int T>
490 class LControlInstruction: public LTemplateInstruction<0, I, T> { 491 class LControlInstruction: public LTemplateInstruction<0, I, T> {
491 public: 492 public:
493 LControlInstruction() : false_label_(NULL), true_label_(NULL) { }
494
492 virtual bool IsControl() const { return true; } 495 virtual bool IsControl() const { return true; }
493 496
494 int SuccessorCount() { return hydrogen()->SuccessorCount(); } 497 int SuccessorCount() { return hydrogen()->SuccessorCount(); }
495 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); } 498 HBasicBlock* SuccessorAt(int i) { return hydrogen()->SuccessorAt(i); }
496 int true_block_id() { return hydrogen()->SuccessorAt(0)->block_id(); } 499
497 int false_block_id() { return hydrogen()->SuccessorAt(1)->block_id(); } 500 int TrueDestination(LChunk* chunk) {
501 return chunk->LookupDestination(true_block_id());
502 }
503 int FalseDestination(LChunk* chunk) {
504 return chunk->LookupDestination(false_block_id());
505 }
506
507 Label* TrueLabel(LChunk* chunk) {
508 if (true_label_ == NULL) {
509 true_label_ = chunk->GetAssemblyLabel(TrueDestination(chunk));
510 }
511 return true_label_;
512 }
513 Label* FalseLabel(LChunk* chunk) {
514 if (false_label_ == NULL) {
515 false_label_ = chunk->GetAssemblyLabel(FalseDestination(chunk));
516 }
517 return false_label_;
518 }
519
520 protected:
521 int true_block_id() { return SuccessorAt(0)->block_id(); }
522 int false_block_id() { return SuccessorAt(1)->block_id(); }
498 523
499 private: 524 private:
500 HControlInstruction* hydrogen() { 525 HControlInstruction* hydrogen() {
501 return HControlInstruction::cast(this->hydrogen_value()); 526 return HControlInstruction::cast(this->hydrogen_value());
502 } 527 }
528
529 Label* false_label_;
530 Label* true_label_;
503 }; 531 };
504 532
505 533
506 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> { 534 class LWrapReceiver: public LTemplateInstruction<1, 2, 0> {
507 public: 535 public:
508 LWrapReceiver(LOperand* receiver, LOperand* function) { 536 LWrapReceiver(LOperand* receiver, LOperand* function) {
509 inputs_[0] = receiver; 537 inputs_[0] = receiver;
510 inputs_[1] = function; 538 inputs_[1] = function;
511 } 539 }
512 540
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1257
1230 LOperand* value() { return inputs_[0]; } 1258 LOperand* value() { return inputs_[0]; }
1231 1259
1232 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch") 1260 DECLARE_CONCRETE_INSTRUCTION(Branch, "branch")
1233 DECLARE_HYDROGEN_ACCESSOR(Branch) 1261 DECLARE_HYDROGEN_ACCESSOR(Branch)
1234 1262
1235 virtual void PrintDataTo(StringStream* stream); 1263 virtual void PrintDataTo(StringStream* stream);
1236 }; 1264 };
1237 1265
1238 1266
1239 class LCmpMapAndBranch: public LTemplateInstruction<0, 1, 1> { 1267 class LCmpMapAndBranch: public LControlInstruction<1, 1> {
1240 public: 1268 public:
1241 LCmpMapAndBranch(LOperand* value, LOperand* temp) { 1269 LCmpMapAndBranch(LOperand* value, LOperand* temp) {
1242 inputs_[0] = value; 1270 inputs_[0] = value;
1243 temps_[0] = temp; 1271 temps_[0] = temp;
1244 } 1272 }
1245 1273
1246 LOperand* value() { return inputs_[0]; } 1274 LOperand* value() { return inputs_[0]; }
1247 LOperand* temp() { return temps_[0]; } 1275 LOperand* temp() { return temps_[0]; }
1248 1276
1249 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch") 1277 DECLARE_CONCRETE_INSTRUCTION(CmpMapAndBranch, "cmp-map-and-branch")
1250 DECLARE_HYDROGEN_ACCESSOR(CompareMap) 1278 DECLARE_HYDROGEN_ACCESSOR(CompareMap)
1251 1279
1252 virtual bool IsControl() const { return true; }
1253
1254 Handle<Map> map() const { return hydrogen()->map(); } 1280 Handle<Map> map() const { return hydrogen()->map(); }
1255 int true_block_id() const {
1256 return hydrogen()->FirstSuccessor()->block_id();
1257 }
1258 int false_block_id() const {
1259 return hydrogen()->SecondSuccessor()->block_id();
1260 }
1261 }; 1281 };
1262 1282
1263 1283
1264 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> { 1284 class LFixedArrayBaseLength: public LTemplateInstruction<1, 1, 0> {
1265 public: 1285 public:
1266 explicit LFixedArrayBaseLength(LOperand* value) { 1286 explicit LFixedArrayBaseLength(LOperand* value) {
1267 inputs_[0] = value; 1287 inputs_[0] = value;
1268 } 1288 }
1269 1289
1270 LOperand* value() { return inputs_[0]; } 1290 LOperand* value() { return inputs_[0]; }
(...skipping 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 2414
2395 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> { 2415 class LCheckNonSmi: public LTemplateInstruction<0, 1, 0> {
2396 public: 2416 public:
2397 explicit LCheckNonSmi(LOperand* value) { 2417 explicit LCheckNonSmi(LOperand* value) {
2398 inputs_[0] = value; 2418 inputs_[0] = value;
2399 } 2419 }
2400 2420
2401 LOperand* value() { return inputs_[0]; } 2421 LOperand* value() { return inputs_[0]; }
2402 2422
2403 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi") 2423 DECLARE_CONCRETE_INSTRUCTION(CheckNonSmi, "check-non-smi")
2424 DECLARE_HYDROGEN_ACCESSOR(CheckHeapObject)
2404 }; 2425 };
2405 2426
2406 2427
2407 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> { 2428 class LClampDToUint8: public LTemplateInstruction<1, 1, 1> {
2408 public: 2429 public:
2409 LClampDToUint8(LOperand* unclamped, LOperand* temp) { 2430 LClampDToUint8(LOperand* unclamped, LOperand* temp) {
2410 inputs_[0] = unclamped; 2431 inputs_[0] = unclamped;
2411 temps_[0] = temp; 2432 temps_[0] = temp;
2412 } 2433 }
2413 2434
(...skipping 23 matching lines...) Expand all
2437 temps_[0] = temp; 2458 temps_[0] = temp;
2438 } 2459 }
2439 2460
2440 LOperand* unclamped() { return inputs_[0]; } 2461 LOperand* unclamped() { return inputs_[0]; }
2441 LOperand* temp() { return temps_[0]; } 2462 LOperand* temp() { return temps_[0]; }
2442 2463
2443 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8") 2464 DECLARE_CONCRETE_INSTRUCTION(ClampTToUint8, "clamp-t-to-uint8")
2444 }; 2465 };
2445 2466
2446 2467
2468 class LAllocateObject: public LTemplateInstruction<1, 1, 2> {
2469 public:
2470 LAllocateObject(LOperand* temp, LOperand* temp2) {
2471 temps_[0] = temp;
2472 temps_[1] = temp2;
2473 }
2474
2475 LOperand* temp() { return temps_[0]; }
2476 LOperand* temp2() { return temps_[1]; }
2477
2478 DECLARE_CONCRETE_INSTRUCTION(AllocateObject, "allocate-object")
2479 DECLARE_HYDROGEN_ACCESSOR(AllocateObject)
2480 };
2481
2482
2447 class LAllocate: public LTemplateInstruction<1, 2, 2> { 2483 class LAllocate: public LTemplateInstruction<1, 2, 2> {
2448 public: 2484 public:
2449 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) { 2485 LAllocate(LOperand* size, LOperand* temp1, LOperand* temp2) {
2450 inputs_[1] = size; 2486 inputs_[1] = size;
2451 temps_[0] = temp1; 2487 temps_[0] = temp1;
2452 temps_[1] = temp2; 2488 temps_[1] = temp2;
2453 } 2489 }
2454 2490
2455 LOperand* size() { return inputs_[1]; } 2491 LOperand* size() { return inputs_[1]; }
2456 LOperand* temp1() { return temps_[0]; } 2492 LOperand* temp1() { return temps_[0]; }
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 2575
2540 LOperand* object() { return inputs_[0]; } 2576 LOperand* object() { return inputs_[0]; }
2541 LOperand* key() { return inputs_[1]; } 2577 LOperand* key() { return inputs_[1]; }
2542 2578
2543 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property") 2579 DECLARE_CONCRETE_INSTRUCTION(DeleteProperty, "delete-property")
2544 }; 2580 };
2545 2581
2546 2582
2547 class LOsrEntry: public LTemplateInstruction<0, 0, 0> { 2583 class LOsrEntry: public LTemplateInstruction<0, 0, 0> {
2548 public: 2584 public:
2549 LOsrEntry(); 2585 LOsrEntry() {}
2550 2586
2551 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; } 2587 virtual bool HasInterestingComment(LCodeGen* gen) const { return false; }
2552 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry") 2588 DECLARE_CONCRETE_INSTRUCTION(OsrEntry, "osr-entry")
2553
2554 LOperand** SpilledRegisterArray() { return register_spills_; }
2555 LOperand** SpilledDoubleRegisterArray() { return double_register_spills_; }
2556
2557 void MarkSpilledRegister(int allocation_index, LOperand* spill_operand);
2558 void MarkSpilledDoubleRegister(int allocation_index,
2559 LOperand* spill_operand);
2560
2561 private:
2562 // Arrays of spill slot operands for registers with an assigned spill
2563 // slot, i.e., that must also be restored to the spill slot on OSR entry.
2564 // NULL if the register has no assigned spill slot. Indexed by allocation
2565 // index.
2566 LOperand* register_spills_[Register::kMaxNumAllocatableRegisters];
2567 LOperand* double_register_spills_[
2568 DoubleRegister::kMaxNumAllocatableRegisters];
2569 }; 2589 };
2570 2590
2571 2591
2572 class LStackCheck: public LTemplateInstruction<0, 0, 0> { 2592 class LStackCheck: public LTemplateInstruction<0, 0, 0> {
2573 public: 2593 public:
2574 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check") 2594 DECLARE_CONCRETE_INSTRUCTION(StackCheck, "stack-check")
2575 DECLARE_HYDROGEN_ACCESSOR(StackCheck) 2595 DECLARE_HYDROGEN_ACCESSOR(StackCheck)
2576 2596
2577 Label* done_label() { return &done_label_; } 2597 Label* done_label() { return &done_label_; }
2578 2598
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
2832 2852
2833 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); 2853 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder);
2834 }; 2854 };
2835 2855
2836 #undef DECLARE_HYDROGEN_ACCESSOR 2856 #undef DECLARE_HYDROGEN_ACCESSOR
2837 #undef DECLARE_CONCRETE_INSTRUCTION 2857 #undef DECLARE_CONCRETE_INSTRUCTION
2838 2858
2839 } } // namespace v8::internal 2859 } } // namespace v8::internal
2840 2860
2841 #endif // V8_ARM_LITHIUM_ARM_H_ 2861 #endif // V8_ARM_LITHIUM_ARM_H_
OLDNEW
« no previous file with comments | « src/arm/ic-arm.cc ('k') | src/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698