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

Side by Side Diff: src/mips/stub-cache-mips.cc

Issue 78403002: MIPS: Use SmiTst and TrySmiTag MacroAssembler instructions. (Closed) Base URL: https://github.com/v8/v8.git@gbl
Patch Set: Created 7 years, 1 month 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 // 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 2298 matching lines...) Expand 10 before | Expand all | Expand 10 after
2309 GenerateGlobalReceiverCheck(Handle<JSObject>::cast(object), holder, name, 2309 GenerateGlobalReceiverCheck(Handle<JSObject>::cast(object), holder, name,
2310 &miss); 2310 &miss);
2311 GenerateLoadFunctionFromCell(cell, function, &miss); 2311 GenerateLoadFunctionFromCell(cell, function, &miss);
2312 } 2312 }
2313 2313
2314 // Load the (only) argument into v0. 2314 // Load the (only) argument into v0.
2315 __ lw(v0, MemOperand(sp, 0 * kPointerSize)); 2315 __ lw(v0, MemOperand(sp, 0 * kPointerSize));
2316 2316
2317 // If the argument is a smi, just return. 2317 // If the argument is a smi, just return.
2318 STATIC_ASSERT(kSmiTag == 0); 2318 STATIC_ASSERT(kSmiTag == 0);
2319 __ And(t0, v0, Operand(kSmiTagMask)); 2319 __ SmiTst(v0, t0);
2320 __ DropAndRet(argc + 1, eq, t0, Operand(zero_reg)); 2320 __ DropAndRet(argc + 1, eq, t0, Operand(zero_reg));
2321 2321
2322 __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK); 2322 __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK);
2323 2323
2324 Label wont_fit_smi, no_fpu_error, restore_fcsr_and_return; 2324 Label wont_fit_smi, no_fpu_error, restore_fcsr_and_return;
2325 2325
2326 // If fpu is enabled, we use the floor instruction. 2326 // If fpu is enabled, we use the floor instruction.
2327 2327
2328 // Load the HeapNumber value. 2328 // Load the HeapNumber value.
2329 __ ldc1(f0, FieldMemOperand(v0, HeapNumber::kValueOffset)); 2329 __ ldc1(f0, FieldMemOperand(v0, HeapNumber::kValueOffset));
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
3183 // ----------------------------------- 3183 // -----------------------------------
3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 3184 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
3185 } 3185 }
3186 3186
3187 3187
3188 #undef __ 3188 #undef __
3189 3189
3190 } } // namespace v8::internal 3190 } } // namespace v8::internal
3191 3191
3192 #endif // V8_TARGET_ARCH_MIPS 3192 #endif // V8_TARGET_ARCH_MIPS
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