From 0d929287d77ccc3fb52ca8bd072678b5ae2c81c8 Mon Sep 17 00:00:00 2001 From: Thomas Bracht Laumann Jespersen Date: Thu, 26 Jan 2023 12:09:44 +0100 Subject: implement line number info tracking Support "file" and "loc" directives. "file" takes a string (a file name) assigns it a number, sets the current file to that number and records the string for later. "loc" takes a single number and outputs location information with a reference to the current file. --- rv64/emit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rv64') diff --git a/rv64/emit.c b/rv64/emit.c index acb6df3..6044dee 100644 --- a/rv64/emit.c +++ b/rv64/emit.c @@ -405,6 +405,9 @@ emitins(Ins *i, Fn *fn, FILE *f) if (!req(i->to, R)) emitf("mv %=, sp", i, fn, f); break; + case Oloc: + emitdbgloc(i->arg[0].val, f); + break; } } -- cgit 1.4.1