[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] -mint8 problem with setjmp/longjmp
From: |
Nils Kristian Strom |
Subject: |
[avr-libc-dev] -mint8 problem with setjmp/longjmp |
Date: |
Fri, 8 Nov 2002 08:51:50 +0100 (CET) |
Hi
Looking at the setjmp.h header, I noticed the use of unsigned int in stead of
void * for all addresses. The following patch seems to fix this problem.
Note that for devices with >128K FLASH I don't know if sizeof(void *) would be
2 or 3, this may be wrong in the patch.
Regards
Index: setjmp.h
===================================================================
RCS file: /cvsroot/avr-libc/avr-libc/include/setjmp.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 setjmp.h
*** setjmp.h 27 Sep 2002 19:11:59 -0000 1.3
--- setjmp.h 8 Nov 2002 07:46:38 -0000
*************** typedef struct {
*** 60,69 ****
unsigned char __j_r16;
unsigned char __j_r17;
/* frame pointer, stack pointer, status register, program counter */
! unsigned int __j_fp; /* Y */
! unsigned int __j_sp;
unsigned char __j_sreg;
! unsigned int __j_pc;
unsigned char __j_pch; /* only devices with >128K bytes of flash */
} jmp_buf[1];
--- 60,69 ----
unsigned char __j_r16;
unsigned char __j_r17;
/* frame pointer, stack pointer, status register, program counter */
! void * __j_fp; /* Y */
! void * __j_sp;
unsigned char __j_sreg;
! void * __j_pc;
unsigned char __j_pch; /* only devices with >128K bytes of flash */
} jmp_buf[1];
Nils Strom
E-mail: address@hidden
Web: http://www.omegav.ntnu.no/~nilsst
Hardware, n: The part of a computer system that can be kicked
Michael Barr
- [avr-libc-dev] -mint8 problem with setjmp/longjmp,
Nils Kristian Strom <=