From: Tim Newsome Date: Thu, 8 Dec 2016 04:03:36 +0000 (-0800) Subject: Use our own XLEN macro. X-Git-Url: https://git.libre-soc.org/?p=riscv-tests.git;a=commitdiff_plain;h=6427012c6de3daf4a108cbda17d4ceb6a79a9d91;hp=0949ce92a07ee76ad15907b0021addd8a9b053e5 Use our own XLEN macro. Relying on something that the compiler automatically sets is apparently not reliable. --- 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