From 044dde71e0e6885043cdf6dd17ff8dc890608802 Mon Sep 17 00:00:00 2001 From: Commeownist Date: Wed, 15 Sep 2021 22:14:17 +0300 Subject: [PATCH] Dump register variables correctly --- gcc/jit/jit-recording.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/jit/jit-recording.c b/gcc/jit/jit-recording.c index 96de3b522b7b9..3c647d5b79713 100644 --- a/gcc/jit/jit-recording.c +++ b/gcc/jit/jit-recording.c @@ -6259,11 +6259,17 @@ recording::local::replay_into (replayer *r) void recording::local::write_to_dump (dump &d) { - if (d.update_locations ()) - m_loc = d.make_location (); - d.write(" %s %s;\n", - m_type->get_debug_string (), - get_debug_string ()); + if (d.update_locations ()) + m_loc = d.make_location (); + if (m_reg_name) + d.write(" register %s %s asm (\"%s\");\n", + m_type->get_debug_string (), + get_debug_string (), + m_reg_name->c_str()); + else + d.write(" %s %s;\n", + m_type->get_debug_string (), + get_debug_string ()); } void