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, microblaze]: Added fast_interrupt controller


On 02/10/2013 10:39 PM, David Holsgrove wrote:
Added fast_interrupt controller

Changelog

2013-02-11 Nagaraju Mekala <nmekala@xilinx.com>

   * config/microblaze/microblaze-protos.h: microblaze_is_fast_interrupt.
   * config/microblaze/microblaze.c (microblaze_attribute_table): Add
      microblaze_is_fast_interrupt.
      (microblaze_fast_interrupt_function_p): New function.
      (microblaze_is_fast_interrupt check): New function.
      (microblaze_must_save_register): Account for fast_interrupt.
      (save_restore_insns): Likewise.
      (compute_frame_size): Likewise.
      (microblaze_globalize_label): Add FAST_INTERRUPT_NAME.
   * config/microblaze/microblaze.h: Define FAST_INTERRUPT_NAME as
      fast_interrupt.
   * config/microblaze/microblaze.md (movsi_status): Can be
      fast_interrupt
      (return): Add microblaze_is_fast_interrupt.
      (return_internal): Likewise.

+int +microblaze_is_fast_interrupt (void) +{ + return fast_interrupt; +}

+  if (fast_interrupt)
+    {

Use wrapper functions consistently.  Either reference the flag everywhere
or use the wrapper everywhere.

+ if (interrupt_handler || fast_interrupt)

+ if (microblaze_is_interrupt_handler () || microblaze_is_fast_interrupt())

There are many places in the patch where both interrupt_handler and fast_interrupt
are tested.  These can be eliminated by setting the interrupt_handler flag when
you see fast_interrupt and checking for the correct registers to be saved in
microblaze_must_save_register().

+ if ((interrupt_handler && !prologue) ||( fast_interrupt && !prologue) )

+ if ((interrupt_handler && prologue) || (fast_interrupt && prologue))

Refactor. Fix spacing around parens.

--
Michael Eager	 eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077


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