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

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

Issue 141593005: A64: Implement Smi support in MathAbs (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | test/cctest/test-assembler-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2523 matching lines...) Expand 10 before | Expand all | Expand 10 after
2534 } 2534 }
2535 2535
2536 // Load the (only) argument. 2536 // Load the (only) argument.
2537 Register arg = x0; 2537 Register arg = x0;
2538 __ Peek(arg, 0); 2538 __ Peek(arg, 0);
2539 2539
2540 // Check if the argument is a smi. 2540 // Check if the argument is a smi.
2541 Label not_smi; 2541 Label not_smi;
2542 __ JumpIfNotSmi(arg, &not_smi); 2542 __ JumpIfNotSmi(arg, &not_smi);
2543 2543
2544 __ SmiAbs(arg, x1, &slow); 2544 __ SmiAbs(arg, &slow);
2545 // Smi case done. 2545 // Smi case done.
2546 __ Drop(argc + 1); 2546 __ Drop(argc + 1);
2547 __ Ret(); 2547 __ Ret();
2548 2548
2549 // Check if the argument is a heap number and load its value. 2549 // Check if the argument is a heap number and load its value.
2550 __ Bind(&not_smi); 2550 __ Bind(&not_smi);
2551 __ CheckMap( 2551 __ CheckMap(
2552 arg, x1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK); 2552 arg, x1, Heap::kHeapNumberMapRootIndex, &slow, DONT_DO_SMI_CHECK);
2553 Register value = x1; 2553 Register value = x1;
2554 __ Ldr(value, FieldMemOperand(arg, HeapNumber::kValueOffset)); 2554 __ Ldr(value, FieldMemOperand(arg, HeapNumber::kValueOffset));
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
3265 3265
3266 // Miss case, call the runtime. 3266 // Miss case, call the runtime.
3267 __ Bind(&miss_force_generic); 3267 __ Bind(&miss_force_generic);
3268 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3268 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3269 } 3269 }
3270 3270
3271 3271
3272 } } // namespace v8::internal 3272 } } // namespace v8::internal
3273 3273
3274 #endif // V8_TARGET_ARCH_A64 3274 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/macro-assembler-a64.cc ('k') | test/cctest/test-assembler-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698