From 8e8fbf193d61aebf7ac8817530cd1b9e6bc82651 Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Wed, 25 Jul 2018 16:07:35 +0000 Subject: [PATCH] Disable 'C'-compressed ISA extension. It works excellent, but KDB disassembler and DTrace FBT provider for RISC-V do lack support for it. They currently handle 4-byte instructions only, while C-compressed ISA extension introduces 2-byte instructions freely mixing them together. So disable it for now. Reviewed by: markj@ Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D16436 --- share/mk/bsd.cpu.mk | 4 ++-- stand/defs.mk | 2 +- sys/conf/kern.mk | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 5d0e69458b4c..1c2c32568da4 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -367,9 +367,9 @@ CFLAGS += -mcpu=8540 -Wa,-me500 -mspe=yes -mabi=spe -mfloat-gprs=double .if ${MACHINE_CPUARCH} == "riscv" .if ${MACHINE_ARCH:Mriscv*sf} -CFLAGS += -march=rv64imac -mabi=lp64 +CFLAGS += -march=rv64ima -mabi=lp64 .else -CFLAGS += -march=rv64imafdc -mabi=lp64d +CFLAGS += -march=rv64imafd -mabi=lp64d .endif .endif diff --git a/stand/defs.mk b/stand/defs.mk index fc810f294793..13314812bc85 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -103,7 +103,7 @@ CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only -fPIC .elif ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64imac -mabi=lp64 +CFLAGS+= -march=rv64ima -mabi=lp64 .else CFLAGS+= -msoft-float .endif diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index 910992c3ef7b..a58e0375c909 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -131,7 +131,7 @@ INLINE_LIMIT?= 8000 .endif .if ${MACHINE_CPUARCH} == "riscv" -CFLAGS.gcc+= -mcmodel=medany -march=rv64imafdc -mabi=lp64 +CFLAGS.gcc+= -mcmodel=medany -march=rv64imafd -mabi=lp64 INLINE_LIMIT?= 8000 .endif