Reviewers: m.m.capewell, Rodolph Perfetta (ARM),
Message:
Committed patchset #1 manually as r18943 (presubmit successful).
Description:
A64: Port LInstruction::VerifyCall().
[email protected], [email protected]
Committed: https://code.google.com/p/v8/source/detail?r=18943
Please review this at https://codereview.chromium.org/136303006/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/a64
Affected files (+24, -1 lines):
M src/a64/lithium-a64.cc
Index: src/a64/lithium-a64.cc
diff --git a/src/a64/lithium-a64.cc b/src/a64/lithium-a64.cc
index
5863fd34a776cff80df18d56f756c62d72bef425..0f671eef901e61effa4553ae07fbf5d4717f772b
100644
--- a/src/a64/lithium-a64.cc
+++ b/src/a64/lithium-a64.cc
@@ -42,6 +42,27 @@ namespace internal {
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);
@@ -486,7 +507,9 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction*
instr,
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.