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

Side by Side Diff: src/mips64/macro-assembler-mips64.cc

Issue 930623003: MIPS64: Assembler support for internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compilation problem. Created 5 years, 10 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/mips64/assembler-mips64-inl.h ('k') | test/cctest/test-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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <limits.h> // For LONG_MIN, LONG_MAX. 5 #include <limits.h> // For LONG_MIN, LONG_MAX.
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #if V8_TARGET_ARCH_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after
3051 3051
3052 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) { 3052 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) {
3053 BlockTrampolinePoolScope block_trampoline_pool(this); 3053 BlockTrampolinePoolScope block_trampoline_pool(this);
3054 3054
3055 uint64_t imm28; 3055 uint64_t imm28;
3056 imm28 = jump_address(L); 3056 imm28 = jump_address(L);
3057 imm28 &= kImm28Mask; 3057 imm28 &= kImm28Mask;
3058 { BlockGrowBufferScope block_buf_growth(this); 3058 { BlockGrowBufferScope block_buf_growth(this);
3059 // Buffer growth (and relocation) must be blocked for internal references 3059 // Buffer growth (and relocation) must be blocked for internal references
3060 // until associated instructions are emitted and available to be patched. 3060 // until associated instructions are emitted and available to be patched.
3061 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); 3061 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED);
3062 j(imm28); 3062 j(imm28);
3063 } 3063 }
3064 // Emit a nop in the branch delay slot if required. 3064 // Emit a nop in the branch delay slot if required.
3065 if (bdslot == PROTECT) 3065 if (bdslot == PROTECT)
3066 nop(); 3066 nop();
3067 } 3067 }
3068 3068
3069 3069
3070 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) { 3070 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) {
3071 BlockTrampolinePoolScope block_trampoline_pool(this); 3071 BlockTrampolinePoolScope block_trampoline_pool(this);
3072 3072
3073 uint64_t imm64; 3073 uint64_t imm64;
3074 imm64 = jump_address(L); 3074 imm64 = jump_address(L);
3075 { BlockGrowBufferScope block_buf_growth(this); 3075 { BlockGrowBufferScope block_buf_growth(this);
3076 // Buffer growth (and relocation) must be blocked for internal references 3076 // Buffer growth (and relocation) must be blocked for internal references
3077 // until associated instructions are emitted and available to be patched. 3077 // until associated instructions are emitted and available to be patched.
3078 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); 3078 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED);
3079 li(at, Operand(imm64), ADDRESS_LOAD); 3079 li(at, Operand(imm64), ADDRESS_LOAD);
3080 } 3080 }
3081 jr(at); 3081 jr(at);
3082 3082
3083 // Emit a nop in the branch delay slot if required. 3083 // Emit a nop in the branch delay slot if required.
3084 if (bdslot == PROTECT) 3084 if (bdslot == PROTECT)
3085 nop(); 3085 nop();
3086 } 3086 }
3087 3087
3088 3088
3089 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) { 3089 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) {
3090 BlockTrampolinePoolScope block_trampoline_pool(this); 3090 BlockTrampolinePoolScope block_trampoline_pool(this);
3091 3091
3092 uint64_t imm64; 3092 uint64_t imm64;
3093 imm64 = jump_address(L); 3093 imm64 = jump_address(L);
3094 { BlockGrowBufferScope block_buf_growth(this); 3094 { BlockGrowBufferScope block_buf_growth(this);
3095 // Buffer growth (and relocation) must be blocked for internal references 3095 // Buffer growth (and relocation) must be blocked for internal references
3096 // until associated instructions are emitted and available to be patched. 3096 // until associated instructions are emitted and available to be patched.
3097 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE); 3097 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED);
3098 li(at, Operand(imm64), ADDRESS_LOAD); 3098 li(at, Operand(imm64), ADDRESS_LOAD);
3099 } 3099 }
3100 jalr(at); 3100 jalr(at);
3101 3101
3102 // Emit a nop in the branch delay slot if required. 3102 // Emit a nop in the branch delay slot if required.
3103 if (bdslot == PROTECT) 3103 if (bdslot == PROTECT)
3104 nop(); 3104 nop();
3105 } 3105 }
3106 3106
3107 3107
(...skipping 3093 matching lines...) Expand 10 before | Expand all | Expand 10 after
6201 } 6201 }
6202 if (mag.shift > 0) sra(result, result, mag.shift); 6202 if (mag.shift > 0) sra(result, result, mag.shift);
6203 srl(at, dividend, 31); 6203 srl(at, dividend, 31);
6204 Addu(result, result, Operand(at)); 6204 Addu(result, result, Operand(at));
6205 } 6205 }
6206 6206
6207 6207
6208 } } // namespace v8::internal 6208 } } // namespace v8::internal
6209 6209
6210 #endif // V8_TARGET_ARCH_MIPS64 6210 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64-inl.h ('k') | test/cctest/test-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698