[MIPS] Add new virtualization instructions
Maciej W. Rozycki
macro@codesourcery.com
Thu Jun 13 18:04:00 GMT 2013
On Thu, 13 Jun 2013, Chao-Ying Fu wrote:
> > Why do you need to change it? It's proved useful in finding
> > bugs -- ASEs
> > that should be made available to microMIPS assembly
> > unconditionally such
> > as with the EVA support discussed as recently as yesterday.
>
> If I add -mips64r2 to the as flag for the micromips@virt64.d test,
> I will get this error.
>
> Ex: micromips@virt64.d
> #objdump: -dr --prefix-addresses --show-raw-insn -Mvirt,cp0-names=mips64r2
> #name: virt64 instructions
> #source: virt64.s
> #as: -64 -mvirt -mips64r2
> ....
>
> Ex: Testing
> ../as-new -64 -mvirt -mips64r2 -march=mips64 -mmicromips -o dump.o /home/fu/dev
> /gcc-mainline/src/gas/testsuite/gas/mips/virt64.s
> Executing on host: sh -c {../as-new -64 -mvirt -mips64r2 -march=mips64 -mmicrom
> ips -o dump.o /home/fu/dev/gcc-mainline/src/gas/testsuite/gas/mips/virt64.s 2>&1
> } /dev/null gas.out (timeout = 300)
> Assembler messages:
> Error: -mips64r2 conflicts with the other architecture options, which imply -mip
> s64
> /home/fu/dev/gcc-mainline/src/gas/testsuite/gas/mips/virt64.s:5: Error: Opcode n
> ot supported on this processor: mips64 (mips64) `dmfgc0 $3,$29'
> ....
>
> Or, if I change ISA_SUPPORTS_VIRT64_ASE to support micromips with MIPS64,
> I won't need the mips64r2 change in mips.exp and the micromips virt64
> test will run.
> Ex:
> Index: config/tc-mips.c
> ===================================================================
> RCS file: /cvs/src/src/gas/config/tc-mips.c,v
> retrieving revision 1.538
> diff -u -p -r1.538 tc-mips.c
> --- config/tc-mips.c 10 Jun 2013 18:15:47 -0000 1.538
> +++ config/tc-mips.c 13 Jun 2013 17:37:10 -0000
> @@ -381,9 +381,12 @@ static int file_ase_mt;
> static int file_ase_virt;
>
> #define ISA_SUPPORTS_VIRT_ASE (mips_opts.isa == ISA_MIPS32R2 \
> - || mips_opts.isa == ISA_MIPS64R2)
> + || mips_opts.isa == ISA_MIPS64R2 \
> + || mips_opts.micromips)
>
> -#define ISA_SUPPORTS_VIRT64_ASE (mips_opts.isa == ISA_MIPS64R2)
> +#define ISA_SUPPORTS_VIRT64_ASE (mips_opts.isa == ISA_MIPS64R2 \
> + || (mips_opts.isa == ISA_MIPS64 \
> + && mips_opts.micromips))
>
> /* The argument of the -march= flag. The architecture we are assembling. */
> static int file_mips_arch = CPU_UNKNOWN;
>
> Are there other solutions to let the micromips virt64 test run?
Thanks, I can see what you mean now -- essentially VIRT64 is the first
strictly microMIPS64 feature we're going to support. The issue looks to
me like the outcome of a previous decision to make -mips3 switch microMIPS
assembly into the 64-bit mode. I believe this was your own decision too,
:) that we accepted. I think we can stick to it and just as we already
enable all the optional microMIPS32 features for -mips1 assembly we do the
same for microMIPS64 and -mips3 assembly.
Given the above how about:
#define ISA_SUPPORTS_VIRT64_ASE (mips_opts.isa == ISA_MIPS64R2
|| (mips_opts.micromips
&& ISA_HAS_64BIT_REGS (mips_opts.isa)))
? We'll then do the same if e.g. DSP64 is added to the microMIPS
instruction set.
Maciej
More information about the Binutils
mailing list