This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Sorry it took a little longer as I noticed I forgot to update the documentation for the new option. I had to add a new option to the disassembler to turn on disassembling these instructions as -mips:octeon does not turn on these instructions. Here is an updated patch with all of the changes you requested and adding the documentation. The main reason why I did not merge in the comment about the flags is because there was two comments talking about the flags which had the same pattern; I just copied what was done already. OK? Again build and tested for mips64-linux-gnu with no regressions. Thanks, Andrew Pinski binutils/ChangeLog: * doc/binutils.texi: Document -Mvirt disassembler option. gas/ChangeLog: * config/tc-mips.c (struct mips_set_options): New ase_virt field. (mips_opts): Update for the new field. (file_ase_virt): New variable. (ISA_SUPPORTS_VIRT_ASE): New macro. (ISA_SUPPORTS_VIRT64_ASE): New macro. (MIPS_CPU_ASE_VIRT): New define. (is_opcode_valid): Handle ase_virt. (macro_build): Handle "+J". (validate_mips_insn): Likewise. (mips_ip): Likewise. (enum options): Add OPTION_VIRT and OPTION_NO_VIRT. (md_longopts): Add mvirt and mnovirt (md_parse_option): Handle OPTION_VIRT and OPTION_NO_VIRT. (mips_after_parse_args): Handle ase_virt field. (s_mipsset): Handle "virt" and "novirt". (mips_elf_final_processing): Add a comment about virt ASE might need a new flag. (md_show_usage): Print out the usage of -mvirt and mno-virt options. * doc/c-mips.texi: Document -mvirt and -mno-virt. Document ".set virt" and ".set novirt". gas/testsuite/ChangeLog: * gas/mips/mips.exp: Run virt and virt64 testcases. * gas/mips/virt.d: New file. * gas/mips/virt.s: New file. * gas/mips/virt64.d: New file. * gas/mips/virt64.s: New file. include/opcode/ChangeLog: * mips.h (OP_MASK_CODE10): Correct definition. (OP_SH_CODE10): Likewise. Add a comment that "+J" is used now for OP_*CODE10. (INSN_ASE_MASK): Update. (INSN_VIRT): New macro. (INSN_VIRT64): New macro opcodes/ChangeLog: * mips-dis.c (mips_arch_choices): Add INSN_VIRT to mips32r2 . Add INSN_VIRT and INSN_VIRT64 to mips64r2. (parse_mips_dis_option): Handle the virt option. (print_insn_args): Handle "+J". (print_mips_disassembler_options): Print out message about virt64. * mips-opc.c (IVIRT): New define. (IVIRT64): New define. (mips_builtin_opcodes): Add dmfgc0, dmtgc0, hypcall, mfgc0, mtgc0, tlbgr, tlbgwi, tlbginv, tlbginvf, tlbgwr, tlbgp VIRT instructions. Move rfe to the bottom as it conflicts with tlbgp. ________________________________________ From: Richard Sandiford Sent: Thursday, May 09, 2013 2:47 AM To: Pinski, Andrew Cc: binutils@sourceware.org; Daney, David; Kapoor, Prasun Subject: Re: [MIPS] Add new virtualization instructions Thanks for doing this. The patch looks good, but a couple of comments, one very minor and one more significant: "Pinski, Andrew" <Andrew.Pinski@caviumnetworks.com> writes: > @@ -18724,6 +18788,8 @@ mips_elf_final_processing (void) > /* Same for DSP R2. */ > /* We may need to define a new flag for MT ASE, and set this flag when > file_ase_mt is true. */ > + /* We may need to define a new flag for VIRT ASE, and set this flag when > + file_ase_virt is true. */ Please extend the existing line rather than duplicating it. E.g.: /* We may need to define new flags for the MT and VIRT ASEs, and set those flags when their respective file_ase_* variables are true. */ > +{"dmtgc0", "t,G", 0x40600300, 0xffe007ff, COD|RD_t|WR_C0|WR_CC, 0, IVIRT }, > +{"dmtgc0", "t,+D", 0x40600300, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, 0, IVIRT }, > +{"dmtgc0", "t,G,H", 0x40600300, 0xffe007f8, COD|RD_t|WR_C0|WR_CC, 0, IVIRT }, I'm responding at work so can't access the spec here, but I'm guessing that these instructions are MIPS64 only. If so, I think we need an IVIRT and an IVIRT64, as with DSP. Looks like there's one more free INSN_* bit just waiting to be used :-) With that change, please split the test into two and run using run_dump_test_arches. E.g.: run_dump_test_arches "virt" [mips_arch_list_matching mips32r2] run_dump_test_arches "virt64" [mips_arch_list_matching mips64r2] Thanks, Richard
Attachment:
addvirt.diff.txt
Description: addvirt.diff.txt
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |