Richard Henderson <r...@twiddle.net> writes:

  On 01/14/2013 10:14 AM, Torbjorn Granlund wrote:
  > Is it in such a state that grabbing that repo and building a
  > qemu-system-x86_64 would give me MULX support?
  
  Yes, and "-cpu Haswell" will enable the BMI extensions.
  
  A review of the code and docs reveals that I missed RORX
  from the BMI2 insns, but that's the only one I missed.
  
  Note that I also incorrectly set the overflow flag in
  several of the BMI insns.  It ought to be 0, and I currently
  set it as if by a standard arithmetic insn.
  
  I can also suggest using "qemu-x86_64" for userland linux
  emulation, rather than full system emulation, for testing
  something as well-behaved as gmp.  In partiular, the way
  memory accesses are translated is significantly faster.
  
I compiled your version.  It does not work for me:

        tutu$ gcc -static^C/foo.s && qemu-x86_64 -cpu Haswell ./a.out

        tutu$ cat ~/foo.s
                .text
                .globl  main
                .type   main, @function
        main:   mulx    %rax, %r8, %r9
                ret

        tutu$ gcc ~/foo.s

        tutu$ qemu-x86_64 -cpu Haswell ./a.out
        qemu: uncaught target signal 4 (Illegal instruction) - core dumped
        Illegal instruction

If I remove the mulx, the example runs.

I copied your sources using this command:

  git clone git://repo.or.cz/qemu/rth.git qemu-x86-rth  

There seem to be no mention of MULX in the i386 subdirectory.

-- 
Torbjörn

Reply via email to