Skip to content

Commit

Permalink
Enable 'C'-compressed ISA extension.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bukinr committed Sep 3, 2018
1 parent 639c5f4 commit 2f2449c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions share/mk/bsd.cpu.mk
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion stand/defs.mk
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sys/conf/kern.mk
Expand Up @@ -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

Expand Down

0 comments on commit 2f2449c

Please sign in to comment.