We did not include test-i386-fprem.c test as it has four problems:
- it's the only tcg test declared as "slow", which would require to
  create a test suite just for it.
- it compares output to host which limits how to test it
- it produces a gigantic reference file (64MB)
- finally, because it is in its own category, it never runs, and thus
  it's currently broken, there are flags difference with existing
  qemu-i386.

If we want to resurrect it, we could generate a simple hash as output by
default, and store the reference, which would solve the first three
problems. Also, we could add an option to do a full dump for debugging
purpose, fix it, and solve 4.

Signed-off-by: Pierrick Bouvier <[email protected]>
---
 tests/tcg/i386/meson.build | 56 ++++++++++++++++++++++++++++++++++++++
 tests/tcg/meson.build      |  1 +
 2 files changed, 57 insertions(+)
 create mode 100644 tests/tcg/i386/meson.build

diff --git a/tests/tcg/i386/meson.build b/tests/tcg/i386/meson.build
new file mode 100644
index 00000000000..858485ab62c
--- /dev/null
+++ b/tests/tcg/i386/meson.build
@@ -0,0 +1,56 @@
+cc = 'i686-linux-gnu-gcc'
+cc_dockerfile = 'debian-i686-cross'
+cc_docker_arch = ['x86_64']
+
+tests = []
+
+tests += tcg_tests['multiarch-linux-user']['tests']
+
+tests += {
+  'hello-i386.c': {
+    'cflags': ['-ffreestanding', '-fno-stack-protector', '-nostdlib'],
+  },
+  'test-aes.c': {'cflags': ['-O1', '-msse2', '-maes']},
+  'test-i386-adcox.c': {'cflags': ['-O2']},
+  'test-i386-bmi2.c': {'cflags': ['-O2', '-fwrapv']},
+  'test-i386-f2xm1.c': {},
+  'test-i386-fbstp.c': {},
+  'test-i386-fisttp.c': {},
+  'test-i386-fldcst.c': {},
+  'test-i386-fp-exceptions.c': {},
+  # TODO: this test is too long, and its output needs to be compared to native
+  # execution. Make it faster, and compare only a hash as output.
+  #'test-i386-fprem.c': {},
+  'test-i386-fpatan.c': {},
+  'test-i386-fscale.c': {},
+  'test-i386-fxam.c': {},
+  'test-i386-fxtract.c': {},
+  'test-i386-fyl2x.c': {},
+  'test-i386-fyl2xp1.c': {},
+  'test-i386-pcmpistri.c': {'cflags': ['-msse4.2']},
+  'test-i386-pseudo-denormal.c': {},
+  'test-i386-snan-convert.c': {},
+  'test-i386-sse-exceptions.c': {'cflags': ['-msse4.1', '-mfpmath=sse']},
+  'test-i386.c': {
+    'cflags': [files('test-i386-code16.S'), files('test-i386-vm86.S'),
+               '-lm', '-fno-pie', '-Wl,--no-warn-rwx-segments'],
+  },
+  '../multiarch/sha512.c': {
+     'exe_name': 'sha512-sse',
+     'cflags': ['-msse4.1', '-O3'],
+  },
+}
+
+if 'qemu-i386' in emulators
+  tcg_tests += {
+    'i386-linux-user': {
+      'cc': cc,
+      'cc_dockerfile': cc_dockerfile,
+      'cc_docker_arch': cc_docker_arch,
+      'folder': 'i386',
+      'gdb_arch': 'i386',
+      'qemu': emulators['qemu-i386'],
+      'tests': tests,
+    }
+  }
+endif
diff --git a/tests/tcg/meson.build b/tests/tcg/meson.build
index 1eb887a8e3b..f1f27c2da1b 100644
--- a/tests/tcg/meson.build
+++ b/tests/tcg/meson.build
@@ -140,6 +140,7 @@ subdir('alpha')
 subdir('arm')
 subdir('hexagon')
 subdir('hppa')
+subdir('i386')
 
 image_targets = {}
 exe_targets = []
-- 
2.47.3


Reply via email to