This is the mail archive of the 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: [PATCH SH2A]: Add movml instruction

Hi Kaz-san,

Thanks for the comments. 

>> I've got many failures for c++/java test on sh4-linux
>> with your patch.
>> and similar failures are seen for sh-elf/-m2a.  Please do c++
>> test at least next time.

Sorry for missing out C++ test this time. I also observed the 
failures with C++ testsuite.

>> It seems that the change to push PR first/pop PR last causes them.

Yes. The change of push PR first/pop PR last resulted in these failures.

>> This would be a far more important optimization comparing with using 
>> movmu for a very rare situation.

Thanks for pointing out the issue. This optimization seems to generate 
more optimization than movmu.

>> Then gcc.dg/attr-isr.c should be changed so to skip it for sh2a.

Done. "gcc.dg/attr-isr.c" test is skipped for sh2a.

>> Use of define_peephole is deprecated.  Please use define_peephole2
>> instead.

The patterns for movml and movmu are generated with O0 and O1
optimization. Higher optimization use "flag_schedule_insns_after_reload"
which reschedules the instructions. Hence, defining peephole2 would not
help in generating these multiple transfer instructions.

movml deals with push/pop of registers "r0-r7" which will be generated 
only with interrupt routines. Please find attached the patch 
"sh2a_movml.patch" which modifies prologue and epilogue patterns for 
interrupt routines to generate multiple transfer instructions. 

Modification of prologue and epilogue for interrupt routines was the
only solution I found to implement these multiple transfers. I have 
tried peepholes, instructions etc which did not give expected results.
Please let me know whether they can be implemented in any other way.

>> I assume that things for movmu will be removed.

The changes for movmu are removed as push PR first/pop PR last will 
lead to many failures and also inhibits optimization. However movmu
pattern requires push PR first/pop PR last and hence it was concluded
that movmu instruction can't be implemented for sh2a.

Regression performed on sh2a and related targets.
No new regressions found.

2010-08-20  Naveen H.S  <>

	* config/sh/sh.c (push_regs): Modify the order of registers for
	interrupt routines.
	(expand_epilogue): Likewise.
	* config/sh/ (UNSPEC_HIGH_REG): New constant.
	(movml_push): New instruction.
	(movml_pop): New instruction.
	* testsuite/gcc.dg/attr-isr.c: Skip test for sh2a.
Thanks & Regards,

Attachment: sh2a_movml.patch
Description: sh2a_movml.patch

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