diff options
author | Alexey Brodkin <abrodkin@synopsys.com> | 2015-07-16 14:45:38 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2015-07-20 06:33:30 -0400 |
commit | d05a76ab4d9ece9bd987a8c29e3f384ec9f7b211 (patch) | |
tree | 9d9dd4e73a0836a2702f98372bdb063341a01a6c | |
parent | aeec6cdad6cda5fdf26f937c0d15f101539d8185 (diff) |
ARCv2: add knob for DIV_REV in Kconfig
Being highly configurable core ARC HS among other features might be
configured with or without DIV_REM_OPTION (hardware divider).
That option when enabled adds following instructions: div, divu, rem, remu.
By default ARC HS38 has this option enabled. So we add here possibility
to disable usage of hardware divider by compiler.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/Kconfig | 4 | ||||
-rw-r--r-- | arch/arc/Makefile | 10 |
2 files changed, 13 insertions, 1 deletions
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig index 91cf4055acab..f7cfa7d574f6 100644 --- a/arch/arc/Kconfig +++ b/arch/arc/Kconfig | |||
@@ -379,6 +379,10 @@ config ARC_HAS_LL64 | |||
379 | dest operands with 2 possible source operands. | 379 | dest operands with 2 possible source operands. |
380 | default y | 380 | default y |
381 | 381 | ||
382 | config ARC_HAS_DIV_REM | ||
383 | bool "Insn: div, divu, rem, remu" | ||
384 | default y | ||
385 | |||
382 | config ARC_HAS_RTC | 386 | config ARC_HAS_RTC |
383 | bool "Local 64-bit r/o cycle counter" | 387 | bool "Local 64-bit r/o cycle counter" |
384 | default n | 388 | default n |
diff --git a/arch/arc/Makefile b/arch/arc/Makefile index 46d87310220d..8a27a48304a4 100644 --- a/arch/arc/Makefile +++ b/arch/arc/Makefile | |||
@@ -36,8 +36,16 @@ cflags-$(atleast_gcc44) += -fsection-anchors | |||
36 | cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock | 36 | cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock |
37 | cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape | 37 | cflags-$(CONFIG_ARC_HAS_SWAPE) += -mswape |
38 | 38 | ||
39 | ifdef CONFIG_ISA_ARCV2 | ||
40 | |||
39 | ifndef CONFIG_ARC_HAS_LL64 | 41 | ifndef CONFIG_ARC_HAS_LL64 |
40 | cflags-$(CONFIG_ISA_ARCV2) += -mno-ll64 | 42 | cflags-y += -mno-ll64 |
43 | endif | ||
44 | |||
45 | ifndef CONFIG_ARC_HAS_DIV_REM | ||
46 | cflags-y += -mno-div-rem | ||
47 | endif | ||
48 | |||
41 | endif | 49 | endif |
42 | 50 | ||
43 | cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables | 51 | cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables |