public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: claziss@gmail.com
Cc: gcc-patches@gcc.gnu.org, Francois Bedard <fbedard@synopsys.com>,
	Andrew Burgess <andrew.burgess@embecosm.com>
Subject: Re: [PATCH 1/2] [ARC] Fix and refurbish the interrupts.
Date: Mon, 22 Jul 2019 21:54:00 -0000	[thread overview]
Message-ID: <0fcbe369-315f-a114-146d-2a7b610e94b6@redhat.com> (raw)
In-Reply-To: <608c04149652bac5c058400bf2158daff32f7644.camel@gmail.com>

On 7/9/19 10:23 AM, claziss@gmail.com wrote:
> Hi Jeff,
> 
> Please find attached the updated patch.
> 
> What is new:
> - mailing list feedback is taken into account.
> - some comments are updated.
> - a new test is added.
> - the ARC AUX registers used by ZOL (hardware loop) and FPX (a custom
> floating point implementation) are saved before fp-register.
> - the millicode optimization is not used by ISR.
> 
> 
> Thank you,
> Claudiu
> 
> 
> 0001-ARC-Fix-and-refurbish-the-interrupts.patch
> 
> From d22368681b7aab4bef4b5c32a9a472808f2c16cd Mon Sep 17 00:00:00 2001
> From: Claudiu Zissulescu <claziss@gmail.com>
> Date: Fri, 17 May 2019 14:48:17 +0300
> Subject: [PATCH] [ARC] Fix and refurbish the interrupts.
> 
> When entering an interrupt, not only the call save registers needs to
> be place on stack but also the call clobbers one. More over, the
> ARC700 return from interrupt instruction needs to be rtie, the same
> like ARCv2 CPUs. While the ARC6xx family uses j.f [ilinkX]
> instruction. Additionally, we need to save the state of the ZOL
> machinery, namely the lp_count, lp_end and lp_start registers. For
> architectures which are using extension registers (i.e., HS48) we need
> to save/restore them as well.
> 
> gcc/
> xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
> 
> 	* config/arc/arc-protos.h (arc_output_function_epilogue): Delete
> 	declaration.
> 	(arc_compute_frame_size): Millicode is disabled when compiling
> 	ISR.
> 	(arc_return_address_register): Likewise.
> 	(arc_compute_function_type): Likewise.
> 	(arc_compute_frame_size): Likewise.
> 	(secondary_reload_info): Likewise.
> 	(arc_get_unalign): Likewise.
> 	(arc_can_use_return_insn): Declare.
> 	* config/arc/arc.c (AUX_LP_START): Define
> 	(AUX_LP_END): Likewise.
> 	(arc_frame_info): Update gmask member to 64-bit datum.
> 	(GMASK_LEN): Update.
> 	(arc_compute_function_type): Make it static, move it forward.
> 	(arc_must_save_register): Update, consider the extra regs.
> 	(arc_compute_millicode_save_restore_regs): Update to use the 64
> 	bit gmask.
> 	(arc_compute_frame_size): Likewise.
> 	(arc_enter_leave_p): Likewise.
> 	(arc_save_callee_saves): Likewise.
> 	(arc_restore_callee_saves): Likewise.
> 	(arc_save_callee_enter): Likewise.
> 	(arc_restore_callee_leave): Likewise.
> 	(arc_save_callee_milli): Likewise.
> 	(arc_restore_callee_milli): Likewise.
> 	(arc_expand_prologue): Add new interrupt handling.
> 	(arc_return_address_register): Make it static, move it forward.
> 	(arc_expand_epilogue): Add new interrupt handling.
> 	(arc_get_unalign): Delete.
> 	(arc_epilogue_uses): Make sure we do not remove the extra
> 	saved/restored registers when interrupt.
> 	(arc_can_use_return_insn): New function.
> 	(push_reg): Likewise.
> 	(pop_reg): Likewise.
> 	(arc_save_callee_saves): Add ZOL and FPX aux registers saving
> 	procedures.
> 	(arc_restore_callee_saves): Likewise, but restoring.
> 	* config/arc/arc.md (VUNSPEC_ARC_ARC600_RTIE): Define.
> 	(R33_REG): Likewise.
> 	(R34_REG): Likewise.
> 	(R35_REG): Likewise.
> 	(R36_REG): Likewise.
> 	(R37_REG): Likewise.
> 	(R38_REG): Likewise.
> 	(R39_REG): Likewise.
> 	(R45_REG): Likewise.
> 	(R46_REG): Likewise.
> 	(R47_REG): Likewise.
> 	(R48_REG): Likewise.
> 	(R49_REG): Likewise.
> 	(R50_REG): Likewise.
> 	(R51_REG): Likewise.
> 	(R52_REG): Likewise.
> 	(R53_REG): Likewise.
> 	(R54_REG): Likewise.
> 	(R55_REG): Likewise.
> 	(R56_REG): Likewise.
> 	(R58_REG): Likewise.
> 	(type): Add rtie attribute.
> 	(in_call_delay_slot): Use RETURN_ADDR_REGNUM.
> 	(movsi_insn): Accept moves to lp_count.
> 	(rtie): Update pattern.
> 	(simple_return): Simplify it, don't use this pattern as a return
> 	from an interrupt.
> 	(arc600_rtie): New pattern.
> 	(p_return_i): Clean up.
> 	(return): Likewise.
> 	* config/arc/builtins.def (rtie): Only available for non ARC6xx
> 	family CPUs.
> 	* config/arc/predicates.md (move_src_operand): Consider lp_count
> 	as a register.
> 
> gcc/testsuite
> xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
> 
> 	* gcc.target/arc/arc.exp (check_effective_target_accregs): New
> 	predicate.
> 	* gcc.target/arc/builtin_special.c: Update test/
> 	* gcc.target/arc/interrupt-1.c: Likewise.
> 	* gcc.target/arc/interrupt-10.c: New test.
> 	* gcc.target/arc/interrupt-11.c: Likewise.
> 	* gcc.target/arc/interrupt-12.c: Likewise.
OK

Jeff

  reply	other threads:[~2019-07-22 21:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 13:40 Claudiu Zissulescu
2019-06-28 13:39 ` [PATCH 2/2] [ARC] Fix emitting TLS symbols Claudiu Zissulescu
2019-06-28 22:06   ` Jeff Law
2019-07-02 23:15 ` [PATCH 1/2] [ARC] Fix and refurbish the interrupts Jeff Law
2019-07-08  9:01   ` Claudiu Zissulescu
2019-07-08 18:20     ` Jeff Law
2019-07-09 16:37       ` claziss
2019-07-22 21:54         ` Jeff Law [this message]
2019-07-24 13:29           ` Claudiu Zissulescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fcbe369-315f-a114-146d-2a7b610e94b6@redhat.com \
    --to=law@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=claziss@gmail.com \
    --cc=fbedard@synopsys.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).