git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2469
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2003-04-03 Bernhard Held <bernhard@bernhardheld.de>
+
+ * _decdptr.c: fix return values
+ * _gptrget.c: fix return values
+ * _gptrgetc.c: fix return values
+ * _gptrput.c: fix return values
+ * _mulint.c: fix return values
+
2003-04-02 Bernhard Held <bernhard@bernhardheld.de>
* Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
2003-04-02 Bernhard Held <bernhard@bernhardheld.de>
* Makefile.common.in: unused PORT, SCC and SAS removed, fixed docdir
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-unsigned char _decdptr ()
+/* the return value is already in dph/dpl */
+void
+_decdptr (char *gptr)
+ gptr; /* hush the compiler */
+
#ifdef SDCC_ds390
_asm
orl dps, #0xc0
#ifdef SDCC_ds390
_asm
orl dps, #0xc0
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-unsigned char _gptrget ()
+
+/* the return value is expected to be in acc, and not in the standard
+ * location dpl. Therefore we choose return type void here: */
+void
+_gptrget (char *gptr)
+ gptr; /* hush the compiler */
+
_asm
; save values passed
xch a,r0
_asm
; save values passed
xch a,r0
pop acc
xch a,r0
_endasm ;
pop acc
xch a,r0
_endasm ;
-unsigned int _gptrgetWord ()
+/* the return value is expected to be in acc/_ap, and not in the standard
+ * location dpl/dph. Therefore we choose return type void here: */
+void
+_gptrgetWord (unsigned *gptr)
+ gptr; /* hush the compiler */
+
_asm
;
; depending on the pointer type acc. to SDCCsymt.h
_asm
;
; depending on the pointer type acc. to SDCCsymt.h
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-unsigned char _gptrgetc ()
+
+/* the return value is expected to be in acc, and not in the standard
+ * location dpl. Therefore we choose return type void here: */
+void
+_gptrgetc (char *gptr)
+ gptr; /* hush the compiler */
+
_asm
; save values passed
xch a,r0
_asm
; save values passed
xch a,r0
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-unsigned char _gptrput ()
+/* the return value is expected to be in acc, and not in the standard
+ * location dpl. Therefore we choose return type void here: */
+void
+_gptrput (char *gptr, char c)
+ gptr; c; /* hush the compiler */
+
-unsigned char _gptrputWord ()
#elif defined _MULINT_ASM_SMALL || defined _MULINT_ASM_SMALL_AUTO
#elif defined _MULINT_ASM_SMALL || defined _MULINT_ASM_SMALL_AUTO
+/* the return value is (unsigned) int, but to hush the compiler
+ * we choose void here: */
void
_mulint_dummy (void) _naked
{
void
_mulint_dummy (void) _naked
{