From 4ae0c853973d9777a01331370863f55f6903ac55 Mon Sep 17 00:00:00 2001 From: vrokas Date: Tue, 5 Oct 2004 00:00:25 +0000 Subject: [PATCH] * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements * device/include/pic16/stdio.h: fixed bug with colon git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3523 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 5 +++++ device/include/pic16/stdio.h | 2 +- device/lib/pic16/libsdcc/gptr/gptrget1.c | 6 +++--- device/lib/pic16/libsdcc/gptr/gptrget2.c | 5 +++-- device/lib/pic16/libsdcc/gptr/gptrget3.c | 7 +++---- device/lib/pic16/libsdcc/gptr/gptrget4.c | 9 ++++----- device/lib/pic16/libsdcc/gptr/gptrput1.c | 11 ++++------- device/lib/pic16/libsdcc/gptr/gptrput2.c | 10 ++++------ device/lib/pic16/libsdcc/gptr/gptrput3.c | 10 ++++------ device/lib/pic16/libsdcc/gptr/gptrput4.c | 10 ++++------ 10 files changed, 35 insertions(+), 40 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20ab8862..2e440d92 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-10-05 Vangelis Rokas + + * device/lib/pic16/libsdcc/gptr/gptr*.c: added return statements + * device/include/pic16/stdio.h: fixed bug with colon + 2004-10-03 Vangelis Rokas * device/include/pic16/stdio.h, diff --git a/device/include/pic16/stdio.h b/device/include/pic16/stdio.h index cd12f175..1444bca4 100644 --- a/device/include/pic16/stdio.h +++ b/device/include/pic16/stdio.h @@ -50,7 +50,7 @@ extern int _print_format (pfn_outputchar pfn, void* pvoid, const char *format, v /*-----------------------------------------------------------------------*/ -extern void printf_small (char *,...); _REENTRANT; +extern void printf_small (char *,...) _REENTRANT; extern int printf (const char *,...); extern int vprintf (const char *, va_list); extern int sprintf (char *, const char *, ...); diff --git a/device/lib/pic16/libsdcc/gptr/gptrget1.c b/device/lib/pic16/libsdcc/gptr/gptrget1.c index 919c89e9..cbf36b22 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrget1.c +++ b/device/lib/pic16/libsdcc/gptr/gptrget1.c @@ -61,7 +61,7 @@ void _gptrget1(void) _naked /* debug info */ movf _POSTINC0, w - goto _end_ + return _lab_01_: @@ -79,8 +79,7 @@ _lab_01_: /* result in TBLAT */ movf _TABLAT, w - goto _end_ - + return _lab_02_: /* EEPROM pointer */ @@ -89,5 +88,6 @@ _lab_02_: _end_: + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrget2.c b/device/lib/pic16/libsdcc/gptr/gptrget2.c index 6d4ca321..485fa4f3 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrget2.c +++ b/device/lib/pic16/libsdcc/gptr/gptrget2.c @@ -61,7 +61,7 @@ void _gptrget2(void) _naked movf _POSTINC0, w movff _POSTINC0, _PRODL - goto _end_ + return _lab_01_: @@ -82,7 +82,7 @@ _lab_01_: TBLRD*+ movff _TABLAT, _PRODL - goto _end_ + return _lab_02_: @@ -92,5 +92,6 @@ _lab_02_: _end_: + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrget3.c b/device/lib/pic16/libsdcc/gptr/gptrget3.c index 91387a32..3b4eb25a 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrget3.c +++ b/device/lib/pic16/libsdcc/gptr/gptrget3.c @@ -63,7 +63,7 @@ void _gptrget3(void) _naked movff _POSTINC0, _PRODL movff _POSTINC0, _PRODH - goto _end_ + return _lab_01_: @@ -88,7 +88,7 @@ _lab_01_: TBLRD*+ movff _TABLAT, _PRODH - goto _end_ + return _lab_02_: @@ -96,7 +96,6 @@ _lab_02_: /* unimplemented yet */ -_end_: - + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrget4.c b/device/lib/pic16/libsdcc/gptr/gptrget4.c index f0721f8f..c57b9e54 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrget4.c +++ b/device/lib/pic16/libsdcc/gptr/gptrget4.c @@ -64,7 +64,7 @@ void _gptrget4(void) _naked movff _POSTINC0, _PRODH movff _POSTINC0, _FSR0L - goto _end_ + return _lab_01_: @@ -93,15 +93,14 @@ _lab_01_: TBLRD*+ movff _TABLAT, _FSR0L - goto _end_ - + return _lab_02_: /* EEPROM pointer */ /* unimplemented yet */ -_end_: - + return + _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrput1.c b/device/lib/pic16/libsdcc/gptr/gptrput1.c index 79df3509..decbadf6 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrput1.c +++ b/device/lib/pic16/libsdcc/gptr/gptrput1.c @@ -60,25 +60,22 @@ void _gptrput1(void) _naked /* data are already in FSR0 */ movff _PRODL, _POSTINC0 - goto _end_ + return _lab_01_: /* code or eeprom */ - btfsc _WREG, 6 - goto _lab_02_ + btfss _WREG, 6 + return /* code pointer, cannot write code pointers */ - goto _end_ - - _lab_02_: /* EEPROM pointer */ /* unimplemented yet */ -_end_: + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrput2.c b/device/lib/pic16/libsdcc/gptr/gptrput2.c index 80589c5e..514a7914 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrput2.c +++ b/device/lib/pic16/libsdcc/gptr/gptrput2.c @@ -61,25 +61,23 @@ void _gptrput2(void) _naked movff _PRODL, _POSTINC0 movff _PRODH, _POSTINC0 - goto _end_ + return _lab_01_: /* code or eeprom */ - btfsc _WREG, 6 - goto _lab_02_ + btfss _WREG, 6 + return /* code pointer, cannot write code pointers */ - goto _end_ - _lab_02_: /* EEPROM pointer */ /* unimplemented yet */ -_end_: + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrput3.c b/device/lib/pic16/libsdcc/gptr/gptrput3.c index c699c864..d5eea4e6 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrput3.c +++ b/device/lib/pic16/libsdcc/gptr/gptrput3.c @@ -62,25 +62,23 @@ void _gptrput3(void) _naked movff _PRODH, _POSTINC0 movff _TBLPTRL, _POSTINC0 - goto _end_ + return _lab_01_: /* code or eeprom */ - btfsc _WREG, 6 - goto _lab_02_ + btfss _WREG, 6 + return /* code pointer, cannot write code pointers */ - goto _end_ - _lab_02_: /* EEPROM pointer */ /* unimplemented yet */ -_end_: + return _endasm; } diff --git a/device/lib/pic16/libsdcc/gptr/gptrput4.c b/device/lib/pic16/libsdcc/gptr/gptrput4.c index 6f0baaec..01b7db2b 100644 --- a/device/lib/pic16/libsdcc/gptr/gptrput4.c +++ b/device/lib/pic16/libsdcc/gptr/gptrput4.c @@ -63,25 +63,23 @@ void _gptrput4(void) _naked movff _TBLPTRL, _POSTINC0 movff _TBLPTRH, _POSTINC0 - goto _end_ + return _lab_01_: /* code or eeprom */ - btfsc _WREG, 6 - goto _lab_02_ + btfss _WREG, 6 + return /* code pointer, cannot write code pointers */ - goto _end_ - _lab_02_: /* EEPROM pointer */ /* unimplemented yet */ -_end_: + return _endasm; } -- 2.47.2