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

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

Issue 934623003: Revert of MIPS: Fix 'Assembler support for internal references.' (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mips/constants-mips.h ('k') | no next file » | 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_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 3069 matching lines...) Expand 10 before | Expand all | Expand 10 after
3080 3080
3081 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) { 3081 void MacroAssembler::J(Label* L, BranchDelaySlot bdslot) {
3082 BlockTrampolinePoolScope block_trampoline_pool(this); 3082 BlockTrampolinePoolScope block_trampoline_pool(this);
3083 3083
3084 uint32_t imm28; 3084 uint32_t imm28;
3085 imm28 = jump_address(L); 3085 imm28 = jump_address(L);
3086 imm28 &= kImm28Mask; 3086 imm28 &= kImm28Mask;
3087 { BlockGrowBufferScope block_buf_growth(this); 3087 { BlockGrowBufferScope block_buf_growth(this);
3088 // Buffer growth (and relocation) must be blocked for internal references 3088 // Buffer growth (and relocation) must be blocked for internal references
3089 // until associated instructions are emitted and available to be patched. 3089 // until associated instructions are emitted and available to be patched.
3090 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); 3090 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
3091 j(imm28); 3091 j(imm28);
3092 } 3092 }
3093 // Emit a nop in the branch delay slot if required. 3093 // Emit a nop in the branch delay slot if required.
3094 if (bdslot == PROTECT) 3094 if (bdslot == PROTECT)
3095 nop(); 3095 nop();
3096 } 3096 }
3097 3097
3098 3098
3099 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) { 3099 void MacroAssembler::Jr(Label* L, BranchDelaySlot bdslot) {
3100 BlockTrampolinePoolScope block_trampoline_pool(this); 3100 BlockTrampolinePoolScope block_trampoline_pool(this);
3101 3101
3102 uint32_t imm32; 3102 uint32_t imm32;
3103 imm32 = jump_address(L); 3103 imm32 = jump_address(L);
3104 { BlockGrowBufferScope block_buf_growth(this); 3104 { BlockGrowBufferScope block_buf_growth(this);
3105 // Buffer growth (and relocation) must be blocked for internal references 3105 // Buffer growth (and relocation) must be blocked for internal references
3106 // until associated instructions are emitted and available to be patched. 3106 // until associated instructions are emitted and available to be patched.
3107 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); 3107 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
3108 lui(at, (imm32 & kHiMask) >> kLuiShift); 3108 lui(at, (imm32 & kHiMask) >> kLuiShift);
3109 ori(at, at, (imm32 & kImm16Mask)); 3109 ori(at, at, (imm32 & kImm16Mask));
3110 } 3110 }
3111 jr(at); 3111 jr(at);
3112 3112
3113 // Emit a nop in the branch delay slot if required. 3113 // Emit a nop in the branch delay slot if required.
3114 if (bdslot == PROTECT) 3114 if (bdslot == PROTECT)
3115 nop(); 3115 nop();
3116 } 3116 }
3117 3117
3118 3118
3119 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) { 3119 void MacroAssembler::Jalr(Label* L, BranchDelaySlot bdslot) {
3120 BlockTrampolinePoolScope block_trampoline_pool(this); 3120 BlockTrampolinePoolScope block_trampoline_pool(this);
3121 3121
3122 uint32_t imm32; 3122 uint32_t imm32;
3123 imm32 = jump_address(L); 3123 imm32 = jump_address(L);
3124 { BlockGrowBufferScope block_buf_growth(this); 3124 { BlockGrowBufferScope block_buf_growth(this);
3125 // Buffer growth (and relocation) must be blocked for internal references 3125 // Buffer growth (and relocation) must be blocked for internal references
3126 // until associated instructions are emitted and available to be patched. 3126 // until associated instructions are emitted and available to be patched.
3127 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE_ENCODED); 3127 RecordRelocInfo(RelocInfo::INTERNAL_REFERENCE);
3128 lui(at, (imm32 & kHiMask) >> kLuiShift); 3128 lui(at, (imm32 & kHiMask) >> kLuiShift);
3129 ori(at, at, (imm32 & kImm16Mask)); 3129 ori(at, at, (imm32 & kImm16Mask));
3130 } 3130 }
3131 jalr(at); 3131 jalr(at);
3132 3132
3133 // Emit a nop in the branch delay slot if required. 3133 // Emit a nop in the branch delay slot if required.
3134 if (bdslot == PROTECT) 3134 if (bdslot == PROTECT)
3135 nop(); 3135 nop();
3136 } 3136 }
3137 3137
(...skipping 3019 matching lines...) Expand 10 before | Expand all | Expand 10 after
6157 } 6157 }
6158 if (mag.shift > 0) sra(result, result, mag.shift); 6158 if (mag.shift > 0) sra(result, result, mag.shift);
6159 srl(at, dividend, 31); 6159 srl(at, dividend, 31);
6160 Addu(result, result, Operand(at)); 6160 Addu(result, result, Operand(at));
6161 } 6161 }
6162 6162
6163 6163
6164 } } // namespace v8::internal 6164 } } // namespace v8::internal
6165 6165
6166 #endif // V8_TARGET_ARCH_MIPS 6166 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/constants-mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698