aboutsummaryrefslogtreecommitdiff
path: root/machine/misaligned_ldst.c
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2016-12-06 15:49:59 -0800
committerAndrew Waterman <andrew@sifive.com>2016-12-06 15:49:59 -0800
commitf6b2274af4a91763ecdb94600d7d54d5f7f262b5 (patch)
tree0f4ad8f1df69ea97bb2626573c80854a1838cf53 /machine/misaligned_ldst.c
parente5ed1d115c178b87807a9d7c966dbaa2b3d3a92e (diff)
downloadpk-f6b2274af4a91763ecdb94600d7d54d5f7f262b5.zip
pk-f6b2274af4a91763ecdb94600d7d54d5f7f262b5.tar.gz
pk-f6b2274af4a91763ecdb94600d7d54d5f7f262b5.tar.bz2
avoid non-standard predefined macros
Diffstat (limited to 'machine/misaligned_ldst.c')
-rw-r--r--machine/misaligned_ldst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/machine/misaligned_ldst.c b/machine/misaligned_ldst.c
index dd56f7f..980aeba 100644
--- a/machine/misaligned_ldst.c
+++ b/machine/misaligned_ldst.c
@@ -19,7 +19,7 @@ void misaligned_load_trap(uintptr_t* regs, uintptr_t mcause, uintptr_t mepc)
int shift = 0, fp = 0, len;
if ((insn & MASK_LW) == MATCH_LW)
len = 4, shift = 8*(sizeof(uintptr_t) - len);
-#ifdef __riscv64
+#if __riscv_xlen == 64
else if ((insn & MASK_LD) == MATCH_LD)
len = 8, shift = 8*(sizeof(uintptr_t) - len);
else if ((insn & MASK_LWU) == MATCH_LWU)
@@ -62,7 +62,7 @@ void misaligned_store_trap(uintptr_t* regs, uintptr_t mcause, uintptr_t mepc)
val.intx = GET_RS2(insn, regs);
if ((insn & MASK_SW) == MATCH_SW)
len = 4;
-#ifdef __riscv64
+#if __riscv_xlen == 64
else if ((insn & MASK_SD) == MATCH_SD)
len = 8;
#endif