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: [PATCH/RFA] SH: DWARF2 exception handling


kaz Kojima wrote:
> Joern Rennecke <joern.rennecke@superh.com> wrote:
> > So, is sh_set_return_address, after calling calc_live_regs, you

Oops, that should have read 'in sh_set_return_address'.

> > can just check
> > if (live_regs_mask[pr_reg/32] & (1 << (pr_reg % 32)))
> > to decide if you should write directly into the pr register,
> > or if you need to store into a stack slot.
> 
> If PR / PR_MEDIA_REG isn't life, then the epilogue returns with
> rts / blink trN, r63 without popping pr_reg. Right? Does it mean
> that we can set PR / (the result of sh_media_register_for_return)
> to RA directly in sh_set_return_address in such case, without
> using any stack slots? 	

Basically, yes.  The epilogue for sh[1-4] / SHcompact uses rts,
as you said, and SHmedia uses ptabs r18,tr0; blink tr0,r63 .
[For the bystanders: PR_MEDIA_REG is r18.]
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658


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