underlined form.
* device/include/stdint.h: changed intptr_t and uintptr_t for others than
mcs51 and ds390.
* device/include/hc08/mc68hc908gp32.h,
* device/include/hc08/mc68hc908jb8.h,
* device/include/hc08/mc68hc908jkjl.h,
* device/include/hc08/mc68hc908qy.h: fixed comments
* device/include/mcs51/README: updated
* device/include/mcs51/
c8051f120.h: added PINRSF
* device/lib/pic16/libc/stdlib/crc16.c: fixed comments
* src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
amidst code. Also inline is not supported.
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3721
4a8a32a2-be11-0410-ad9d-
d568d2c75423
+2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
+
+ * device/include/stdarg.h: changed SDCC specific keywords to double
+ underlined form.
+ * device/include/stdint.h: changed intptr_t and uintptr_t for others than
+ mcs51 and ds390.
+ * device/include/hc08/mc68hc908gp32.h,
+ * device/include/hc08/mc68hc908jb8.h,
+ * device/include/hc08/mc68hc908jkjl.h,
+ * device/include/hc08/mc68hc908qy.h: fixed comments
+ * device/include/mcs51/README: updated
+ * device/include/mcs51/c8051f120.h: added PINRSF
+ * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
+ * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
+ amidst code. Also inline is not supported.
+
2005-04-06 Raphael Neider <rneider AT web.de>
* src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2005-04-06 Raphael Neider <rneider AT web.de>
* src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
- * device/include/pic16/usart.h: added, missing in previous commit,
- * device/include/pic16/adc.h: fixed typo,
- * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
- commit,
- * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
- <p18fxxx.inc>
- * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
- uninitialized because a bug appears with gplink
- * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
- COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
- complains for unrecognised option
+ * device/include/pic16/usart.h: added, missing in previous commit,
+ * device/include/pic16/adc.h: fixed typo,
+ * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
+ commit,
+ * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
+ <p18fxxx.inc>
+ * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
+ uninitialized because a bug appears with gplink
+ * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
+ COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
+ complains for unrecognised option
2005-04-05 Raphael Neider <rneider AT web.de>
2005-04-05 Raphael Neider <rneider AT web.de>
* device/include/mcs51/c8051f350.h,
* device/include/z180.h: Changed SDCC specific keywords to double
underlined form.
* device/include/mcs51/c8051f350.h,
* device/include/z180.h: Changed SDCC specific keywords to double
underlined form.
2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
* src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
* src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
should be removed from local register store/restore in/from stack
block,
* src/pic16/ralloc.c (pic16_decodeOp): added decode for
should be removed from local register store/restore in/from stack
block,
* src/pic16/ralloc.c (pic16_decodeOp): added decode for
* device/include/pic16/adc.h: minor prototype modifications and
update,
* device/include/pic16/adc.h: minor prototype modifications and
update,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (__at your option) any
+ Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
later version.
This program is distributed in the hope that it will be useful,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (__at your option) any
+ Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
later version.
This program is distributed in the hope that it will be useful,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (__at your option) any
+ Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
later version.
This program is distributed in the hope that it will be useful,
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (__at your option) any
+ Free Software Foundation; either version 2, or (at your option) any
later version.
This program is distributed in the hope that it will be useful,
later version.
This program is distributed in the hope that it will be useful,
-sdcc/device/lib/mcs51
----------------------
+sdcc/device/include/mcs51
+-------------------------
+
+A lot of the include files in this subdirectory used to be in the directory
+one level up from here. Since CVS doesn't support moving files, these files
+were removed there and added here.
#define CAPP 0x20 /* PCA0CPMn */
#define ECOM 0x40 /* PCA0CPMn */
#define PWM16 0x80 /* PCA0CPMn */
#define CAPP 0x20 /* PCA0CPMn */
#define ECOM 0x40 /* PCA0CPMn */
#define PWM16 0x80 /* PCA0CPMn */
+#define PINRSF 0x01 /* RSTSRC */
#define PORSF 0x02 /* RSTSRC */
#define SWRSF 0x10 /* RSTSRC */
#define PORSF 0x02 /* RSTSRC */
#define SWRSF 0x10 /* RSTSRC */
#elif defined(SDCC_USE_XSTACK)
#elif defined(SDCC_USE_XSTACK)
-typedef unsigned char pdata * va_list ;
+typedef unsigned char __pdata * va_list ;
#define va_arg(marker,type) *((type __data *)(marker -= sizeof(type)))
#define va_start(marker,first) { marker = (va_list)((char __pdata *)&first); }
#else
#define va_arg(marker,type) *((type __data *)(marker -= sizeof(type)))
#define va_start(marker,first) { marker = (va_list)((char __pdata *)&first); }
#else
-typedef unsigned char data * va_list ;
+typedef unsigned char __data * va_list ;
#define va_arg(marker,type) *((type __data * )(marker -= sizeof(type)))
#define va_start(marker,first) { marker = (va_list) ((char __data * )&first); }
#define va_arg(marker,type) *((type __data * )(marker -= sizeof(type)))
#define va_start(marker,first) { marker = (va_list) ((char __data * )&first); }
/* Types for `void *' pointers. */
/* Types for `void *' pointers. */
-typedef long int intptr_t;
-typedef unsigned long int uintptr_t;
+#if defined (SDCC_mcs51) || defined (SDCC_ds390)
+ typedef long int intptr_t;
+ typedef unsigned long int uintptr_t;
+#else
+ typedef int intptr_t;
+ typedef unsigned int uintptr_t;
+#endif
/* Largest integral types. */
/* Largest integral types. */
# define UINT_FAST32_MAX (4294967295UL)
/* Values to test for integral types holding `void *' pointer. */
# define UINT_FAST32_MAX (4294967295UL)
/* Values to test for integral types holding `void *' pointer. */
+#if defined (SDCC_mcs51) || defined (SDCC_ds390)
# define INTPTR_MIN (-2147483647L-1)
# define INTPTR_MAX (2147483647L)
# define UINTPTR_MAX (4294967295UL)
# define INTPTR_MIN (-2147483647L-1)
# define INTPTR_MAX (2147483647L)
# define UINTPTR_MAX (4294967295UL)
+#else
+# define INTPTR_MIN (-32767-1)
+# define INTPTR_MAX (32767)
+# define UINTPTR_MAX (65535)
+#endif
/* Minimum for largest signed integral type. */
# define INTMAX_MIN (-__INT32_C(-2147483647L)-1)
/* Minimum for largest signed integral type. */
# define INTMAX_MIN (-__INT32_C(-2147483647L)-1)
/* Limits of other integer types. */
/* Limits of `ptrdiff_t' type. */
/* Limits of other integer types. */
/* Limits of `ptrdiff_t' type. */
+#if defined (SDCC_mcs51) || defined (SDCC_ds390)
# define PTRDIFF_MIN (-2147483647L-1)
# define PTRDIFF_MAX (2147483647L)
# define PTRDIFF_MIN (-2147483647L-1)
# define PTRDIFF_MAX (2147483647L)
+#else
+# define PTRDIFF_MIN (-32767-1)
+# define PTRDIFF_MAX (32767)
+#endif
/* Limit of `size_t' type. */
# define SIZE_MAX (65535)
/* Limit of `size_t' type. */
# define SIZE_MAX (65535)
*
* DESCRIPTION
* The OSTA-UDF(tm) 1.50 standard states that using CRCs is mandatory.
*
* DESCRIPTION
* The OSTA-UDF(tm) 1.50 standard states that using CRCs is mandatory.
- * The polynomial used is: x^16 + x^12 + x^15 + 1
+ * The polynomial used is: x^16 + x^12 + x^5 + 1
*
* PRE-CONDITIONS
* data Pointer to the data block.
*
* PRE-CONDITIONS
* data Pointer to the data block.
#if defined(__BORLANDC__) || defined(_MSC_VER)
#define STRCASECMP stricmp
#if defined(__BORLANDC__) || defined(_MSC_VER)
#define STRCASECMP stricmp
#else
#define STRCASECMP strcasecmp
#endif
#else
#define STRCASECMP strcasecmp
#endif
if (0 || pic16_debug_verbose || pic16_pcode_verbose) {
len = strlen (buf) + strlen (comment) + 10;
total = (char *) Safe_malloc (len);
if (0 || pic16_debug_verbose || pic16_pcode_verbose) {
len = strlen (buf) + strlen (comment) + 10;
total = (char *) Safe_malloc (len);
- snprintf (total, len, "%s: %s", comment, buf);
+ SNPRINTF (total, len, "%s: %s", comment, buf);
pic16_pCodeInsertAfter (pc, pic16_newpCodeCharP(total));
Safe_free (total);
}
pic16_pCodeInsertAfter (pc, pic16_newpCodeCharP(total));
Safe_free (total);
}
if (!map_symToStr) {
int i;
if (!map_symToStr) {
int i;
- map_strToSym = newHashTable (128);
- map_symToStr = newHashTable (128);
-
struct { char *name; symbol_t sym; } predefsyms[] = {
{"WREG", SPO_WREG},
{"STATUS", SPO_STATUS},
struct { char *name; symbol_t sym; } predefsyms[] = {
{"WREG", SPO_WREG},
{"STATUS", SPO_STATUS},
+ map_strToSym = newHashTable (128);
+ map_symToStr = newHashTable (128);
+
for (i=0; predefsyms[i].name; i++) {
char *name;
for (i=0; predefsyms[i].name; i++) {
char *name;
case POC_XORLW: /* modifies STATUS (Z,N) */
/* can be optimized iff WREG contains a known literal (0x100 - 0x1FF) */
if (pci->pcop->type == PO_LITERAL) {
case POC_XORLW: /* modifies STATUS (Z,N) */
/* can be optimized iff WREG contains a known literal (0x100 - 0x1FF) */
if (pci->pcop->type == PO_LITERAL) {
- lit = (unsigned char) PCOL(pci->pcop)->lit;
+ lit = (unsigned char) PCOL(pci->pcop)->lit;
val = defmapCurr (list, SPO_WREG, pc);
if (val) vallit = litFromValnum (val->in_val);
if (vallit != -1) {
val = defmapCurr (list, SPO_WREG, pc);
if (val) vallit = litFromValnum (val->in_val);
if (vallit != -1) {
-#define pcTitle(pc) (snprintf (buf, BUF_SIZE, "n_%p, %p/%u", PCODE(pc), isPCI(pc) ? PCI(pc)->pcflow : NULL, PCODE(pc)->seq), &buf[0])
+#define pcTitle(pc) (SNPRINTF (buf, BUF_SIZE, "n_%p, %p/%u", PCODE(pc), isPCI(pc) ? PCI(pc)->pcflow : NULL, PCODE(pc)->seq), &buf[0])
#if 0
static int ptrcmp (const void *p1, const void *p2) {
#if 0
static int ptrcmp (const void *p1, const void *p2) {
pc = pb->pcHead;
while (pc && !isPCF(pc)) pc = pc->next;
if (pc) {
pc = pb->pcHead;
while (pc && !isPCF(pc)) pc = pc->next;
if (pc) {
- snprintf (buf, BUF_SIZE, "%s_%s.vcg", PCF(pc)->modname, PCF(pc)->fname);
+ SNPRINTF (buf, BUF_SIZE, "%s_%s.vcg", PCF(pc)->modname, PCF(pc)->fname);
- snprintf (buf, BUF_SIZE, "pb_%p.vcg", pb);
+ SNPRINTF (buf, BUF_SIZE, "pb_%p.vcg", pb);
}
//fprintf (stderr, "now dumping %s\n", buf);
}
//fprintf (stderr, "now dumping %s\n", buf);