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

Side by Side Diff: src/mips/assembler-mips.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 | « no previous file | src/mips/assembler-mips.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 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 intptr_t pc_delta); 1042 intptr_t pc_delta);
1043 1043
1044 // Writes a single byte or word of data in the code stream. Used for 1044 // Writes a single byte or word of data in the code stream. Used for
1045 // inline tables, e.g., jump-tables. 1045 // inline tables, e.g., jump-tables.
1046 void db(uint8_t data); 1046 void db(uint8_t data);
1047 void dd(uint32_t data); 1047 void dd(uint32_t data);
1048 void dq(uint64_t data); 1048 void dq(uint64_t data);
1049 void dp(uintptr_t data) { dd(data); } 1049 void dp(uintptr_t data) { dd(data); }
1050 void dd(Label* label); 1050 void dd(Label* label);
1051 1051
1052 // Emits the address of the code stub's first instruction.
1053 void emit_code_stub_address(Code* stub);
1054
1055 PositionsRecorder* positions_recorder() { return &positions_recorder_; } 1052 PositionsRecorder* positions_recorder() { return &positions_recorder_; }
1056 1053
1057 // Postpone the generation of the trampoline pool for the specified number of 1054 // Postpone the generation of the trampoline pool for the specified number of
1058 // instructions. 1055 // instructions.
1059 void BlockTrampolinePoolFor(int instructions); 1056 void BlockTrampolinePoolFor(int instructions);
1060 1057
1061 // Check if there is less than kGap bytes available in the buffer. 1058 // Check if there is less than kGap bytes available in the buffer.
1062 // If this is the case, we need to grow the buffer before emitting 1059 // If this is the case, we need to grow the buffer before emitting
1063 // an instruction or relocation information. 1060 // an instruction or relocation information.
1064 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; } 1061 inline bool overflow() const { return pc_ >= reloc_info_writer.pos() - kGap; }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 int last_bound_pos_; 1251 int last_bound_pos_;
1255 1252
1256 // Readable constants for compact branch handling in emit() 1253 // Readable constants for compact branch handling in emit()
1257 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true }; 1254 enum class CompactBranchType : bool { NO = false, COMPACT_BRANCH = true };
1258 1255
1259 // Code emission. 1256 // Code emission.
1260 inline void CheckBuffer(); 1257 inline void CheckBuffer();
1261 void GrowBuffer(); 1258 void GrowBuffer();
1262 inline void emit(Instr x, 1259 inline void emit(Instr x,
1263 CompactBranchType is_compact_branch = CompactBranchType::NO); 1260 CompactBranchType is_compact_branch = CompactBranchType::NO);
1261 inline void emit(uint64_t x);
1262 inline void CheckForEmitInForbiddenSlot();
1263 template <typename T>
1264 inline void EmitHelper(T x);
1265 inline void EmitHelper(Instr x, CompactBranchType is_compact_branch);
1264 1266
1265 // Instruction generation. 1267 // Instruction generation.
1266 // We have 3 different kind of encoding layout on MIPS. 1268 // We have 3 different kind of encoding layout on MIPS.
1267 // However due to many different types of objects encoded in the same fields 1269 // However due to many different types of objects encoded in the same fields
1268 // we have quite a few aliases for each mode. 1270 // we have quite a few aliases for each mode.
1269 // Using the same structure to refer to Register and FPURegister would spare a 1271 // Using the same structure to refer to Register and FPURegister would spare a
1270 // few aliases, but mixing both does not look clean to me. 1272 // few aliases, but mixing both does not look clean to me.
1271 // Anyway we could surely implement this differently. 1273 // Anyway we could surely implement this differently.
1272 1274
1273 void GenInstrRegister(Opcode opcode, 1275 void GenInstrRegister(Opcode opcode,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 public: 1432 public:
1431 explicit EnsureSpace(Assembler* assembler) { 1433 explicit EnsureSpace(Assembler* assembler) {
1432 assembler->CheckBuffer(); 1434 assembler->CheckBuffer();
1433 } 1435 }
1434 }; 1436 };
1435 1437
1436 } // namespace internal 1438 } // namespace internal
1437 } // namespace v8 1439 } // namespace v8
1438 1440
1439 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1441 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « no previous file | src/mips/assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698