Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi For completion. This is my poor man tbm test. It has run for 5 minutes with no errors gcc tbm.c -O3 -march=native -o pc gcc tbm.c -mtbm -O3 for a in $(seq 0 65535); do /tmp/qemu/x86_64-linux-user/qemu-x86_64 -cpu qemu64,+tbm ./a.out $a >/tmp/res.qemu ; ./pc $a > /tmp/res.pc ; if ! diff /

Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi again Some progress here, I think that I have found a bug in andn, I have already send a patch. I have made a rudimentary testcase for bmi. I will try tomorrow o build something similar for tbm. For reference, I am using this script: for a in $(seq 0 255); do for b in $(seq 0 255); do for c

Re: [Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-13 Thread Ricardo Ribalda Delgado
Hi Richard The simple example works as expected, but my big application (gobject-introspection) still crashes with sigsegv :(. it seems to be something related to the bmi and tbm instructions. If I disable them in gcc ( -mno-bmi -mno-tbm), the application runs ok. A look at qemu's code does not

[Qemu-devel] [PATCH v2] target/i386: Fix BLSR and BLSI

2017-07-12 Thread Richard Henderson
The implementation of these two instructions was swapped. At the same time, unify the setup of eflags for the insn group. Reported-by: Ricardo Ribalda Delgado Signed-off-by: Richard Henderson --- target/i386/translate.c | 26 +- 1 file changed, 9 insertions(+), 17 deleti