qemu-e2k/tests/tcg/i386
Paolo Bonzini e7bbb7cb71 target/i386: introduce flags writeback mechanism
ALU instructions can write to both memory and flags.  If the CC_SRC*
and CC_DST locations have been written already when a memory access
causes a fault, the value in CC_SRC* and CC_DST might be interpreted
with the wrong CC_OP (the one that is in effect before the instruction.

Besides just using the wrong result for the flags, something like
subtracting -1 can have disastrous effects if the current CC_OP is
CC_OP_EFLAGS: this is because QEMU does not expect bits outside the ALU
flags to be set in CC_SRC, and env->eflags can end up set to all-ones.
In the case of the attached testcase, this sets IOPL to 3 and would
cause an assertion failure if SUB is moved to the new decoder.

This mechanism is not really needed for BMI instructions, which can
only write to a register, but put it to use anyway for cleanliness.
In the case of BZHI, the code has to be modified slightly to ensure
that decode->cc_src is written, otherwise the new assertions trigger.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2023-12-29 22:04:30 +01:00
..
system i386: spelling fixes 2023-09-20 07:54:34 +03:00
float_convd.conf tests/tcg: add float_convd test 2022-04-20 16:04:20 +01:00
float_convs.ref tests/tcg: add missing reference files for float_convs 2022-04-20 16:04:20 +01:00
hello-i386.c
Makefile.softmmu-target tests/plugin: Remove duplicate insn log from libinsn.so 2023-06-26 17:33:00 +02:00
Makefile.target target/i386: introduce flags writeback mechanism 2023-12-29 22:04:30 +01:00
README tests/tcg: i386: add SSE tests 2022-09-01 20:16:33 +02:00
test-3dnow.c tests/tcg: i386: add MMX and 3DNow! tests 2022-09-19 15:14:40 +02:00
test-aes.c tests/multiarch: Add test-aes 2023-07-08 07:30:17 +01:00
test-avx.c tests/tcg/i386: initialize more registers in test-avx 2023-10-25 17:35:07 +02:00
test-avx.py tests/tcg/i386: test-avx: add test cases for SHA new instructions 2023-10-25 17:35:07 +02:00
test-flags.c target/i386: introduce flags writeback mechanism 2023-12-29 22:04:30 +01:00
test-i386-adcox.c target/i386: fix ADOX followed by ADCX 2023-02-11 09:07:25 +01:00
test-i386-bmi2.c target/i386: Fix BZHI instruction 2023-02-27 09:18:55 +01:00
test-i386-code16.S
test-i386-f2xm1.c
test-i386-fbstp.c
test-i386-fisttp.c
test-i386-fldcst.c
test-i386-fp-exceptions.c tests/tcg/i386: Use explicit suffix on fist insns 2022-06-14 00:15:04 +01:00
test-i386-fpatan.c
test-i386-fprem.c
test-i386-fscale.c
test-i386-fxam.c
test-i386-fxtract.c
test-i386-fyl2x.c
test-i386-fyl2xp1.c
test-i386-muldiv.h
test-i386-pcmpistri.c
test-i386-pseudo-denormal.c
test-i386-shift.h
test-i386-snan-convert.c
test-i386-sse-exceptions.c
test-i386-ssse3.c
test-i386-vm86.S
test-i386.c tests/tcg: remove old SSE tests 2022-09-19 15:15:59 +02:00
test-i386.h
test-mmx.c tests/tcg: i386: add MMX and 3DNow! tests 2022-09-19 15:14:40 +02:00
test-mmx.py tests/tcg: i386: add MMX and 3DNow! tests 2022-09-19 15:14:40 +02:00
x86.csv i386: spelling fixes 2023-09-20 07:54:34 +03:00

These are i386 specific guest programs

test-i386
---------

This program executes most of the 16 bit and 32 bit x86 instructions and
generates a text output, for comparison with the output obtained with
a real CPU or another emulator.

The Linux system call modify_ldt() is used to create x86 selectors
to test some 16 bit addressing and 32 bit with segmentation cases.

The Linux system call vm86() is used to test vm86 emulation.

Various exceptions are raised to test most of the x86 user space
exception reporting.

test-avx
--------

This program executes most SSE/AVX instructions and generates a text output,
for comparison with the output obtained with a real CPU or another emulator.

test-avx.h is generate from x86.csv by test-avx.py
x86.csv comes from https://github.com/quasilyte/avx512test

linux-test
----------

This program tests various Linux system calls. It is used to verify
that the system call parameters are correctly converted between target
and host CPUs.

test-i386-fprem
---------------

test-mmap
---------

sha1
----

hello-i386
----------