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]

XStormy16: Fix selection of return instruction for interrupt handlers.

Hi Guys,

  I am applying the patch below to fix a small bug in the XStormy16
  backend.  Under some circumstances it was possible for the backend to
  generate a RET instruction to return from an interrupt handler instead
  of an IRET instruction.  This patch fixes that problem.


2010-11-15  Nick Clifton  <>

	* config/stormy16/stormy16.c (direct_return): Do not generate a
	direct return for interrupt handlers.

Index: gcc/config/stormy16/stormy16.c
--- gcc/config/stormy16/stormy16.c	(revision 166743)
+++ gcc/config/stormy16/stormy16.c	(working copy)
@@ -1175,7 +1175,8 @@
 direct_return (void)
   return (reload_completed
-	  && xstormy16_compute_stack_layout ().frame_size == 0);
+	  && xstormy16_compute_stack_layout ().frame_size == 0
+	  && ! xstormy16_interrupt_function_p ());
 /* Called after register allocation to add any instructions needed for

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