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

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

Issue 990903008: MIPS: Remove code object from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/mips/macro-assembler-mips.cc ('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_MIPS64 9 #if V8_TARGET_ARCH_MIPS64
10 10
(...skipping 3207 matching lines...) Expand 10 before | Expand all | Expand 10 after
3218 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 3218 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
3219 } 3219 }
3220 3220
3221 3221
3222 // --------------------------------------------------------------------------- 3222 // ---------------------------------------------------------------------------
3223 // Exception handling. 3223 // Exception handling.
3224 3224
3225 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, 3225 void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
3226 int handler_index) { 3226 int handler_index) {
3227 // Adjust this code if not the case. 3227 // Adjust this code if not the case.
3228 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); 3228 STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
3229 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 3229 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
3230 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); 3230 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
3231 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 2 * kPointerSize); 3231 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
3232 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 3 * kPointerSize); 3232 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
3233 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 4 * kPointerSize);
3234 3233
3235 // For the JSEntry handler, we must preserve a0-a3 and s0. 3234 // For the JSEntry handler, we must preserve a0-a3 and s0.
3236 // a5-a7 are available. We will build up the handler from the bottom by 3235 // a5-a7 are available. We will build up the handler from the bottom by
3237 // pushing on the stack. 3236 // pushing on the stack.
3238 // Set up the code object (a5) and the state (a6) for pushing. 3237 // Set up the the state (r6) for pushing.
3239 unsigned state = 3238 unsigned state =
3240 StackHandler::IndexField::encode(handler_index) | 3239 StackHandler::IndexField::encode(handler_index) |
3241 StackHandler::KindField::encode(kind); 3240 StackHandler::KindField::encode(kind);
3242 li(a5, Operand(CodeObject()), CONSTANT_SIZE); 3241 li(a5, Operand(CodeObject()), CONSTANT_SIZE);
3243 li(a6, Operand(state)); 3242 li(a6, Operand(state));
3244 3243
3245 // Push the frame pointer, context, state, and code object. 3244 // Push the frame pointer, context, and state.
3246 if (kind == StackHandler::JS_ENTRY) { 3245 if (kind == StackHandler::JS_ENTRY) {
3247 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); 3246 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
3248 // The second zero_reg indicates no context. 3247 // The second zero_reg indicates no context.
3249 // The first zero_reg is the NULL frame pointer. 3248 // The first zero_reg is the NULL frame pointer.
3250 // The operands are reversed to match the order of MultiPush/Pop. 3249 // The operands are reversed to match the order of MultiPush/Pop.
3251 Push(zero_reg, zero_reg, a6, a5); 3250 Push(zero_reg, zero_reg, a6);
3252 } else { 3251 } else {
3253 MultiPush(a5.bit() | a6.bit() | cp.bit() | fp.bit()); 3252 MultiPush(a6.bit() | cp.bit() | fp.bit());
3254 } 3253 }
3255 3254
3256 // Link the current handler as the next handler. 3255 // Link the current handler as the next handler.
3257 li(a6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 3256 li(a6, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
3258 ld(a5, MemOperand(a6)); 3257 ld(a5, MemOperand(a6));
3259 push(a5); 3258 push(a5);
3260 // Set this new handler as the current one. 3259 // Set this new handler as the current one.
3261 sd(sp, MemOperand(a6)); 3260 sd(sp, MemOperand(a6));
3262 } 3261 }
3263 3262
(...skipping 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after
6107 } 6106 }
6108 if (mag.shift > 0) sra(result, result, mag.shift); 6107 if (mag.shift > 0) sra(result, result, mag.shift);
6109 srl(at, dividend, 31); 6108 srl(at, dividend, 31);
6110 Addu(result, result, Operand(at)); 6109 Addu(result, result, Operand(at));
6111 } 6110 }
6112 6111
6113 6112
6114 } } // namespace v8::internal 6113 } } // namespace v8::internal
6115 6114
6116 #endif // V8_TARGET_ARCH_MIPS64 6115 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698