This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Allow MIPS call-saved-{4-6}.c tests to correctly run for micromips
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: Andrew Bennett <Andrew dot Bennett at imgtec dot com>, "gcc-patches\ at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Jan 2015 19:49:08 +0000
- Subject: Re: [PATCH] Allow MIPS call-saved-{4-6}.c tests to correctly run for micromips
- Authentication-results: sourceware.org; auth=none
- References: <0DA23CC379F5F945ACB41CF394B9827720F4BF02 at LEMAIL01 dot le dot imgtec dot org> <alpine dot LFD dot 2 dot 11 dot 1501131820010 dot 23937 at eddie dot linux-mips dot org>
"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> On Tue, 13 Jan 2015, Andrew Bennett wrote:
>
>> The call-saved-{4-6}.c tests in the mips testsuite fail for micromips.
>> The reason is
>> that micromips uses the swm and lwm instructions to save/restore the
>> call-saved registers
>> rather than using the sw and lw instructions. The swm and lwm
>> instructions only list
>> the range of registers to use ie. $16-$25 and hence some of the
>> scan-assembler
>> patterns fail. This fix adds the NO_COMPRESSION attribute to the foo
>> function to
>> force the tests to always compile as mips.
>>
>> I have tested this for both mips and micromips, and the tests now pass
>> successfully.
>> The ChangeLog and patch are below.
>
> Hmm, instead of trying to avoid testing microMIPS code generation just to
> satisfy the test suite I'd rather see the test cases updated so that
> LWM/SWM register ranges are expected and accepted whenever microMIPS code
> is produced. These scan patterns can be made conditional.
FWIW I think Andrew's patch is correct. If we want to test microMIPS
output against micromips-specific regexps, we should add a separate test
that forces micromips, so that it gets tested regardless of people's
RUNTESTFLAGS. Doing that shouldn't hold up Andrew's patch though.
Whereever possible gcc.target/mips should not have conditional dg-finals.
Thanks,
Richard