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]

Re: [MIPS] Add saa and saad instructions for octeon


On Tue, Nov 15, 2011 at 10:39 AM, Richard Sandiford
<rdsandiford@googlemail.com> wrote:
> David Daney <ddaney@caviumnetworks.com> writes:
>> On 11/15/2011 09:12 AM, Richard Sandiford wrote:
>>> Richard Sandiford<rdsandiford@googlemail.com> Âwrites:
>>>> Andrew Pinski<andrew.pinski@caviumnetworks.com> Âwrites:
>>>>> Hi,
>>>>> Â ÂThis patch adds the saa and saad instructions for Octeon. Â They are
>>>>> not part of the original Octeon but are part of the Octeon+. ÂWe at
>>>>> Cavium don't feel the need to add a new arch for it since this is the
>>>>> only difference instruction wise and the original Octeon is no longer
>>>>> in production.
>>>>
>>>> I think it's still worth having a separate CPU name for it.
>>>
>>> and (to be clear) CPU enum, so that the instructions can be rejected
>>> for plain -march=octeon.
>>>
>>
>> I guess that makes sense.
>>
>> I don't think we want a separate E_MIPS_MACH_OCTEON?? tag in the ELF
>> flags EF_MIPS_MACH field for this though. ÂThe Cavium SDK toolchains
>> simply supply E_MIPS_MACH_OCTEON for all Octeon+ objects, and I would
>> like to keep it this way.
>
> OK, that sounds fair.

And here is the new patch with the new -march=octeon+ .  Note there is
a hack in the testsuite mips.exp's run_dump_test_arch as the mips64r2
sync test for Octeon+ should use the Octeon's .d file.

Thanks,
Andrew Pinski

bfd/ChangeLog:
* archures.c (bfd_mach_mips_octeonp): New macro.
* bfd-in2.h: Regenerate.
* bfd/cpu-mips.c (I_mipsocteonp): New enum value.
(arch_info_struct): Add bfd_mach_mips_octeonp.
* elfxx-mips.c (mips_set_isa_flags): Add bfd_mach_mips_octeonp.
(mips_mach_extensions): Add bfd_mach_mips_octeonp.

gas/ChangeLog:
* config/tc-mips.c (CPU_IS_OCTEON): New macro function.
(CPU_HAS_SEQ): Change to use CPU_IS_OCTEON.
(NO_ISA_COP): Likewise.
(macro): Add support for M_SAA_AB and M_SAAD_AB.
(mips_ip <case '(' >): Allow 's' after '('.
(mips_cpu_info_table): Add octeon+.
* doc/c-mips.texi: Document octeon+ as an acceptable value for -march=

gas/testsuite/ChangeLog
* gas/mips/mips.exp: Add octeon+ for an architecture.
Run octeon-saa-saad test.
(run_dump_test_arch): For Octeon architectures, also try octeon@.
* gas/mips/octeon-pref.d: Remove -march=octeon from command line.
* gas/mips/octeon.d: Likewise.
* gas/mips/octeon-saa-saad.d: New file.
* gas/mips/octeon-saa-saad.s: New file

include/opcode/ChangeLog:
* mips.h (INSN_CHIP_MASK): Update according to INSN_OCTEONP.
(INSN_OCTEONP): New macro.
(CPU_OCTEONP): New macro.
(OPCODE_IS_MEMBER): Add Octeon+.
(M_SAA_AB, M_SAAD_AB): New enum values.

opcodes/ChangeLog:
* mips-dis.c (mips_arch_choices): Add Octeon+.
* mips-opc.c (IOCT): Include Octeon+.
(IOCTP): New macro.
(mips_builtin_opcodes): Add "saa" and "saad".

Attachment: addsaa.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]