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

Side by Side Diff: src/mips64/assembler-mips64.h

Issue 2547033002: MIPS[64]: Fix jump_tables6 test for r6 architectures (Closed)
Patch Set: Address comments Created 4 years 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
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('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 (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 static const int kPcLoadDelta = 4; 552 static const int kPcLoadDelta = 4;
553 553
554 #ifdef _MIPS_ARCH_MIPS64R6 554 #ifdef _MIPS_ARCH_MIPS64R6
555 static const int kDebugBreakSlotInstructions = 5; 555 static const int kDebugBreakSlotInstructions = 5;
556 #else 556 #else
557 static const int kDebugBreakSlotInstructions = 6; 557 static const int kDebugBreakSlotInstructions = 6;
558 #endif 558 #endif
559 static const int kDebugBreakSlotLength = 559 static const int kDebugBreakSlotLength =
560 kDebugBreakSlotInstructions * kInstrSize; 560 kDebugBreakSlotInstructions * kInstrSize;
561 561
562 // Max offset for instructions with 16-bit offset field
563 static const int kMaxBranchOffset = (1 << (18 - 1)) - 1;
564
565 // Max offset for compact branch instructions with 26-bit offset field
566 static const int kMaxCompactBranchOffset = (1 << (28 - 1)) - 1;
567
568 static const int kTrampolineSlotsSize = 2 * kInstrSize;
562 569
563 // --------------------------------------------------------------------------- 570 // ---------------------------------------------------------------------------
564 // Code generation. 571 // Code generation.
565 572
566 // Insert the smallest number of nop instructions 573 // Insert the smallest number of nop instructions
567 // possible to align the pc offset to a multiple 574 // possible to align the pc offset to a multiple
568 // of m. m must be a power of 2 (>= 4). 575 // of m. m must be a power of 2 (>= 4).
569 void Align(int m); 576 void Align(int m);
570 // Insert the smallest number of zero bytes possible to align the pc offset 577 // Insert the smallest number of zero bytes possible to align the pc offset
571 // to a mulitple of m. m must be a power of 2 (>= 2). 578 // to a mulitple of m. m must be a power of 2 (>= 2).
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1216 void CheckTrampolinePool(); 1223 void CheckTrampolinePool();
1217 1224
1218 void PatchConstantPoolAccessInstruction(int pc_offset, int offset, 1225 void PatchConstantPoolAccessInstruction(int pc_offset, int offset,
1219 ConstantPoolEntry::Access access, 1226 ConstantPoolEntry::Access access,
1220 ConstantPoolEntry::Type type) { 1227 ConstantPoolEntry::Type type) {
1221 // No embedded constant pool support. 1228 // No embedded constant pool support.
1222 UNREACHABLE(); 1229 UNREACHABLE();
1223 } 1230 }
1224 1231
1225 bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; } 1232 bool IsPrevInstrCompactBranch() { return prev_instr_compact_branch_; }
1233 static bool IsCompactBranchSupported() { return kArchVariant == kMips64r6; }
1226 1234
1227 inline int UnboundLabelsCount() { return unbound_labels_count_; } 1235 inline int UnboundLabelsCount() { return unbound_labels_count_; }
1228 1236
1229 protected: 1237 protected:
1230 // Load Scaled Address instructions. 1238 // Load Scaled Address instructions.
1231 void lsa(Register rd, Register rt, Register rs, uint8_t sa); 1239 void lsa(Register rd, Register rt, Register rs, uint8_t sa);
1232 void dlsa(Register rd, Register rt, Register rs, uint8_t sa); 1240 void dlsa(Register rd, Register rt, Register rs, uint8_t sa);
1233 1241
1234 // Helpers. 1242 // Helpers.
1235 void LoadRegPlusOffsetToAt(const MemOperand& src); 1243 void LoadRegPlusOffsetToAt(const MemOperand& src);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1488 }; 1496 };
1489 1497
1490 int32_t get_trampoline_entry(int32_t pos); 1498 int32_t get_trampoline_entry(int32_t pos);
1491 int unbound_labels_count_; 1499 int unbound_labels_count_;
1492 // After trampoline is emitted, long branches are used in generated code for 1500 // After trampoline is emitted, long branches are used in generated code for
1493 // the forward branches whose target offsets could be beyond reach of branch 1501 // the forward branches whose target offsets could be beyond reach of branch
1494 // instruction. We use this information to trigger different mode of 1502 // instruction. We use this information to trigger different mode of
1495 // branch instruction generation, where we use jump instructions rather 1503 // branch instruction generation, where we use jump instructions rather
1496 // than regular branch instructions. 1504 // than regular branch instructions.
1497 bool trampoline_emitted_; 1505 bool trampoline_emitted_;
1498 static const int kTrampolineSlotsSize = 2 * kInstrSize;
1499 static const int kMaxBranchOffset = (1 << (18 - 1)) - 1;
1500 static const int kMaxCompactBranchOffset = (1 << (28 - 1)) - 1;
1501 static const int kInvalidSlotPos = -1; 1506 static const int kInvalidSlotPos = -1;
1502 1507
1503 // Internal reference positions, required for unbounded internal reference 1508 // Internal reference positions, required for unbounded internal reference
1504 // labels. 1509 // labels.
1505 std::set<int64_t> internal_reference_positions_; 1510 std::set<int64_t> internal_reference_positions_;
1506 bool is_internal_reference(Label* L) { 1511 bool is_internal_reference(Label* L) {
1507 return internal_reference_positions_.find(L->pos()) != 1512 return internal_reference_positions_.find(L->pos()) !=
1508 internal_reference_positions_.end(); 1513 internal_reference_positions_.end();
1509 } 1514 }
1510 1515
(...skipping 16 matching lines...) Expand all
1527 public: 1532 public:
1528 explicit EnsureSpace(Assembler* assembler) { 1533 explicit EnsureSpace(Assembler* assembler) {
1529 assembler->CheckBuffer(); 1534 assembler->CheckBuffer();
1530 } 1535 }
1531 }; 1536 };
1532 1537
1533 } // namespace internal 1538 } // namespace internal
1534 } // namespace v8 1539 } // namespace v8
1535 1540
1536 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1541 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698