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

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

Issue 199183002: A64: Remove temporary sxtw instructions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 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 2806 matching lines...) Expand 10 before | Expand all | Expand 10 after
2817 result, 2817 result,
2818 0, 2818 0,
2819 true, // is_truncating 2819 true, // is_truncating
2820 true); // skip_fastpath 2820 true); // skip_fastpath
2821 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber 2821 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber
2822 2822
2823 Drop(1, kDoubleSize); // Drop the double input on the stack. 2823 Drop(1, kDoubleSize); // Drop the double input on the stack.
2824 Pop(lr); 2824 Pop(lr);
2825 2825
2826 Bind(&done); 2826 Bind(&done);
2827
2828 // TODO(rmcilroy): Remove this Sxtw once the following bug is fixed:
2829 // https://code.google.com/p/v8/issues/detail?id=3149
2830 Sxtw(result, result.W());
2831 } 2827 }
2832 2828
2833 2829
2834 void MacroAssembler::TruncateHeapNumberToI(Register result, 2830 void MacroAssembler::TruncateHeapNumberToI(Register result,
2835 Register object) { 2831 Register object) {
2836 Label done; 2832 Label done;
2837 ASSERT(!result.is(object)); 2833 ASSERT(!result.is(object));
2838 ASSERT(jssp.Is(StackPointer())); 2834 ASSERT(jssp.Is(StackPointer()));
2839 2835
2840 Ldr(fp_scratch, FieldMemOperand(object, HeapNumber::kValueOffset)); 2836 Ldr(fp_scratch, FieldMemOperand(object, HeapNumber::kValueOffset));
2841 2837
2842 // Try to convert the double to an int64. If successful, the bottom 32 bits 2838 // Try to convert the double to an int64. If successful, the bottom 32 bits
2843 // contain our truncated int32 result. 2839 // contain our truncated int32 result.
2844 TryConvertDoubleToInt64(result, fp_scratch, &done); 2840 TryConvertDoubleToInt64(result, fp_scratch, &done);
2845 2841
2846 // If we fell through then inline version didn't succeed - call stub instead. 2842 // If we fell through then inline version didn't succeed - call stub instead.
2847 Push(lr); 2843 Push(lr);
2848 DoubleToIStub stub(object, 2844 DoubleToIStub stub(object,
2849 result, 2845 result,
2850 HeapNumber::kValueOffset - kHeapObjectTag, 2846 HeapNumber::kValueOffset - kHeapObjectTag,
2851 true, // is_truncating 2847 true, // is_truncating
2852 true); // skip_fastpath 2848 true); // skip_fastpath
2853 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber 2849 CallStub(&stub); // DoubleToIStub preserves any registers it needs to clobber
2854 Pop(lr); 2850 Pop(lr);
2855 2851
2856 Bind(&done); 2852 Bind(&done);
2857
2858 // TODO(rmcilroy): Remove this Sxtw once the following bug is fixed:
2859 // https://code.google.com/p/v8/issues/detail?id=3149
2860 Sxtw(result, result.W());
2861 } 2853 }
2862 2854
2863 2855
2864 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) { 2856 void MacroAssembler::Prologue(PrologueFrameMode frame_mode) {
2865 if (frame_mode == BUILD_STUB_FRAME) { 2857 if (frame_mode == BUILD_STUB_FRAME) {
2866 ASSERT(StackPointer().Is(jssp)); 2858 ASSERT(StackPointer().Is(jssp));
2867 UseScratchRegisterScope temps(this); 2859 UseScratchRegisterScope temps(this);
2868 Register temp = temps.AcquireX(); 2860 Register temp = temps.AcquireX();
2869 __ Mov(temp, Operand(Smi::FromInt(StackFrame::STUB))); 2861 __ Mov(temp, Operand(Smi::FromInt(StackFrame::STUB)));
2870 // Compiled stubs don't age, and so they don't need the predictable code 2862 // Compiled stubs don't age, and so they don't need the predictable code
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
5129 } 5121 }
5130 } 5122 }
5131 5123
5132 5124
5133 #undef __ 5125 #undef __
5134 5126
5135 5127
5136 } } // namespace v8::internal 5128 } } // namespace v8::internal
5137 5129
5138 #endif // V8_TARGET_ARCH_A64 5130 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698