[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v5 04/47] x86emul: also allow running the 32-bit harness on a 64-bit distro



In order to be able to verify the 32-bit variant builds and runs,
introduce a respective target (and the necessary other adjustments).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v5: Use vpath directive instead of VPATH variable. Use ?= instead of
    ifeq(). Don't have clean32 depend on generated headers. Re-base.
v4: Moved ahead in series.
v3: New.

--- a/.gitignore
+++ b/.gitignore
@@ -240,6 +240,7 @@ tools/security/xensec_tool
 tools/tests/depriv/depriv-fd-checker
 tools/tests/x86_emulator/*.bin
 tools/tests/x86_emulator/*.tmp
+tools/tests/x86_emulator/32/x86_emulate
 tools/tests/x86_emulator/3dnow*.[ch]
 tools/tests/x86_emulator/asm
 tools/tests/x86_emulator/avx*.[ch]
--- /dev/null
+++ b/tools/tests/x86_emulator/32/Makefile
@@ -0,0 +1,5 @@
+override XEN_COMPILE_ARCH := x86_32
+XEN_ROOT = $(CURDIR)/../../../..
+vpath %.c ..
+vpath %.h ..
+include ../Makefile
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -1,5 +1,5 @@
 
-XEN_ROOT=$(CURDIR)/../../..
+XEN_ROOT ?= $(CURDIR)/../../..
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET := test_x86_emulator
@@ -23,6 +23,12 @@ TESTCASES := blowfish $(SIMD) $(FMA) $(S
 
 OPMASK := avx512f avx512dq avx512bw
 
+ifeq ($(origin XEN_COMPILE_ARCH),override)
+
+HOSTCFLAGS += -m32
+
+else
+
 blowfish-cflags := ""
 blowfish-cflags-x86_32 := "-mno-accumulate-outgoing-args -Dstatic="
 
@@ -144,6 +150,8 @@ $(addsuffix .h,$(SIMD) $(FMA) $(SG)): si
 
 xop.h: simd-fma.c
 
+endif # 32-bit override
+
 $(TARGET): x86-emulate.o cpuid.o test_x86_emulator.o evex-disp8.o wrappers.o
        $(HOSTCC) $(HOSTCFLAGS) -o $@ $^
 
@@ -158,6 +166,16 @@ distclean: clean
 .PHONY: install uninstall
 install uninstall:
 
+.PHONY: run32 clean32
+ifeq ($(XEN_TARGET_ARCH),x86_64)
+run32: $(addsuffix .h,$(TESTCASES)) $(addsuffix -opmask.h,$(OPMASK))
+run32 clean32: %32:
+       $(MAKE) -C 32 $*
+clean: clean32
+else
+run32 clean32: %32: %
+endif
+
 x86_emulate:
        [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/arch/x86/$@
 





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.