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

Side by Side Diff: src/arm64/lithium-codegen-arm64.cc

Issue 258933008: ARM64: Rename TryConvertDoubleToInt64 function (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.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 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 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after
2750 2750
2751 2751
2752 void LCodeGen::DoDoubleToIntOrSmi(LDoubleToIntOrSmi* instr) { 2752 void LCodeGen::DoDoubleToIntOrSmi(LDoubleToIntOrSmi* instr) {
2753 DoubleRegister input = ToDoubleRegister(instr->value()); 2753 DoubleRegister input = ToDoubleRegister(instr->value());
2754 Register result = ToRegister32(instr->result()); 2754 Register result = ToRegister32(instr->result());
2755 2755
2756 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 2756 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
2757 DeoptimizeIfMinusZero(input, instr->environment()); 2757 DeoptimizeIfMinusZero(input, instr->environment());
2758 } 2758 }
2759 2759
2760 __ TryConvertDoubleToInt32(result, input, double_scratch()); 2760 __ TryRepresentDoubleAsInt32(result, input, double_scratch());
2761 DeoptimizeIf(ne, instr->environment()); 2761 DeoptimizeIf(ne, instr->environment());
2762 2762
2763 if (instr->tag_result()) { 2763 if (instr->tag_result()) {
2764 __ SmiTag(result.X()); 2764 __ SmiTag(result.X());
2765 } 2765 }
2766 } 2766 }
2767 2767
2768 2768
2769 void LCodeGen::DoDrop(LDrop* instr) { 2769 void LCodeGen::DoDrop(LDrop* instr) {
2770 __ Drop(instr->count()); 2770 __ Drop(instr->count());
(...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 5501
5502 DoubleRegister dbl_scratch2 = ToDoubleRegister(temp2); 5502 DoubleRegister dbl_scratch2 = ToDoubleRegister(temp2);
5503 5503
5504 // Deoptimized if it's not a heap number. 5504 // Deoptimized if it's not a heap number.
5505 DeoptimizeIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex, 5505 DeoptimizeIfNotRoot(scratch1, Heap::kHeapNumberMapRootIndex,
5506 instr->environment()); 5506 instr->environment());
5507 5507
5508 // A heap number: load value and convert to int32 using non-truncating 5508 // A heap number: load value and convert to int32 using non-truncating
5509 // function. If the result is out of range, branch to deoptimize. 5509 // function. If the result is out of range, branch to deoptimize.
5510 __ Ldr(dbl_scratch1, FieldMemOperand(input, HeapNumber::kValueOffset)); 5510 __ Ldr(dbl_scratch1, FieldMemOperand(input, HeapNumber::kValueOffset));
5511 __ TryConvertDoubleToInt32(output, dbl_scratch1, dbl_scratch2); 5511 __ TryRepresentDoubleAsInt32(output, dbl_scratch1, dbl_scratch2);
5512 DeoptimizeIf(ne, instr->environment()); 5512 DeoptimizeIf(ne, instr->environment());
5513 5513
5514 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { 5514 if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
5515 __ Cmp(output, 0); 5515 __ Cmp(output, 0);
5516 __ B(ne, &done); 5516 __ B(ne, &done);
5517 __ Fmov(scratch1, dbl_scratch1); 5517 __ Fmov(scratch1, dbl_scratch1);
5518 DeoptimizeIfNegative(scratch1, instr->environment()); 5518 DeoptimizeIfNegative(scratch1, instr->environment());
5519 } 5519 }
5520 } 5520 }
5521 __ Bind(&done); 5521 __ Bind(&done);
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
5899 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); 5899 __ Ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset));
5900 // Index is equal to negated out of object property index plus 1. 5900 // Index is equal to negated out of object property index plus 1.
5901 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2)); 5901 __ Sub(result, result, Operand::UntagSmiAndScale(index, kPointerSizeLog2));
5902 __ Ldr(result, FieldMemOperand(result, 5902 __ Ldr(result, FieldMemOperand(result,
5903 FixedArray::kHeaderSize - kPointerSize)); 5903 FixedArray::kHeaderSize - kPointerSize));
5904 __ Bind(deferred->exit()); 5904 __ Bind(deferred->exit());
5905 __ Bind(&done); 5905 __ Bind(&done);
5906 } 5906 }
5907 5907
5908 } } // namespace v8::internal 5908 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698