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

Side by Side Diff: src/mips/macro-assembler-mips.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 | « no previous file | src/mips64/macro-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_MIPS 9 #if V8_TARGET_ARCH_MIPS
10 10
(...skipping 3220 matching lines...) Expand 10 before | Expand all | Expand 10 after
3231 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK); 3231 Call(ces.GetCode(), RelocInfo::DEBUG_BREAK);
3232 } 3232 }
3233 3233
3234 3234
3235 // --------------------------------------------------------------------------- 3235 // ---------------------------------------------------------------------------
3236 // Exception handling. 3236 // Exception handling.
3237 3237
3238 void MacroAssembler::PushTryHandler(StackHandler::Kind kind, 3238 void MacroAssembler::PushTryHandler(StackHandler::Kind kind,
3239 int handler_index) { 3239 int handler_index) {
3240 // Adjust this code if not the case. 3240 // Adjust this code if not the case.
3241 STATIC_ASSERT(StackHandlerConstants::kSize == 5 * kPointerSize); 3241 STATIC_ASSERT(StackHandlerConstants::kSize == 4 * kPointerSize);
3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
3243 STATIC_ASSERT(StackHandlerConstants::kCodeOffset == 1 * kPointerSize); 3243 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
3244 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 2 * kPointerSize); 3244 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
3245 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 3 * kPointerSize); 3245 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
3246 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 4 * kPointerSize);
3247 3246
3248 // For the JSEntry handler, we must preserve a0-a3 and s0. 3247 // For the JSEntry handler, we must preserve a0-a3 and s0.
3249 // t1-t3 are available. We will build up the handler from the bottom by 3248 // t1-t3 are available. We will build up the handler from the bottom by
3250 // pushing on the stack. 3249 // pushing on the stack.
3251 // Set up the code object (t1) and the state (t2) for pushing. 3250 // Set up the the state (t2) for pushing.
3252 unsigned state = 3251 unsigned state =
3253 StackHandler::IndexField::encode(handler_index) | 3252 StackHandler::IndexField::encode(handler_index) |
3254 StackHandler::KindField::encode(kind); 3253 StackHandler::KindField::encode(kind);
3255 li(t1, Operand(CodeObject()), CONSTANT_SIZE);
3256 li(t2, Operand(state)); 3254 li(t2, Operand(state));
3257 3255
3258 // Push the frame pointer, context, state, and code object. 3256 // Push the frame pointer, context, and state.
3259 if (kind == StackHandler::JS_ENTRY) { 3257 if (kind == StackHandler::JS_ENTRY) {
3260 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); 3258 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0));
3261 // The second zero_reg indicates no context. 3259 // The second zero_reg indicates no context.
3262 // The first zero_reg is the NULL frame pointer. 3260 // The first zero_reg is the NULL frame pointer.
3263 // The operands are reversed to match the order of MultiPush/Pop. 3261 // The operands are reversed to match the order of MultiPush/Pop.
3264 Push(zero_reg, zero_reg, t2, t1); 3262 Push(zero_reg, zero_reg, t2);
3265 } else { 3263 } else {
3266 MultiPush(t1.bit() | t2.bit() | cp.bit() | fp.bit()); 3264 MultiPush(t2.bit() | cp.bit() | fp.bit());
3267 } 3265 }
3268 3266
3269 // Link the current handler as the next handler. 3267 // Link the current handler as the next handler.
3270 li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 3268 li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
3271 lw(t1, MemOperand(t2)); 3269 lw(t1, MemOperand(t2));
3272 push(t1); 3270 push(t1);
3273 // Set this new handler as the current one. 3271 // Set this new handler as the current one.
3274 sw(sp, MemOperand(t2)); 3272 sw(sp, MemOperand(t2));
3275 } 3273 }
3276 3274
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after
6090 } 6088 }
6091 if (mag.shift > 0) sra(result, result, mag.shift); 6089 if (mag.shift > 0) sra(result, result, mag.shift);
6092 srl(at, dividend, 31); 6090 srl(at, dividend, 31);
6093 Addu(result, result, Operand(at)); 6091 Addu(result, result, Operand(at));
6094 } 6092 }
6095 6093
6096 6094
6097 } } // namespace v8::internal 6095 } } // namespace v8::internal
6098 6096
6099 #endif // V8_TARGET_ARCH_MIPS 6097 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips64/macro-assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698