From 6427012c6de3daf4a108cbda17d4ceb6a79a9d91 Mon Sep 17 00:00:00 2001 From: Tim Newsome Date: Wed, 7 Dec 2016 20:03:36 -0800 Subject: [PATCH] Use our own XLEN macro. Relying on something that the compiler automatically sets is apparently not reliable. --- debug/programs/regs.S | 2 +- debug/targets.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debug/programs/regs.S b/debug/programs/regs.S index 5c4f462..200184d 100644 --- a/debug/programs/regs.S +++ b/debug/programs/regs.S @@ -1,4 +1,4 @@ -#if __riscv_xlen == 64 +#if XLEN == 64 # define LREG ld # define SREG sd # define REGBYTES 8 diff --git a/debug/targets.py b/debug/targets.py index d1ba964..8c725c4 100644 --- a/debug/targets.py +++ b/debug/targets.py @@ -49,6 +49,7 @@ class Target(object): "-T", "targets/%s/link.lds" % (self.directory or self.name), "-nostartfiles", "-mcmodel=medany", + "-DXLEN=%d" % self.xlen, "-o", binary_name), xlen=self.xlen) return binary_name -- 2.30.2