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

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

Issue 1025453003: MIPS: Fix 'MIPS: Serializer: serialize internal references via object visitor.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix comment. Created 5 years, 9 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/ia32/assembler-ia32-inl.h ('k') | src/mips/assembler-mips-inl.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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 inline static void deserialization_set_special_target_at( 542 inline static void deserialization_set_special_target_at(
543 Address instruction_payload, Code* code, Address target) { 543 Address instruction_payload, Code* code, Address target) {
544 set_target_address_at( 544 set_target_address_at(
545 instruction_payload - kInstructionsFor32BitConstant * kInstrSize, 545 instruction_payload - kInstructionsFor32BitConstant * kInstrSize,
546 code, 546 code,
547 target); 547 target);
548 } 548 }
549 549
550 // This sets the internal reference at the pc. 550 // This sets the internal reference at the pc.
551 inline static void deserialization_set_target_internal_reference_at( 551 inline static void deserialization_set_target_internal_reference_at(
552 Address pc, Address target); 552 Address pc, Address target,
553 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE);
553 554
554 // Size of an instruction. 555 // Size of an instruction.
555 static const int kInstrSize = sizeof(Instr); 556 static const int kInstrSize = sizeof(Instr);
556 557
557 // Difference between address of current opcode and target address offset. 558 // Difference between address of current opcode and target address offset.
558 static const int kBranchPCOffset = 4; 559 static const int kBranchPCOffset = 4;
559 560
560 // Here we are patching the address in the LUI/ORI instruction pair. 561 // Here we are patching the address in the LUI/ORI instruction pair.
561 // These values are used in the serialization process and must be zero for 562 // These values are used in the serialization process and must be zero for
562 // MIPS platform, as Code, Embedded Object or External-reference pointers 563 // MIPS platform, as Code, Embedded Object or External-reference pointers
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 void EndBlockGrowBuffer() { 1185 void EndBlockGrowBuffer() {
1185 DCHECK(block_buffer_growth_); 1186 DCHECK(block_buffer_growth_);
1186 block_buffer_growth_ = false; 1187 block_buffer_growth_ = false;
1187 } 1188 }
1188 1189
1189 bool is_buffer_growth_blocked() const { 1190 bool is_buffer_growth_blocked() const {
1190 return block_buffer_growth_; 1191 return block_buffer_growth_;
1191 } 1192 }
1192 1193
1193 private: 1194 private:
1195 inline static void set_target_internal_reference_encoded_at(Address pc,
1196 Address target);
1197
1194 // Buffer size and constant pool distance are checked together at regular 1198 // Buffer size and constant pool distance are checked together at regular
1195 // intervals of kBufferCheckInterval emitted bytes. 1199 // intervals of kBufferCheckInterval emitted bytes.
1196 static const int kBufferCheckInterval = 1*KB/2; 1200 static const int kBufferCheckInterval = 1*KB/2;
1197 1201
1198 // Code generation. 1202 // Code generation.
1199 // The relocation writer's position is at least kGap bytes below the end of 1203 // The relocation writer's position is at least kGap bytes below the end of
1200 // the generated instructions. This is so that multi-instruction sequences do 1204 // the generated instructions. This is so that multi-instruction sequences do
1201 // not have to check for overflow. The same is true for writes of large 1205 // not have to check for overflow. The same is true for writes of large
1202 // relocation info entries. 1206 // relocation info entries.
1203 static const int kGap = 32; 1207 static const int kGap = 32;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 class EnsureSpace BASE_EMBEDDED { 1398 class EnsureSpace BASE_EMBEDDED {
1395 public: 1399 public:
1396 explicit EnsureSpace(Assembler* assembler) { 1400 explicit EnsureSpace(Assembler* assembler) {
1397 assembler->CheckBuffer(); 1401 assembler->CheckBuffer();
1398 } 1402 }
1399 }; 1403 };
1400 1404
1401 } } // namespace v8::internal 1405 } } // namespace v8::internal
1402 1406
1403 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1407 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698