MIPS: add .module arch and ase to all output asm
authorYunQiang Su <yunqiang.su@cipunited.com>
Fri, 3 Sep 2021 07:32:26 +0000 (03:32 -0400)
committerYunQiang Su <syq@debian.org>
Tue, 7 Sep 2021 00:45:37 +0000 (08:45 +0800)
commit58572bbb62c9588c658fd7656ee359d27c306fb2
tree071a3b6cd2a11239c564fee6b423a17e9a5bbf72
parent9f99555f29cb1bce06ad7e27f254945deffafe33
MIPS: add .module arch and ase to all output asm

Currently, the asm output file for MIPS has no rev info.
It can make some trouble, for example:

  assembler is mips1 by default,
  gcc is fpxx by default.

To assemble the output of gcc -S, we have to pass -mips2
to assembler.

The same situation is for some CPU has extension insn.
Octeon is an example.
So we can just add ".set arch=octeon".

If an ASE is enabled, .module ase will also be used.

gcc/ChangeLog:
* config/mips/mips.c (mips_file_start): add .module for
  arch and ase.
gcc/config/mips/mips.c