Revision: 18943
Author: [email protected]
Date: Thu Jan 30 12:51:12 2014 UTC
Log: A64: Port LInstruction::VerifyCall().
[email protected], [email protected]
Review URL: https://codereview.chromium.org/136303006
http://code.google.com/p/v8/source/detail?r=18943
Modified:
/branches/experimental/a64/src/a64/lithium-a64.cc
=======================================
--- /branches/experimental/a64/src/a64/lithium-a64.cc Thu Jan 30 12:09:30
2014 UTC
+++ /branches/experimental/a64/src/a64/lithium-a64.cc Thu Jan 30 12:51:12
2014 UTC
@@ -42,6 +42,27 @@
LITHIUM_CONCRETE_INSTRUCTION_LIST(DEFINE_COMPILE)
#undef DEFINE_COMPILE
+#ifdef DEBUG
+void LInstruction::VerifyCall() {
+ // Call instructions can use only fixed registers as temporaries and
+ // outputs because all registers are blocked by the calling convention.
+ // Inputs operands must use a fixed register or use-at-start policy or
+ // a non-register policy.
+ ASSERT(Output() == NULL ||
+ LUnallocated::cast(Output())->HasFixedPolicy() ||
+ !LUnallocated::cast(Output())->HasRegisterPolicy());
+ for (UseIterator it(this); !it.Done(); it.Advance()) {
+ LUnallocated* operand = LUnallocated::cast(it.Current());
+ ASSERT(operand->HasFixedPolicy() ||
+ operand->IsUsedAtStart());
+ }
+ for (TempIterator it(this); !it.Done(); it.Advance()) {
+ LUnallocated* operand = LUnallocated::cast(it.Current());
+ ASSERT(operand->HasFixedPolicy() ||!operand->HasRegisterPolicy());
+ }
+}
+#endif
+
void LLabel::PrintDataTo(StringStream* stream) {
LGap::PrintDataTo(stream);
@@ -504,7 +525,9 @@
HInstruction* hinstr,
CanDeoptimize can_deoptimize) {
info()->MarkAsNonDeferredCalling();
- // TODO(all): Verify call in debug mode.
+#ifdef DEBUG
+ instr->VerifyCall();
+#endif
instr->MarkAsCall();
instr = AssignPointerMap(instr);
--
--
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/groups/opt_out.