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

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

Issue 1573953002: MIPS: Fix dd() implementations for compact branches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use Align(). Created 4 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
« no previous file with comments | « src/mips/assembler-mips-inl.h ('k') | src/mips64/assembler-mips64.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 (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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 intptr_t pc_delta); 1098 intptr_t pc_delta);
1099 1099
1100 // Writes a single byte or word of data in the code stream. Used for 1100 // Writes a single byte or word of data in the code stream. Used for
1101 // inline tables, e.g., jump-tables. 1101 // inline tables, e.g., jump-tables.
1102 void db(uint8_t data); 1102 void db(uint8_t data);
1103 void dd(uint32_t data); 1103 void dd(uint32_t data);
1104 void dq(uint64_t data); 1104 void dq(uint64_t data);
1105 void dp(uintptr_t data) { dq(data); } 1105 void dp(uintptr_t data) { dq(data); }
1106 void dd(Label* label); 1106 void dd(Label* label);
1107 1107
1108 // Emits the address of the code stub's first instruction.
1109 void emit_code_stub_address(Code* stub);
1110
1111 PositionsRecorder* positions_recorder() { return &positions_recorder_; } 1108 PositionsRecorder* positions_recorder() { return &positions_recorder_; }
1112 1109
1113 // Postpone the generation of the trampoline pool for the specified number of 1110 // Postpone the generation of the trampoline pool for the specified number of
1114 // instructions. 1111 // instructions.
1115 void BlockTrampolinePoolFor(int instructions); 1112 void BlockTrampolinePoolFor(int instructions);
1116 1113
1117 // Check if there is less than kGap bytes available in the buffer. 1114 // Check if there is less than kGap bytes available in the buffer.
1118 // If this is the case, we need to grow the buffer before emitting 1115 // If this is the case, we need to grow the buffer before emitting
1119 // an instruction or relocation information. 1116 // an instruction or relocation information.
1120 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } 1117 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 1319
1323 // Readable constants for compact branch handling in emit() 1320 // Readable constants for compact branch handling in emit()
1324 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true }; 1321 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true };
1325 1322
1326 // Code emission. 1323 // Code emission.
1327 inline void CheckBuffer(); 1324 inline void CheckBuffer();
1328 void GrowBuffer(); 1325 void GrowBuffer();
1329 inline void emit(Instr x, 1326 inline void emit(Instr x,
1330 CompactBranchType is_compact_branch = CompactBranchType::NO); 1327 CompactBranchType is_compact_branch = CompactBranchType::NO);
1331 inline void emit(uint64_t x); 1328 inline void emit(uint64_t x);
1329 inline void CheckForEmitInForbiddenSlot();
1330 template <typename T>
1331 inline void EmitHelper(T x);
1332 inline void EmitHelper(Instr x, CompactBranchType is_compact_branch);
1332 1333
1333 // Instruction generation. 1334 // Instruction generation.
1334 // We have 3 different kind of encoding layout on MIPS. 1335 // We have 3 different kind of encoding layout on MIPS.
1335 // However due to many different types of objects encoded in the same fields 1336 // However due to many different types of objects encoded in the same fields
1336 // we have quite a few aliases for each mode. 1337 // we have quite a few aliases for each mode.
1337 // Using the same structure to refer to Register and FPURegister would spare a 1338 // Using the same structure to refer to Register and FPURegister would spare a
1338 // few aliases, but mixing both does not look clean to me. 1339 // few aliases, but mixing both does not look clean to me.
1339 // Anyway we could surely implement this differently. 1340 // Anyway we could surely implement this differently.
1340 1341
1341 void GenInstrRegister(Opcode opcode, 1342 void GenInstrRegister(Opcode opcode,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 public: 1499 public:
1499 explicit EnsureSpace(Assembler* assembler) { 1500 explicit EnsureSpace(Assembler* assembler) {
1500 assembler->CheckBuffer(); 1501 assembler->CheckBuffer();
1501 } 1502 }
1502 }; 1503 };
1503 1504
1504 } // namespace internal 1505 } // namespace internal
1505 } // namespace v8 1506 } // namespace v8
1506 1507
1507 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1508 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/assembler-mips-inl.h ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698