Revision: 23528
Author: [email protected]
Date: Fri Aug 29 18:46:30 2014 UTC
Log: [turbofan] Allow unittest to call TruncateDoubleToI.
Switches stack pointer if necessary.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/519713002
https://code.google.com/p/v8/source/detail?r=23528
Modified:
/branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc
/branches/bleeding_edge/test/cctest/cctest.status
=======================================
--- /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Thu Aug 7
10:46:40 2014 UTC
+++ /branches/bleeding_edge/src/arm64/macro-assembler-arm64.cc Fri Aug 29
18:46:30 2014 UTC
@@ -3013,11 +3013,21 @@
void MacroAssembler::TruncateDoubleToI(Register result,
DoubleRegister double_input) {
Label done;
- DCHECK(jssp.Is(StackPointer()));
// Try to convert the double to an int64. If successful, the bottom 32
bits
// contain our truncated int32 result.
TryConvertDoubleToInt64(result, double_input, &done);
+
+ const Register old_stack_pointer = StackPointer();
+ if (csp.Is(old_stack_pointer)) {
+ // This currently only happens during compiler-unittest. If it arises
+ // during regular code generation the DoubleToI stub should be updated
to
+ // cope with csp and have an extra parameter indicating which stack
pointer
+ // it should use.
+ Push(jssp, xzr); // Push xzr to maintain csp required 16-bytes
alignment.
+ Mov(jssp, csp);
+ SetStackPointer(jssp);
+ }
// If we fell through then inline version didn't succeed - call stub
instead.
Push(lr, double_input);
@@ -3030,8 +3040,15 @@
true); // skip_fastpath
CallStub(&stub); // DoubleToIStub preserves any registers it needs to
clobber
- Drop(1, kDoubleSize); // Drop the double input on the stack.
- Pop(lr);
+ DCHECK_EQ(xzr.SizeInBytes(), double_input.SizeInBytes());
+ Pop(xzr, lr); // xzr to drop the double input on the stack.
+
+ if (csp.Is(old_stack_pointer)) {
+ Mov(csp, jssp);
+ SetStackPointer(csp);
+ AssertStackConsistency();
+ Pop(xzr, jssp);
+ }
Bind(&done);
}
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status Fri Aug 29 08:58:51
2014 UTC
+++ /branches/bleeding_edge/test/cctest/cctest.status Fri Aug 29 18:46:30
2014 UTC
@@ -195,9 +195,6 @@
# BUG(v8:3434).
' test-api/LoadICFastApi_DirectCall_GCMoveStubWithProfiler': [SKIP],
-
- # TODO(rodolph): Please investigate.
- 'test-run-machops/RunTruncateFloat64ToInt32P': [SKIP],
}], # 'arch == arm64'
['arch == arm64 and simulator_run == True', {
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.