Re: [Qemu-devel] [PATCH 1/2] tcg/mips: detect available host instructions at runtime

2013-08-15 Thread Maciej W. Rozycki
On Thu, 15 Aug 2013, Aurelien Jarno wrote: > > The MIPS32 instructions missing from Vr5500 are the EJTAG stuff (DERET > > and SDBBP), JR.HB/JALR.HB (hmm, weird -- these are actually not guaranteed > > to work on all MIPS32 chips either, e.g. the 4Kc didn't support these > > encodings and trapp

Re: [Qemu-devel] [PATCH 1/2] tcg/mips: detect available host instructions at runtime

2013-08-15 Thread Aurelien Jarno
On Thu, Aug 15, 2013 at 05:52:55PM +0100, Maciej W. Rozycki wrote: > On Thu, 15 Aug 2013, Aurelien Jarno wrote: > > > +/* Probe for MIPS32 instructions. As no subsetting is allowed > > + by the specification, it is only necessary to probe for one > > + of the instructions. */ > > +

Re: [Qemu-devel] [PATCH 1/2] tcg/mips: detect available host instructions at runtime

2013-08-15 Thread Maciej W. Rozycki
On Thu, 15 Aug 2013, Aurelien Jarno wrote: > +/* Probe for MIPS32 instructions. As no subsetting is allowed > + by the specification, it is only necessary to probe for one > + of the instructions. */ > +#ifndef use_mips32_instructions > +got_sigill = 0; > +asm volatile(".se

[Qemu-devel] [PATCH 1/2] tcg/mips: detect available host instructions at runtime

2013-08-15 Thread Aurelien Jarno
Now that TCG supports enabling and disabling ops at runtime, it's possible to detect the available host instructions at runtime, and enable the corresponding ops accordingly. Unfortunately it's not easy to probe for available instructions on MIPS, the information is partially available in /proc/cp