1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2007 - 2016 Michal Simek
4#
5# Michal SIMEK <monstr@monstr.eu>
6
7CPU_VER := $(shell echo $(CONFIG_XILINX_MICROBLAZE0_HW_VER))
8
9# USE_HW_MUL can be 0, 1, or 2, defining a hierarchy of HW Mul support.
10CPUFLAGS-$(subst 1,,$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL)) += -mxl-multiply-high
11CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_HW_MUL) += -mno-xl-soft-mul
12CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_DIV) += -mno-xl-soft-div
13CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_BARREL) += -mxl-barrel-shift
14CPUFLAGS-$(CONFIG_XILINX_MICROBLAZE0_USE_PCMP_INSTR) += -mxl-pattern-compare
15
16CPUFLAGS-1 += $(call cc-option,-mcpu=v$(CPU_VER))
17
18PLATFORM_CPPFLAGS += $(CPUFLAGS-1) $(CPUFLAGS-2)
19