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

Unified Diff: src/arm/code-stubs-arm.cc

Issue 12393008: [v8-dev] Split and replace the EmitVFPTruncate routine to only do what is needed. Floor (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | src/arm/stub-cache-arm.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
===================================================================
--- src/arm/code-stubs-arm.cc (revision 13783)
+++ src/arm/code-stubs-arm.cc (working copy)
@@ -853,13 +853,7 @@
__ sub(scratch1, object, Operand(kHeapObjectTag));
__ vldr(double_dst, scratch1, HeapNumber::kValueOffset);
- __ EmitVFPTruncate(kRoundToZero,
- scratch1,
- double_dst,
- scratch2,
- double_scratch,
- kCheckForInexactConversion);
-
+ __ TestDoubleIsInt32(double_dst, double_scratch);
// Jump to not_int32 if the operation did not succeed.
__ b(ne, not_int32);
@@ -951,13 +945,7 @@
__ sub(scratch1, object, Operand(kHeapObjectTag));
__ vldr(double_scratch0, scratch1, HeapNumber::kValueOffset);
- __ EmitVFPTruncate(kRoundToZero,
- dst,
- double_scratch0,
- scratch1,
- double_scratch1,
- kCheckForInexactConversion);
-
+ __ TryDoubleToInt32Exact(dst, double_scratch0, double_scratch1);
// Jump to not_int32 if the operation did not succeed.
__ b(ne, not_int32);
} else {
@@ -3056,16 +3044,14 @@
// Otherwise return a heap number if allowed, or jump to type
// transition.
- __ EmitVFPTruncate(kRoundToZero,
- scratch1,
- d5,
- scratch2,
- d8);
-
if (result_type_ <= BinaryOpIC::INT32) {
+ __ TryDoubleToInt32Exact(scratch1, d5, d8);
// If the ne condition is set, result does
// not fit in a 32-bit integer.
__ b(ne, &transition);
+ } else {
+ __ vcvt_s32_f64(s8, d5);
+ __ vmov(scratch1, s8);
}
// Check if the result fits in a smi.
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | src/arm/stub-cache-arm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698