From 888c8381ad68f79ba2aa77b6d87c615cc21fd8fe Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Mon, 3 Sep 2018 14:43:16 +0000 Subject: [PATCH] Enable 'C'-compressed ISA extension. This was disabled recently due to lack of support in KDB disassembler and DTrace FBT provider. Support for 'C'-extension to both of these was added, so we can now enable 'C'-extension. This reduces size of the kernel important for low-end embedded devices, and saves cache footprint for high perfomance machines. Approved by: re (kib) Sponsored by: DARPA, AFRL --- 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 1c2c32568da4..5d0e69458b4c 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=rv64ima -mabi=lp64 +CFLAGS += -march=rv64imac -mabi=lp64 .else -CFLAGS += -march=rv64imafd -mabi=lp64d +CFLAGS += -march=rv64imafdc -mabi=lp64d .endif .endif diff --git a/stand/defs.mk b/stand/defs.mk index 87fb20880462..c578f001f0a6 100644 --- a/stand/defs.mk +++ b/stand/defs.mk @@ -108,7 +108,7 @@ CFLAGS+= -ffreestanding ${CFLAGS_NO_SIMD} .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only -fPIC .elif ${MACHINE_CPUARCH} == "riscv" -CFLAGS+= -march=rv64ima -mabi=lp64 +CFLAGS+= -march=rv64imac -mabi=lp64 .else CFLAGS+= -msoft-float .endif diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index a58e0375c909..910992c3ef7b 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=rv64imafd -mabi=lp64 +CFLAGS.gcc+= -mcmodel=medany -march=rv64imafdc -mabi=lp64 INLINE_LIMIT?= 8000 .endif