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

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

Issue 997663002: MIPS: Remove frame pointer 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 == 4 * kPointerSize); 3241 STATIC_ASSERT(StackHandlerConstants::kSize == 3 * kPointerSize);
3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize); 3242 STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0 * kPointerSize);
3243 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize); 3243 STATIC_ASSERT(StackHandlerConstants::kStateOffset == 1 * kPointerSize);
3244 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize); 3244 STATIC_ASSERT(StackHandlerConstants::kContextOffset == 2 * kPointerSize);
3245 STATIC_ASSERT(StackHandlerConstants::kFPOffset == 3 * kPointerSize);
3246 3245
3247 // For the JSEntry handler, we must preserve a0-a3 and s0. 3246 // For the JSEntry handler, we must preserve a0-a3 and s0.
3248 // t1-t3 are available. We will build up the handler from the bottom by 3247 // t1-t3 are available. We will build up the handler from the bottom by
3249 // pushing on the stack. 3248 // pushing on the stack.
3250 // Set up the the state (t2) for pushing. 3249 // Set up the the state (t2) for pushing.
3251 unsigned state = 3250 unsigned state =
3252 StackHandler::IndexField::encode(handler_index) | 3251 StackHandler::IndexField::encode(handler_index) |
3253 StackHandler::KindField::encode(kind); 3252 StackHandler::KindField::encode(kind);
3254 li(t2, Operand(state)); 3253 li(t2, Operand(state));
3255 3254
3256 // Push the frame pointer, context, and state. 3255 // Push the context and state.
3257 if (kind == StackHandler::JS_ENTRY) { 3256 if (kind == StackHandler::JS_ENTRY) {
3258 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); 3257 DCHECK(Smi::FromInt(0) == 0);
3259 // The second zero_reg indicates no context. 3258 // The zero_reg indicates no context.
3260 // The first zero_reg is the NULL frame pointer.
3261 // The operands are reversed to match the order of MultiPush/Pop. 3259 // The operands are reversed to match the order of MultiPush/Pop.
3262 Push(zero_reg, zero_reg, t2); 3260 Push(zero_reg, t2);
3263 } else { 3261 } else {
3264 MultiPush(t2.bit() | cp.bit() | fp.bit()); 3262 MultiPush(t2.bit() | cp.bit());
3265 } 3263 }
3266 3264
3267 // Link the current handler as the next handler. 3265 // Link the current handler as the next handler.
3268 li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate()))); 3266 li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
3269 lw(t1, MemOperand(t2)); 3267 lw(t1, MemOperand(t2));
3270 push(t1); 3268 push(t1);
3271 // Set this new handler as the current one. 3269 // Set this new handler as the current one.
3272 sw(sp, MemOperand(t2)); 3270 sw(sp, MemOperand(t2));
3273 } 3271 }
3274 3272
(...skipping 2813 matching lines...) Expand 10 before | Expand all | Expand 10 after
6088 } 6086 }
6089 if (mag.shift > 0) sra(result, result, mag.shift); 6087 if (mag.shift > 0) sra(result, result, mag.shift);
6090 srl(at, dividend, 31); 6088 srl(at, dividend, 31);
6091 Addu(result, result, Operand(at)); 6089 Addu(result, result, Operand(at));
6092 } 6090 }
6093 6091
6094 6092
6095 } } // namespace v8::internal 6093 } } // namespace v8::internal
6096 6094
6097 #endif // V8_TARGET_ARCH_MIPS 6095 #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