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]

Re: v850 bug


Hi Matteo,

: The following program demonstrates the bug:
: 
: int k;
: void __attribute__((interrupt)) foo(void)
: {
:      int i, x=0;
:      for (i = 0; i < 100; ++i) 
: 	   x |= i;
:      k = x;
: }

Thanks for pointing out this bug.  I havee developed a patch to fix
this problem (see below), which I have checked into the sources.

Cheers
	Nick


Sat Jan  8 12:12:46 2000  Nick Clifton  <nickc@cygnus.com>

	* config/v850/v850.c (expand_epilogue): Interrupt functions no
	longer allocate extra stack for function calls.

Index: config/v850/v850.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/v850/v850.c,v
retrieving revision 1.25
diff -p -w -r1.25 v850.c
*** v850.c	1999/11/08 15:40:38	1.25
--- v850.c	2000/01/08 20:11:49
*************** Saved %d bytes via epilogue function (%d
*** 1827,1836 ****
        else
  	init_stack_free = actual_fsize;
  
!       /* Deallocate the rest of the stack if it is > 32K or if extra stack
! 	 was allocated for an interrupt handler that makes a call.  */
!       if (actual_fsize > init_stack_free
! 	  || (interrupt_handler && actual_fsize))
  	{
  	  int diff;
  
--- 1827,1834 ----
        else
  	init_stack_free = actual_fsize;
  
!       /* Deallocate the rest of the stack if it is > 32K.  */
!       if (actual_fsize > init_stack_free)
  	{
  	  int diff;
  

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