From 596762ee4b98c9c6bcd2b3f0bd67e2c5f5cae6ed Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 19 Dec 2016 15:24:47 +0000 Subject: [PATCH] print-rtl.c: use '<' and '>' rather than % for pseudos in compact mode gcc/ChangeLog: * print-rtl.c (rtx_writer::print_rtx_operand_code_r): For non-virtual pseudos in compact mode, wrap the regno in '<' and '>' rather than using a '%' prefix. * rtl-tests.c (selftest::test_dumping_regs): Update for above change. From-SVN: r243798 --- gcc/ChangeLog | 7 +++++++ gcc/print-rtl.c | 8 ++++---- gcc/rtl-tests.c | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8255e501d91..e3a90ba3759 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-12-19 David Malcolm + + * print-rtl.c (rtx_writer::print_rtx_operand_code_r): For + non-virtual pseudos in compact mode, wrap the regno in '<' and '>' + rather than using a '%' prefix. + * rtl-tests.c (selftest::test_dumping_regs): Update for above change. + 2016-12-19 Dominik Vogt PR target/78748 diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index 3bbd395c5b4..ee4b74a3e8b 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -481,11 +481,11 @@ rtx_writer::print_rtx_operand_code_r (const_rtx in_rtx) fputc ('#', m_outfile); else if (m_compact) { - /* In compact mode, print pseudos with a '%' sigil following - by the regno, offset by (LAST_VIRTUAL_REGISTER + 1), so that the - first non-virtual pseudo is dumped as "%0". */ + /* In compact mode, print pseudos with '< and '>' wrapping the regno, + offseting it by (LAST_VIRTUAL_REGISTER + 1), so that the + first non-virtual pseudo is dumped as "<0>". */ gcc_assert (regno > LAST_VIRTUAL_REGISTER); - fprintf (m_outfile, " %%%d", regno - (LAST_VIRTUAL_REGISTER + 1)); + fprintf (m_outfile, " <%d>", regno - (LAST_VIRTUAL_REGISTER + 1)); } else fprintf (m_outfile, " %d", regno); diff --git a/gcc/rtl-tests.c b/gcc/rtl-tests.c index 8edddfbca86..57f9e14f2ab 100644 --- a/gcc/rtl-tests.c +++ b/gcc/rtl-tests.c @@ -104,9 +104,9 @@ test_dumping_regs () } /* Test dumping of non-virtual pseudos. */ - ASSERT_RTL_DUMP_EQ ("(reg:SI %0)", + ASSERT_RTL_DUMP_EQ ("(reg:SI <0>)", gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 1)); - ASSERT_RTL_DUMP_EQ ("(reg:SI %1)", + ASSERT_RTL_DUMP_EQ ("(reg:SI <1>)", gen_raw_REG (SImode, LAST_VIRTUAL_REGISTER + 2)); } -- 2.30.2