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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 23475052: MIPS: reland 16744: add context save for GenerateFastApiCall. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Enum flags added. Created 7 years, 3 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/mips/macro-assembler-mips.h » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2858 matching lines...) Expand 10 before | Expand all | Expand 10 after
2869 __ andi(t0, a2, kFailureTagMask); 2869 __ andi(t0, a2, kFailureTagMask);
2870 __ Branch(USE_DELAY_SLOT, &failure_returned, eq, t0, Operand(zero_reg)); 2870 __ Branch(USE_DELAY_SLOT, &failure_returned, eq, t0, Operand(zero_reg));
2871 // Restore stack (remove arg slots) in branch delay slot. 2871 // Restore stack (remove arg slots) in branch delay slot.
2872 __ addiu(sp, sp, kCArgsSlotsSize); 2872 __ addiu(sp, sp, kCArgsSlotsSize);
2873 2873
2874 2874
2875 // Exit C frame and return. 2875 // Exit C frame and return.
2876 // v0:v1: result 2876 // v0:v1: result
2877 // sp: stack pointer 2877 // sp: stack pointer
2878 // fp: frame pointer 2878 // fp: frame pointer
2879 __ LeaveExitFrame(save_doubles_, s0, true); 2879 __ LeaveExitFrame(save_doubles_, s0, true, EMIT_RETURN);
2880 2880
2881 // Check if we should retry or throw exception. 2881 // Check if we should retry or throw exception.
2882 Label retry; 2882 Label retry;
2883 __ bind(&failure_returned); 2883 __ bind(&failure_returned);
2884 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0); 2884 STATIC_ASSERT(Failure::RETRY_AFTER_GC == 0);
2885 __ andi(t0, v0, ((1 << kFailureTypeTagSize) - 1) << kFailureTagSize); 2885 __ andi(t0, v0, ((1 << kFailureTypeTagSize) - 1) << kFailureTagSize);
2886 __ Branch(&retry, eq, t0, Operand(zero_reg)); 2886 __ Branch(&retry, eq, t0, Operand(zero_reg));
2887 2887
2888 // Special handling of out of memory exceptions. 2888 // Special handling of out of memory exceptions.
2889 JumpIfOOM(masm, v0, t0, throw_out_of_memory_exception); 2889 JumpIfOOM(masm, v0, t0, throw_out_of_memory_exception);
(...skipping 1259 matching lines...) Expand 10 before | Expand all | Expand 10 after
4149 // Already there 4149 // Already there
4150 4150
4151 // Argument 1 (a0): Subject string. 4151 // Argument 1 (a0): Subject string.
4152 __ mov(a0, subject); 4152 __ mov(a0, subject);
4153 4153
4154 // Locate the code entry and call it. 4154 // Locate the code entry and call it.
4155 __ Addu(t9, t9, Operand(Code::kHeaderSize - kHeapObjectTag)); 4155 __ Addu(t9, t9, Operand(Code::kHeaderSize - kHeapObjectTag));
4156 DirectCEntryStub stub; 4156 DirectCEntryStub stub;
4157 stub.GenerateCall(masm, t9); 4157 stub.GenerateCall(masm, t9);
4158 4158
4159 __ LeaveExitFrame(false, no_reg); 4159 __ LeaveExitFrame(false, no_reg, true);
4160 4160
4161 // v0: result 4161 // v0: result
4162 // subject: subject string (callee saved) 4162 // subject: subject string (callee saved)
4163 // regexp_data: RegExp data (callee saved) 4163 // regexp_data: RegExp data (callee saved)
4164 // last_match_info_elements: Last match info elements (callee saved) 4164 // last_match_info_elements: Last match info elements (callee saved)
4165 // Check the result. 4165 // Check the result.
4166 Label success; 4166 Label success;
4167 __ Branch(&success, eq, v0, Operand(1)); 4167 __ Branch(&success, eq, v0, Operand(1));
4168 // We expect exactly one result since we force the called regexp to behave 4168 // We expect exactly one result since we force the called regexp to behave
4169 // as non-global. 4169 // as non-global.
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after
7281 __ bind(&fast_elements_case); 7281 __ bind(&fast_elements_case);
7282 GenerateCase(masm, FAST_ELEMENTS); 7282 GenerateCase(masm, FAST_ELEMENTS);
7283 } 7283 }
7284 7284
7285 7285
7286 #undef __ 7286 #undef __
7287 7287
7288 } } // namespace v8::internal 7288 } } // namespace v8::internal
7289 7289
7290 #endif // V8_TARGET_ARCH_MIPS 7290 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698