fw/sdcc
20 years ago* src/SDCCsymt.c (sclsFromPtr),
epetrich [Sun, 14 Sep 2003 17:00:35 +0000 (17:00 +0000)]
* src/SDCCsymt.c (sclsFromPtr),
* src/SDCCsymt.h,
* src/SDCCast.c (decorateType): fixed bug #462971. Also, better
support for standard C idiom of memory mapped variables; for
example, *((xdata int*)0x1234) = 1 is now internally equivalent
to xdata int at 0x1234 tempvar = 1.
* sim/ucsim/z80.src/inst_xd.cc: fixed bug #805483 with patch
provided by Akiya ISHIDA

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2889 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCval.c (cheapestVal): reenabled to reduce int to char
bernhardheld [Sat, 13 Sep 2003 21:54:29 +0000 (21:54 +0000)]
* src/SDCCval.c (cheapestVal): reenabled to reduce int to char
* src/SDCCval.c (constVal): added reduction from int to char
* src/SDCCval.c (valMult, valDiv): fixed sign handling
* src/SDCCval.c (valShift): fixed after change of cheapestVal()
* src/SDCCval.c (valCompare): fixed EQ_OP and NE_OP; they have to ignore the sign
* support/regression/tests/shifts.c: fixed

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2888 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agorealpath() is not available for mingw32. Use _fullpath instead.
jesusc [Sat, 13 Sep 2003 19:09:49 +0000 (19:09 +0000)]
realpath() is not available for mingw32.  Use _fullpath instead.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2887 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/z80/gen.c (genXor): Fixed bug #805445
epetrich [Sat, 13 Sep 2003 02:14:21 +0000 (02:14 +0000)]
* src/z80/gen.c (genXor): Fixed bug #805445

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2886 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed bug #621531 (const & volatile confusion in the type chain).
epetrich [Fri, 12 Sep 2003 07:56:35 +0000 (07:56 +0000)]
Fixed bug #621531 (const & volatile confusion in the type chain).
DCL_PTR_CONST, DCL_PTR_VOLATILE, & IS_PTR_CONST now exclusively
refer to the const or volatile state of the pointer itself.

* src/SDCCast.c
* src/SDCCglue.c
* src/SDCCicode.c
* src/SDCCsymt.c
* src/SDCCval.c
* src/SDCC.y
* src/SDCCsymt.h
* src/pic/gen.c
* src/pic/ralloc.c
* src/pic16/gen.c
* src/pic16/ralloc.c
* support/regression/tests/const.c

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2885 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoWhen checking for duplicated modules use absolute library paths
jesusc [Wed, 10 Sep 2003 17:33:59 +0000 (17:33 +0000)]
When checking for duplicated modules use absolute library paths

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2884 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoadded workaround for packing bug in gcc 21.95.2
sdcc-builder [Tue, 9 Sep 2003 09:58:17 +0000 (09:58 +0000)]
added workaround for packing bug in gcc 21.95.2

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2883 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCicode.c (geniCodeLogic): fixed bug #797572
epetrich [Tue, 9 Sep 2003 08:53:43 +0000 (08:53 +0000)]
* src/SDCCicode.c (geniCodeLogic): fixed bug #797572

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2882 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* device/include/string.h: added size_t typedef, changed
epetrich [Sun, 7 Sep 2003 07:50:07 +0000 (07:50 +0000)]
* device/include/string.h: added size_t typedef, changed
prototypes to use size_t, eliminated separate reentrant and
non-reentrant declarations, added _memmove declaration
* device/lib/_memcpy.c: changed to use size_t instead of int,
changed /4 to >>2 to avoid division library call
* device/lib/_memcmp.c,
* device/lib/_memset.c,
* device/lib/_strncat.c,
* device/lib/_strncpy.c,
* device/lib/_strncmp.c: changed to use size_t instead of int
* device/lib/_memmove.c: new file (fixed bug #772294)
* device/lib/Makefile.in: added _memmove.c
* device/lib/z80/asm_strings.s: fixed bug #772290
* support/regression/tests/bitfields.c: attempt to fix host assertion
failure on amd64-unknown-linux2.2

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2881 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* as/z80/asmain.c (main): fixed bug #801766
epetrich [Sun, 7 Sep 2003 01:01:56 +0000 (01:01 +0000)]
* as/z80/asmain.c (main): fixed bug #801766

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2880 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
epetrich [Sat, 6 Sep 2003 17:36:07 +0000 (17:36 +0000)]
* src/z80/gen.c (aopPut, spillPairReg): fixed bug #800998
* src/z80/gen.c (genFunction, genEndFunction): fixed "bug" #774700

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2879 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/SDCCicode.c (ast2iCode): fixed differences in iCode with different compilers
bernhardheld [Fri, 5 Sep 2003 22:14:44 +0000 (22:14 +0000)]
src/SDCCicode.c (ast2iCode): fixed differences in iCode with different compilers

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2878 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofix big endian hosts
sdcc-builder [Fri, 5 Sep 2003 09:57:41 +0000 (09:57 +0000)]
fix big endian hosts

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2877 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofixed 64 bit hosts
sdcc-builder [Fri, 5 Sep 2003 09:50:45 +0000 (09:50 +0000)]
fixed 64 bit hosts

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2876 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCast.c (isConformingBody): fixed loop reversal bug
epetrich [Fri, 5 Sep 2003 05:08:19 +0000 (05:08 +0000)]
* src/SDCCast.c (isConformingBody): fixed loop reversal bug
reported in bug #800609

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2875 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
vrokas [Thu, 4 Sep 2003 15:49:33 +0000 (15:49 +0000)]
* device.c, device.h, gen.c, gen.h, genarith.c, glue.c, pcode.c,
pcodeflow.c, pcodeflow.h, pcode.h, pcodepeep.c, pcoderegs.c,
pcoderegs.h, ralloc.c, ralloc.h: top header beautifications
* main.c: added top header and GPL license notice
* pcode.c: fixed the if-conditional warning

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2874 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago*** empty log message ***
vrokas [Thu, 4 Sep 2003 15:47:17 +0000 (15:47 +0000)]
*** empty log message ***

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2873 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agotest _mullong.c on host too
bernhardheld [Thu, 4 Sep 2003 12:16:19 +0000 (12:16 +0000)]
test _mullong.c on host too

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2871 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agodevice/lib/_mullong.c: replaced int by short for gcc
bernhardheld [Thu, 4 Sep 2003 12:14:29 +0000 (12:14 +0000)]
device/lib/_mullong.c: replaced int by short for gcc

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2870 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoadded :-)
bernhardheld [Wed, 3 Sep 2003 20:34:10 +0000 (20:34 +0000)]
added :-)

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2869 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago#warning does not work in MSVC. Used "#pragma message" instead.
jesusc [Mon, 1 Sep 2003 17:13:58 +0000 (17:13 +0000)]
#warning does not work in MSVC.  Used "#pragma message" instead.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2867 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
epetrich [Mon, 1 Sep 2003 02:21:06 +0000 (02:21 +0000)]
* src/SDCCpeeph.c (notVolatile, notVolatileVariable): handle IFX
and JUMPTABLE iCodes properly now (worked by accident before)
* src/mcs51/gen.c (leftRightUseAcc),
* src/ds390/gen.c (leftRightUseAcc): handle IFX and JUMPTABLE
iCode properly now. Use getSize instead of nRegs since a & b
aren't part of the nRegs tally.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2866 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/pic16/main.c: _pic16_genIVT() corrected offsets in the interrupt
vrokas [Sun, 31 Aug 2003 11:51:50 +0000 (11:51 +0000)]
* src/pic16/main.c: _pic16_genIVT() corrected offsets in the interrupt
  vector table
* src/pic16/pcode.c: fix to disable inserting BANKSEL before
  instructions that use the _STATUS register

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2865 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* device/lib/_mullong.c: fixed for "--model-large --int-long-reent" (resp. --stack...
bernhardheld [Sun, 31 Aug 2003 11:26:29 +0000 (11:26 +0000)]
* device/lib/_mullong.c: fixed for "--model-large --int-long-reent" (resp. --stack-auto), prepared for --xstack

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2864 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
bernhardheld [Sun, 31 Aug 2003 11:19:00 +0000 (11:19 +0000)]
* src/mcs51/gen.c (freeAsmop): fixed off by one in stack offset (AOP_STK)
* src/mcs51/gen.c (genNearPointerSet): added missing opcode for fetching of the pointer
* src/mcs51/gen.c (genNearPointerGet): added reuse of PREG, copied from genNearPointerSet()
* src/mcs51/gen.c (genNearPointerGet): don't pop r0/r1, if RESULTONSTACK
* src/mcs51/gen.c: changed order of freeAsmop(left/right/result)-calls. If they pop r0/r1 they must be called in the opposite order than aopOp().

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2863 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofixed for 64 bit hosts
bernhardheld [Fri, 29 Aug 2003 15:21:02 +0000 (15:21 +0000)]
fixed for 64 bit hosts

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2861 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofixed it again
bernhardheld [Fri, 29 Aug 2003 09:46:05 +0000 (09:46 +0000)]
fixed it again

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2859 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agodoc/sdccman.lyx: reverted tables to those in cvs 1.64
frief [Thu, 28 Aug 2003 20:27:01 +0000 (20:27 +0000)]
doc/sdccman.lyx: reverted tables to those in cvs 1.64

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2858 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoreverted tables to cvs version 1.64. Please mail me directly if any problems should...
frief [Thu, 28 Aug 2003 20:23:05 +0000 (20:23 +0000)]
reverted tables to cvs version 1.64. Please mail me directly if any problems should show up.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2857 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agodevice/lib/_startup.c: quick & dirty fix for ds390/ds400;
bernhardheld [Thu, 28 Aug 2003 12:22:30 +0000 (12:22 +0000)]
device/lib/_startup.c: quick & dirty fix for ds390/ds400;
these ports have their own _sdcc_external_start()

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2855 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agominor fix in "Configure Options"
bernhardheld [Thu, 28 Aug 2003 08:07:28 +0000 (08:07 +0000)]
minor fix in "Configure Options"

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2854 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/pic/glue.c (pic14printPublics): fix bitvars can't be public
bernhardheld [Tue, 26 Aug 2003 08:26:24 +0000 (08:26 +0000)]
src/pic/glue.c (pic14printPublics): fix bitvars can't be public

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2853 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoCheck for '.' in filename only, not the whole path.
jesusc [Mon, 25 Aug 2003 16:13:07 +0000 (16:13 +0000)]
Check for '.' in filename only, not the whole path.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2852 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoadded section about mcs51 variants, other minor changes
frief [Sun, 24 Aug 2003 14:38:12 +0000 (14:38 +0000)]
added section about mcs51 variants, other minor changes

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2851 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoIt is --use-stdout, not --use-stderr...
jesusc [Sun, 24 Aug 2003 03:12:14 +0000 (03:12 +0000)]
It is --use-stdout, not --use-stderr...

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2850 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed gcc warning
jesusc [Sun, 24 Aug 2003 00:07:07 +0000 (00:07 +0000)]
Fixed gcc warning

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2849 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agovarious additions and updates. Rearranged sections
frief [Sat, 23 Aug 2003 20:10:48 +0000 (20:10 +0000)]
various additions and updates. Rearranged sections

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2848 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoseveral additions at various places
frief [Sat, 23 Aug 2003 13:34:16 +0000 (13:34 +0000)]
several additions at various places

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2847 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agomcs51 linker uses .rel extension, not .o
jesusc [Sat, 23 Aug 2003 04:04:29 +0000 (04:04 +0000)]
mcs51 linker uses .rel extension, not .o

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2846 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoz80 and mcs51 linkers complaint if a public symbol is defined in more
jesusc [Fri, 22 Aug 2003 20:17:12 +0000 (20:17 +0000)]
z80 and mcs51 linkers complaint if a public symbol is defined in more
than one library module.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2844 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoPeephole optimizer speed up
epetrich [Fri, 22 Aug 2003 19:27:52 +0000 (19:27 +0000)]
Peephole optimizer speed up

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2843 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoTry to make the peephole optimizer smarter by maintaining
epetrich [Fri, 22 Aug 2003 04:54:06 +0000 (04:54 +0000)]
Try to make the peephole optimizer smarter by maintaining
an association between the assembly source code and the
iCodes that originated them. Put this information to use
with a new peephole rule condition "notVolatile" so that
the rules can be aggressive yet still safe.

* src/SDCCpeeph.c
* src/SDCCpeeph.h
* src/mcs51/gen.c
* src/mcs51/peeph.def

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2842 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofixed bug #741761
epetrich [Wed, 20 Aug 2003 23:17:13 +0000 (23:17 +0000)]
fixed bug #741761

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2841 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoreplaced _pdata by pdata
bernhardheld [Wed, 20 Aug 2003 20:37:58 +0000 (20:37 +0000)]
replaced _pdata by pdata

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2840 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoChanged the type of the result of the ! (NOT) operator to char;
epetrich [Wed, 20 Aug 2003 06:51:32 +0000 (06:51 +0000)]
Changed the type of the result of the ! (NOT) operator to char;
previously it returned the same type as the source. This allows
us to eliminate all the genFloatNot functions (all of its target
implementations were very buggy) since !float can use the same
code as !long now.

* src/SDCCicode.c (ast2iCode): ! returns char
* src/mcs51/gen.c (genNot, genNotFloat),
* src/ds390/gen.c (genNot, genNotFloat),
* src/z80/gen.c (genNot, genNotFloat),
* src/pic/gen.c (genNot, genNotFloat),
* src/pic16/gen.c (genNot, genNotFloat): eliminated genNotFloat

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2839 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agopic patches by Slade
bernhardheld [Tue, 19 Aug 2003 15:47:57 +0000 (15:47 +0000)]
pic patches by Slade

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2838 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/z80/gen.c (isUnsplitable, fetchPairLog): fixed bug #770454
epetrich [Mon, 18 Aug 2003 20:07:35 +0000 (20:07 +0000)]
* src/z80/gen.c (isUnsplitable, fetchPairLog): fixed bug #770454

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2837 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoMade bitfield a distinct type from bit so that bitfields
epetrich [Mon, 18 Aug 2003 05:35:47 +0000 (05:35 +0000)]
Made bitfield a distinct type from bit so that bitfields
convert as per ANSI C and bits retain their traditional
boolean style behaviour. Implemented bitfield support in
the z80 port.

* src/SDCCsymt.h,
* src/SDCCsymt.c,
* src/SDCCast.c,
* src/cdbFile.c,
* src/mcs51/gen.c,
* src/ds390/gen.c: bit v bitfield split
* src/z80/gen.c: New support for bitfields
* support/regression/tests/bitfields.c: reenabled z80,
added more tests

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2836 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoadded peepholes 180.x, moved peephole 180 to 181
frief [Sun, 17 Aug 2003 15:05:35 +0000 (15:05 +0000)]
added peepholes 180.x, moved peephole 180 to 181

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2835 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdded peephole 180.x, moved peephole 180 to 181
frief [Sun, 17 Aug 2003 15:03:59 +0000 (15:03 +0000)]
Added peephole 180.x, moved peephole 180 to 181

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2834 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoThe first rules relate to bitfields, the last speed up
frief [Sun, 17 Aug 2003 10:16:30 +0000 (10:16 +0000)]
The first rules relate to bitfields, the last speed up
access to xdata mapped I/O devices.
* src/mcs51/peeph.def: added 24 peepholes 246.x - 248.x

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2833 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdded 24 peepholes 246.x - 248.x. The first rules relate to bitfields, the last speed...
frief [Sun, 17 Aug 2003 10:14:24 +0000 (10:14 +0000)]
Added 24 peepholes 246.x - 248.x. The first rules relate to bitfields, the last speed up access to xdata mapped I/O devices.
Some occurences of RESTART removed

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2832 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agooops, needed dname==TRUE in my last update
epetrich [Sat, 16 Aug 2003 21:25:30 +0000 (21:25 +0000)]
oops, needed dname==TRUE in my last update

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2831 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoCleaned up genPackBits and genUnpackBits and added two helper
epetrich [Sat, 16 Aug 2003 21:10:11 +0000 (21:10 +0000)]
Cleaned up genPackBits and genUnpackBits and added two helper
functions, emitPtrByteGet & emitPtrByteSet. Added optimizations
for literal assignments in genPackBits (thanks to Frieder for
reminding me).

* src/mcs51/gen.c
* src/ds390/gen.c

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2830 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed bug #748310 (pointer to function type mishandled when the
epetrich [Sat, 16 Aug 2003 07:58:46 +0000 (07:58 +0000)]
Fixed bug #748310 (pointer to function type mishandled when the
function name is omitted). Also fixed a SIGSEGV when a function
attribute (reentrant, etc) is used on a non-function or on a
function but misplaced before the parameter list.

* src/SDCC.y (abstract_declarator, abstract_declaractor2): fixed
bug #748310
* src/SDCC.y (declarator2_function_attributes): avoided SIGSEGV
* support/Util/SDCCerr.h,
* support/Util/SDCCerr.c: Added func attr misuse error msg

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2829 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed bug #787649 by anonymous
bernhardheld [Fri, 15 Aug 2003 20:37:26 +0000 (20:37 +0000)]
Fixed bug #787649 by anonymous
* src/SDCCglue.c (emitRegularMap): added emission of sloc for func ptr
* src/ds390/gen.c (aopForSym): fixed func ptr in sloc

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2828 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoMSVC gives an error if declaration is after statements
jesusc [Thu, 14 Aug 2003 05:19:07 +0000 (05:19 +0000)]
MSVC gives an error if declaration is after statements

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2827 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed numerous bitfield problems.
epetrich [Thu, 14 Aug 2003 03:15:23 +0000 (03:15 +0000)]
Fixed numerous bitfield problems.

* src/SDCC.y: More bitfield related error checking
* src/SDCCsymt.h,
* src/SDCCsymt.c (compStructSize): fixed bitfield offset calc
* support/Util/SDCCerr.h,
* support/Util/SDCCerr.c: Added & edited some bitfield err msgs
* src/mcs51/gen.c (genPackBits, genUnpackBits): fixed mask bugs
* src/ds390/gen.c (genPackBits, genUnpackBits): fixed mask bugs
* support/regression/tests/bitfields.c: tests added

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2826 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
bernhardheld [Wed, 13 Aug 2003 20:10:57 +0000 (20:10 +0000)]
* src/SDCCcse.c (algebraicOpts): fix bug converting op from value to type
* src/SDCCicode.c (operandOperation): rewritten some ops (*, ==, unary_minus) to fix possible overflows and to accord with ANSI
* src/SDCCsymt.c (computeType): literals are handled the same way as any other type
* src/SDCCval.c (cheapestVal): removed, it doesn't accord with ANSI (can be re-activated by defining REDUCE_LITERALS)
* src/SDCCval.c (constVal): fixed; hex and octal constants can be unsigned, but are signed by default
* src/SDCCval.c (constVal): rearranged
* src/SDCCval.c (valMod): preliminary fix
* src/SDCCval.c (valCastLiteral): use TYPE_* types
* support/regression/literalop.c: added, work in progress

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2825 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofixed typo in my last commit
epetrich [Wed, 13 Aug 2003 07:21:53 +0000 (07:21 +0000)]
fixed typo in my last commit

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2824 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoMade the constant following the "interrupt" keyword optional. If omitted,
epetrich [Wed, 13 Aug 2003 04:53:07 +0000 (04:53 +0000)]
Made the constant following the "interrupt" keyword optional. If omitted,
the function will not automatically be given an entry in the interrupt
vector table (similar to #pragma NOIV, but less syntacticly kludgy). The
interrupt number is also now range checked.

* src/SDCC.y
* src/SDCCmem.c
* src/SDCCglue.c
* src/SDCCsymt.h
* support/Util/SDCCerr.c
* support/Util/SDCCerr.h
* doc/sdccman.lyx

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2823 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoGenerate warnings for useless declarations like "char data;"
epetrich [Tue, 12 Aug 2003 08:44:47 +0000 (08:44 +0000)]
Generate warnings for useless declarations like "char data;"
that don't do what new users expect.

* src/SDCC.y
* support/Util/SDCCerr.h
* support/Util/SDCCerr.c

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2822 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/SDCCval.c (valMult): fixex overflow detection of negativ int
bernhardheld [Sat, 9 Aug 2003 17:18:13 +0000 (17:18 +0000)]
src/SDCCval.c (valMult): fixex overflow detection of negativ int

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2821 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed warnings in MSVC build.
jesusc [Sat, 9 Aug 2003 07:20:14 +0000 (07:20 +0000)]
Fixed warnings in MSVC build.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2820 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoChanges to support big endian targets:
epetrich [Fri, 8 Aug 2003 03:52:39 +0000 (03:52 +0000)]
Changes to support big endian targets:

* src/ports.h
* src/SDCCglue.c
* src/avr/main.c
* src/ds390/main.c
* src/izt/i186.c
* src/mcs51/main.c
* src/pic/main.c
* src/pic16/main.c
* src/xa51/main.c
* src/z80/main.c

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2819 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agostale date removed, width of tables, pic16, interrupt section, volatile, link to...
frief [Thu, 7 Aug 2003 22:37:36 +0000 (22:37 +0000)]
stale date removed, width of tables, pic16, interrupt section, volatile, link to flP5, sdcdb is unix-only

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2818 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/z80/ralloc.c (joinPushes): made compatible with new signedness
epetrich [Thu, 7 Aug 2003 21:05:27 +0000 (21:05 +0000)]
src/z80/ralloc.c (joinPushes): made compatible with new signedness

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2817 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoBugfix for args regression test failure (from change in how literal signedness is...
epetrich [Thu, 7 Aug 2003 20:59:34 +0000 (20:59 +0000)]
Bugfix for args regression test failure (from change in how literal signedness is handled)

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2816 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
bernhardheld [Wed, 6 Aug 2003 12:28:56 +0000 (12:28 +0000)]
* src/SDCCval.c (cheapestVal): changed behaviour to the same as constVal()
* device/lib/time.c: fixed warning "integer overflow in expression"

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2812 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCast.c (decorateType): fixed gcc3.3 warning
bernhardheld [Tue, 5 Aug 2003 20:21:48 +0000 (20:21 +0000)]
* src/SDCCast.c (decorateType): fixed gcc3.3 warning
* src/SDCCast.c (ast_print): improved output of constants

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2811 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed some warnings in MSVC build.
jesusc [Tue, 5 Aug 2003 16:43:40 +0000 (16:43 +0000)]
Fixed some warnings in MSVC build.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2810 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* support/Util/SDCCerr.c: added warning "integer overflow in expression"
bernhardheld [Tue, 5 Aug 2003 16:10:37 +0000 (16:10 +0000)]
* support/Util/SDCCerr.c: added warning "integer overflow in expression"
* support/Util/SDCCerr.h: added warning W_INT_OVL

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2809 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* support/Util/SDCCerr.c: added warning "integer overflow in expression"
bernhardheld [Tue, 5 Aug 2003 16:01:15 +0000 (16:01 +0000)]
* support/Util/SDCCerr.c: added warning "integer overflow in expression"
* support/Util/SDCCerr.h: added warning W_INT_OVL

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2808 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago* src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
bernhardheld [Tue, 5 Aug 2003 15:47:45 +0000 (15:47 +0000)]
* src/SDCCval.c (cheapestVal, valueFromLit): use TYPE_* types
* src/SDCCval.c (constVal): changed default to signed; hex and octal constants are unsigned; added recognition of "u" flag for unsigned
* src/SDCCval.c (valMult): fixed signdness, added warning for overflow
* src/SDCCval.c (valDiv, valMod): fixed signdness
* src/SDCCicode.c (operandOperation): fixed critical typo; fixed signedness of modulo, left and right shift

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2807 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed some warnings when building in MSVC
jesusc [Mon, 4 Aug 2003 17:00:36 +0000 (17:00 +0000)]
Fixed some warnings when building in MSVC

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2806 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed some warnings when building in MSVC
jesusc [Mon, 4 Aug 2003 16:48:50 +0000 (16:48 +0000)]
Fixed some warnings when building in MSVC

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2805 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFixed some warnings when building in MSVC
jesusc [Mon, 4 Aug 2003 16:46:29 +0000 (16:46 +0000)]
Fixed some warnings when building  in MSVC

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2804 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoremoved --nostdlib as suggested by Jesus
bernhardheld [Sun, 3 Aug 2003 19:58:52 +0000 (19:58 +0000)]
removed --nostdlib as suggested by Jesus

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2803 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth@isi.edu>
bernhardheld [Sun, 3 Aug 2003 19:45:10 +0000 (19:45 +0000)]
src/SDCCast.c (constExprTree): fix bug #781827 by Carl Worth <cworth@isi.edu>

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2802 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoredo Frieder's patch
bernhardheld [Sun, 3 Aug 2003 19:21:07 +0000 (19:21 +0000)]
redo Frieder's patch

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2801 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago'O' record is output correctly now.
jesusc [Sat, 2 Aug 2003 11:58:48 +0000 (11:58 +0000)]
'O' record is output correctly now.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2800 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdded support\librarian\Makefile
jesusc [Fri, 1 Aug 2003 15:48:46 +0000 (15:48 +0000)]
Added support\librarian\Makefile

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2799 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoDon't remove .\Makefile
jesusc [Fri, 1 Aug 2003 15:41:04 +0000 (15:41 +0000)]
Don't remove .\Makefile

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2798 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agochmod a+rwx configure configure.in
jesusc [Fri, 1 Aug 2003 09:28:44 +0000 (09:28 +0000)]
chmod a+rwx configure configure.in

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2797 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoCleaning up mess while trying to build librarian. Added librarian to MSVC build.
jesusc [Fri, 1 Aug 2003 08:49:45 +0000 (08:49 +0000)]
Cleaning up mess while trying to build librarian.  Added librarian to MSVC build.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2796 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdded librarian to MSVC build.
jesusc [Fri, 1 Aug 2003 08:36:55 +0000 (08:36 +0000)]
Added librarian to MSVC build.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2795 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoconfigure not needed for librarian. Makefile is enough.
jesusc [Fri, 1 Aug 2003 08:09:56 +0000 (08:09 +0000)]
configure not needed for librarian.  Makefile is enough.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2794 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoconfigure not needed for librarian. Revert to previous version.
jesusc [Fri, 1 Aug 2003 08:04:22 +0000 (08:04 +0000)]
configure not needed for librarian.  Revert to previous version.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2793 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdding librarian to build
jesusc [Thu, 31 Jul 2003 16:41:02 +0000 (16:41 +0000)]
Adding librarian to build

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2792 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agominor fix: sdcpp language is c99
bernhardheld [Thu, 31 Jul 2003 12:06:05 +0000 (12:06 +0000)]
minor fix: sdcpp language is c99

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2791 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years ago3. fix, this time for Alpha; ULONG has 64 bits there, while the mantissa of a double...
bernhardheld [Thu, 31 Jul 2003 10:59:47 +0000 (10:59 +0000)]
3. fix, this time for Alpha; ULONG has 64 bits there, while the mantissa of a double is "only" 53 bits wide

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2789 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoAdding sdcclib to the build.
jesusc [Thu, 31 Jul 2003 08:10:24 +0000 (08:10 +0000)]
Adding sdcclib to the build.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2788 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoBeginning of librarian support added.
jesusc [Thu, 31 Jul 2003 05:18:00 +0000 (05:18 +0000)]
Beginning of librarian support added.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2787 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoFirst try to build under Linux
jesusc [Thu, 31 Jul 2003 01:36:33 +0000 (01:36 +0000)]
First try to build under Linux

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2786 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoOptions --int-long-rent --float-rent --stack-auto are not conflicting
jesusc [Wed, 30 Jul 2003 16:22:15 +0000 (16:22 +0000)]
Options --int-long-rent --float-rent --stack-auto are not conflicting

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2785 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoLinker complaints if linked modules have conflicting options.
jesusc [Wed, 30 Jul 2003 05:32:48 +0000 (05:32 +0000)]
Linker complaints if linked modules have conflicting options.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2784 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoWarning when libfile not found and path is null
jesusc [Mon, 28 Jul 2003 23:19:22 +0000 (23:19 +0000)]
Warning when libfile not found and path is null

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2783 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agoGenerate a warning when a library file is not found.
jesusc [Mon, 28 Jul 2003 21:14:12 +0000 (21:14 +0000)]
Generate a warning when a library file is not found.

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2782 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agosrc/z80/mappings.i: fix _mul[us][int,long] entries
bernhardheld [Mon, 28 Jul 2003 10:09:41 +0000 (10:09 +0000)]
src/z80/mappings.i: fix _mul[us][int,long] entries

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2780 4a8a32a2-be11-0410-ad9d-d568d2c75423

20 years agofix for *z80
bernhardheld [Sun, 27 Jul 2003 20:07:18 +0000 (20:07 +0000)]
fix for *z80

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@2779 4a8a32a2-be11-0410-ad9d-d568d2c75423