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