summaryrefslogtreecommitdiff
path: root/mk/rte.cpuflags.mk
diff options
context:
space:
mode:
authorChao Zhu <chaozhu@linux.vnet.ibm.com>2014-11-25 17:17:11 -0500
committerThomas Monjalon <thomas.monjalon@6wind.com>2014-11-26 21:50:10 +0100
commit9ae155385686239daff9a995d7a4875783faaba1 (patch)
tree2fd6e2945164b7e474ffb0e842db1f28c31e8bd7 /mk/rte.cpuflags.mk
parent7302a1724b4922bfa4e5a89729f035ed76766c6d (diff)
downloaddpdk-9ae155385686239daff9a995d7a4875783faaba1.zip
dpdk-9ae155385686239daff9a995d7a4875783faaba1.tar.gz
dpdk-9ae155385686239daff9a995d7a4875783faaba1.tar.xz
eal/ppc: cpu flag checks for IBM Power
IBM Power processor doesn't have CPU flag hardware registers. This patch uses aux vector software register to get CPU flags and add CPU flag checking support for IBM Power architecture. Signed-off-by: Chao Zhu <chaozhu@linux.vnet.ibm.com> Acked-by: David Marchand <david.marchand@6wind.com>
Diffstat (limited to 'mk/rte.cpuflags.mk')
-rw-r--r--mk/rte.cpuflags.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index 65332e1..f595cd0 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -89,6 +89,23 @@ ifneq ($(filter $(AUTO_CPUFLAGS),__AVX2__),)
CPUFLAGS += AVX2
endif
+# IBM Power CPU flags
+ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),)
+CPUFLAGS += PPC64
+endif
+
+ifneq ($(filter $(AUTO_CPUFLAGS),__PPC32__),)
+CPUFLAGS += PPC32
+endif
+
+ifneq ($(filter $(AUTO_CPUFLAGS),__vector),)
+CPUFLAGS += ALTIVEC
+endif
+
+ifneq ($(filter $(AUTO_CPUFLAGS),__builtin_vsx_xvnmaddadp),)
+CPUFLAGS += VSX
+endif
+
MACHINE_CFLAGS += $(addprefix -DRTE_MACHINE_CPUFLAG_,$(CPUFLAGS))
# To strip whitespace