This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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 patch rfa] Add MIPS32 Release 2 support.


Oh, FYI, while i remember:

Eric asked me off-list about the !TARGET_MIPS16 in the ISA_HAS_ROTR_SI
and ISA_HAS_ROTR_DI macros, i.e. why I added them.  He asked me to
check the modifications against mips64vr-elf w/ -march=vr4100 -mips16
flags.

Logically, that should make no difference, since vr4100 (at least as
described in gcc; i dunno about reality 8-) doesn't support mips16.
(AFAIK, there are no architectures currently in GCC which support hw
rotate _AND_ MIPS16.)

In case i forget to mention later, in practice it made no difference:
to the gcc 'check-gcc' test results were unchanged before and after my
patch (i.e., an updated version that i'm hoping to post later tonight
8-).


The point to the change was that on an architecture that _does_
support rotates in HW (and presumably does support MIPS16 8-), if you
use -mips16, you will lose.  For instance, imagine that vr5400
supported MIPS16.  One might run the compiler as:

	mips64vr-elf.install.cleanish/bin/mips64vr-elf-gcc -o /tmp/x.o -c -march=vr5400 -mips16 ../combined/gcc/testsuite/gcc.c-torture/execute/20020226-1.c
	/tmp/ccd3aOg1.s: Assembler messages:
	/tmp/ccd3aOg1.s:137: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:146: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:157: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:166: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:180: Error: unrecognized opcode `dror'
	/tmp/ccd3aOg1.s:189: Error: unrecognized opcode `dror'
	/tmp/ccd3aOg1.s:203: Error: unrecognized opcode `dror'
	/tmp/ccd3aOg1.s:212: Error: unrecognized opcode `dror'
	/tmp/ccd3aOg1.s:316: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:345: Error: unrecognized opcode `ror'
	/tmp/ccd3aOg1.s:374: Error: unrecognized opcode `dror'
	/tmp/ccd3aOg1.s:403: Error: unrecognized opcode `dror'

That is, of course, because it's trying to use rotate ops in ".set
mips16" code.

Hence the little bit of my patch which added !TARGET_MIPS16 to the
ISA_HAS_ROTR_* macros.  8-)



cgd


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