tecodev [Mon, 22 Jan 2007 01:18:52 +0000 (01:18 +0000)]
* src/regression/bank1.c, src/regression/compare6.c,
src/regression/add.c: cosmetic changes
* src/pic/pcode.h: moved GPTRTAG_* here from gen.c
* src/pic/gen.c: fixed global zero and one,
(aopForSym): removed unued code,
(aopGet): assert aop is defined, check and use `index' of
pCodeImmd operands (fixes #1630908),
* src/pic/pcode.c (get_op): added output of generic pointer tag,
(register_reassign): prevent accidental register unification,
(ReuseReg): cosmetic changes (also above)
* src/pic/glue.c (pic14_constructAbsMap,pic14emitRegularMap,
pic14emitStaticSeg): do not emit initialized data,
(printIval*): replaced with working versions,
(pic14createInterruptVect,picglue): use idata for initialized data,
now init data should work in all modules (not only main()),
* device/lib/pic/libsdcc/idata.c: NEW, handle initialized data
tecodev [Sat, 20 Jan 2007 15:00:18 +0000 (15:00 +0000)]
* device/lib/pic/libdev/devices.txt: device list for mkall.sh
* device/lib/pic/libdev/mkall.sh: script to rebuild all device libs
* device/lib/pic/libdev/pic14ports.txt: device PORT specifications
* support/scripts/inc2h.pl: fixed major .inc parsing bugs,
applied patch from Robert Tate (#1629249) to add PORTs and TRISs
* device/lib/pic/libdev/pic*.c,
* device/include/pic/pic*.h: regenerated with enhanced inc2h.pl
* device/lib/pic/libdev/Makefile.in: show progress
tecodev [Fri, 19 Jan 2007 10:18:16 +0000 (10:18 +0000)]
* src/pic/device.c (register_map): fixed list construction
* src/pic/gen.c (genDivOneByte,genModOneByte): accept result > 1 byte,
(genMod): removed case for genModbits,
(genModbits): removed as now unused/unimplemented
* src/pic/glue.c (picglue): prevent name clash with sources 'init.c'
borutr [Thu, 18 Jan 2007 20:21:37 +0000 (20:21 +0000)]
* SDCClabel.c: fixed bug #1638651: wrong linenumber presented in warning
* src/asm.c: don't die if the file drfined in #line couldn't be opened
* src/SDCC.lex, src/SDCCglobal.h, src/SDCCicode.c, src/SDCCsymt.c,
src/SDCCval.c: removed redundant definitions of currFname and mylineno;
use filename in lineno instead.
* SDCCast.c: removed MSVC warning C4018: '==' : signed/unsigned mismatch,
print the file name in ast_print()
borutr [Thu, 18 Jan 2007 07:51:26 +0000 (07:51 +0000)]
* support/Util/dbuf_string.c: removed (PTR) cast since it is not
defined in MSVC
* src/SDCC.lex: stringLiteral() returns const char pointer,
EOF detection in stringLiteral(), fixed asmbuf memory leak,
fixed column counting
* src/SDCCval.[ch]: constVal(), value *strVal() and charVal()
accept const char pointer as parameter
* src/SDCCdwarf2.c: corrected buffer size
borutr [Mon, 15 Jan 2007 20:53:50 +0000 (20:53 +0000)]
* src/pic16/ralloc.c, src/pic/ralloc.c, src/SDCC.y:
removed terminal symbol ELIPSIS, since it was never generated by the
lexer and it was wrongly used in parameter_identifier_list rule
borutr [Sun, 14 Jan 2007 19:47:28 +0000 (19:47 +0000)]
* as/mcs51/asnoice.c, as/hc08/asnoice.c: fixed bug #1447412:
Cannot debug files that contain spaces in the path name
by converting spaces in asm file name to underscores
MaartenBrock [Mon, 8 Jan 2007 22:18:40 +0000 (22:18 +0000)]
* device/lib/printf_large.c (output_float): removed recursion,
use smaller buffer on stack for mcs51,
fixed bug printing 1.96
* support/regression/tests/snprintf.c: added test
MaartenBrock [Sun, 7 Jan 2007 16:09:46 +0000 (16:09 +0000)]
* src/port.h: added TARGET_Z80_LIKE macro
* src/SDCCmain.c (linkEdit): use TARGET_Z80_LIKE,
output PSEG location if --xram-loc or --xstack-loc was used
* as/link/mcs51/lkarea.c (lnksect2): set segment address afterwards
bernhardheld [Mon, 1 Jan 2007 20:42:04 +0000 (20:42 +0000)]
* src/SDCCast.c (createDo): backPatchLabels() needs falseLabel in empty 'while'-loop to work correctly, see regression test 'while.c'
* support/regression/tests/while.c: added
borutr [Mon, 1 Jan 2007 17:00:18 +0000 (17:00 +0000)]
* support/cpp2/libcpp/directives.c, support/cpp2/libcpp/identifiers.c,
support/cpp2/libcpp/init.c, support/cpp2/libcpp/sdcpp-opts.c,
support/cpp2/libcpp/sdcpp.c:
sdcpp specific pragma/directive/option handling moved to sdcpp.c
* doc/sdccman.lyx: reference to the GCC 4.1.1 CPP Manual
* support/cpp2/libcpp/mkdeps.c: synchronized with GCC CPP 4.1.1
bernhardheld [Sat, 30 Dec 2006 22:02:12 +0000 (22:02 +0000)]
* src/SDCCpeeph.c (deadMove),
* src/port.h,
* src/mcs51/peep.h: renamed 'op' by 'reg'
* src/mcs51/peep.c (isFunc, isCallerSaveFunc): added,
(scan4op): small change for removeDeadMove(), added support for 'callee saves' and/or PACLL function calls,
(removeDeadMove): added, removes superflous 'mov r%1,%2',
(removeDeadPopPush): renamed from mcs51DeadMove(), common parts left in new dispatcher mcs51DeadMove()
(mcs51DeadMove): dispatcher for removeDeadPopPush() and new removeDeadMove()
* src/mcs51/peeph.def: added rule 301 removing superflous 'mov r%1,%2'
MaartenBrock [Fri, 29 Dec 2006 09:02:08 +0000 (09:02 +0000)]
* src/z80/gen.c (assignResultValue): fixed bug when registers overlap,
with this z80 passes printf float test when enabled
* support/regression/tests/bug1057979.c: typo disabled ds390 float test
epetrich [Wed, 27 Dec 2006 16:28:04 +0000 (16:28 +0000)]
* src/SDCC.y (type_specifier2, pointer),
* src/SDCCsymt.h,
* src/SDCCsymt.c (mergeSpec, checkSClass),
* support/Util/SDCCerr.c,
* support/Util/SDCCerr.h: Parse and validate the restrict keyword
* support/valdiag/valdiag.py: Allow test cases to specify
required language standard
* support/valdiag/tests/restrict.c: New file to test restrict keyword
* support/valdiag/tests/tentdecl.c: Supress empty source file error
bernhardheld [Tue, 26 Dec 2006 21:02:49 +0000 (21:02 +0000)]
* src/SDCCpeeph.c: made labelHashEntry global, made pcDistance, FBYNAME static,
(pcDistance): made static, use isComment and isLabel,
(deadMove): added,
(getLabelRef): added, extracted from labelRefCount(),
(labelRefCount): use new getLabelRef(),
(callFuncByName): made static, added deadMove, use isComment and isLabel,
(newPeepRule): made static, set isLabel,
(isLabelDefinition): added parameter isPeepRule to allow '%' in labels from peephole rules,
(buildLabelRefCountHash): speed up by running isLabelDefinition() only when isComment or isLabel is set
* src/SDCCpeeph.h: added "isLabel" and "visited" to struct lineNode, added labelHashEntry, isLabelDefinition, labelHash and getLabelRef to make them global
* src/mcs51/peep.h: added
* src/mcs51/peep.c: added, implements mcs51DeadMove()
* src/port.h: added peep->deadMove to port structure
* src/mcs51/main.c: initialize peep->deadMove with mcs51DeadMove
* src/mcs51/peeph.def: renumbered rule 300 to 400, added new rule 300 deadMove, finally removed no. 1 and 2
* src/mcs51/gen.c,
* src/pic/gen.c,
* src/z80/gen.c,
* src/z80/ralloc.c,
* src/pic16/gen.c,
* src/ds390/gen.c,
* src/hc08/gen.c: mark lines with isComment or isLabel
* sim/ucsim/s51.src/uc390hw.cc: don't waist 65535 ticks before CKRDY
* .version,
* sdcc.spec: bumped version to 2.6.3
borutr [Sat, 23 Dec 2006 19:52:42 +0000 (19:52 +0000)]
* support/cpp2/cpphash.h, support/cpp2/cpplex.c,
support/cpp2/cpplib.[ch], support/cpp2/sdcppinit.c, doc/sdccman.lyx,
preproc.c: an other try to fix bug #982435: introduced
-pedantic-parse-number command line option and pedantic_parse_number
pragma
borutr [Sat, 23 Dec 2006 19:46:24 +0000 (19:46 +0000)]
* support/cpp2/cpphash.h, support/cpp2/cpplex.c,
support/cpp2/cpplib.[ch], support/cpp2/sdcppinit.c, doc/sdccman.lyx:
an other try to fix bug #982435: introduced -pedantic-parse-number
command line option and pedantic_parse_number pragma
tecodev [Tue, 12 Dec 2006 23:47:32 +0000 (23:47 +0000)]
* src/pic/device.h: removed AssignedMemory structure and macros
* src/pic/device.c: removed global finalMapping (linker assigns
memory locations),
(register_map): add SFRs to remembered memRanges
(addMemRange,isSFR,dump_map,dump_sfr,mapRegister,assignRegister,
assignFixedRegisters,assignRelocatableRegisters): removed,
(setMaxRAM,validAddress): adapted accordingly,
(pic14_hasSharebank,pic14_getSharedStack): only report and use
reasonably sized sharebanks,
* src/pic/ralloc.c (writeUsedRegs): stripped down (remove?),
(allDefsOutOfRange): removed unused code,
* src/pic/main.c (_process_pragma): removed memmap/maxram pragma
handling
* src/pic/pcode.c (register_reassign): removed recursion warning,
fired far too often,
* src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap): modified
to use existing pic14_stringInSet() to avoid duplicate symbols,
tidied up the code a bit,
(pic14printLocals): added in symmetry to printExterns, replaces
writeUsedRegs more or less,
(picglue): call new pic14_printLocals(),
* device/include/pic/pic*.h: removed #pragma memmap directives,
information gathered from include/pic/pic14devices.txt
* support/scripts/inc2h.pl: do not emit #pragma memmap lines
tecodev [Sun, 10 Dec 2006 17:07:41 +0000 (17:07 +0000)]
* device/lib/pic16/libc/stdio/vfprintf.c,
* device/lib/pic16/libc/stdio/printf_small.c,
* device/lib/pic16/libc/stdio/printf_timy.c: pop int from stack for
char arguments, as char varargs are cast to int by the caller,
hopefully fixes #1604915 (other device libraries are still affected)
MaartenBrock [Sun, 10 Dec 2006 15:04:52 +0000 (15:04 +0000)]
* device/include/malloc.h: removed init_dynamic_memory
* device/lib/malloc.c: made init_dynamic_memory static and automatically
call it once from malloc. Also use _sdcc_heap[] from _heap.c
* device/lib/_heap.c: new, added, contains _sdcc_heap[]
* device/lib/libsdcc.lib,
* device/lib/Makefile.in,
* support/regression/ports/mcs51-xstack-auto/spec.mk: added _heap.c
* doc/sdccman.lyx: documented use of new _heap.c
* support/regression/tests/malloc.c: removed init_dynamic_memory
* src/cdbFile.c(spacesToUnderscores): new function,
(cdbWriteEndFunction, cdbWriteCLine): use spacesToUnderscores, fixes bug 1068030
MaartenBrock [Wed, 6 Dec 2006 12:30:34 +0000 (12:30 +0000)]
* src/SDCCmain.c (linkEdit): fixed bug 1609279
* .version: bumped to 2.6.2 because a) it's been a while
b) the linker sources have moved c) the preprocessor is upgraded
tecodev [Thu, 30 Nov 2006 13:51:34 +0000 (13:51 +0000)]
* src/pic/device.c (create_pic,ram_map): add memRange entries to PIC
(pic14_getSharebankSize, pic14_getSharebankAddress): replaced with
(pic14_hasSharebank,pic14_isShared,pic14_allRAMShared,
pic14_getSharedStack): NEW, evaluate the memRange entries to locate
a sharebank, use a non-shared bank for the stack if none available
* src/pic/device.h (struct memRange): added linked list next field,
added prototypes for above functions
* src/pic/ralloc.c (initStack): handle shared and banked stacks,
(typeRegWithIdx): accept fixed and unfixed stack registers
* src/pic/pcode.c (pCodeInitRegisters): use new functions to create
the stack, handle shared and banked stack (except for WSAVE),
(insertBankSel): removed useless optimization (will never fire),
(FixRegisterBanking): added optimization for devices with only one
possibly aliased bank of memory, like 16f84
* src/pic/glue.c (pic14_constructAbsMap): back to udata_ovr, as some
devices have no SHAREBANK in the linker script
* device/include/pic/pic14devices.txt: documented memmap
* device/lib/pic/libdev/Makefile.in: removed --stack-loc again
epetrich [Thu, 30 Nov 2006 06:34:16 +0000 (06:34 +0000)]
* src/hc08/gen.c (transferRegReg, loadRegFromAop, forceStackedAop,
storeRegToAop, freeAsmop, genPlusIncr, genPlus, genPointerGetSetOfs,
genAnd, genOr, genXor, genLeftShiftLiteral, genRightShiftLiteral,
genhc08Code): switched most of the D (debug) macros to DD (detailed
debug) macros to better control clutter in the generated .asm file.
* src/hc08/gen.c: (forceStackedAop, genUminus, genLeftShift,
genRightShift): fixed bug with non-constant bit shift stored to
a volatile result (SF Open Discussion forum thread #1616749).
Single byte case is not yet optimized.