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

[Xen-devel] [PATCH v4 07/44] 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>
---
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,4 @@
+override XEN_COMPILE_ARCH := x86_32
+XEN_ROOT = $(CURDIR)/../../../..
+VPATH += ..
+include ../Makefile
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -1,5 +1,7 @@
 
+ifeq ($(XEN_ROOT),)
 XEN_ROOT=$(CURDIR)/../../..
+endif
 include $(XEN_ROOT)/tools/Rules.mk
 
 TARGET := test_x86_emulator
@@ -18,6 +20,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="
 
@@ -139,6 +147,8 @@ $(addsuffix .h,$(SIMD) $(FMA) $(SG)): si
 
 xop.h: simd-fma.c
 
+endif # 32-bit override
+
 $(TARGET): x86-emulate.o test_x86_emulator.o evex-disp8.o wrappers.o
        $(HOSTCC) $(HOSTCFLAGS) -o $@ $^
 
@@ -153,6 +163,15 @@ distclean: clean
 .PHONY: install uninstall
 install uninstall:
 
+.PHONY: run32 clean32
+ifeq ($(XEN_TARGET_ARCH),x86_64)
+run32 clean32: %32: $(addsuffix .h,$(TESTCASES)) $(addsuffix 
-opmask.h,$(OPMASK))
+       $(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®.