1 2006-04-28 Bernhard Held <bernhard AT bernhardheld.de>
3 * device/lib/pic/libdev/Makefile.in,
4 * device/lib/hc08/Makefile.in,
5 * device/lib/gbz80/Makefile.in,
6 * device/lib/z80/Makefile.in,
7 * device/lib/ds390/Makefile.in,
8 * device/lib/ds400/Makefile.in: added srcdir to include search path,
9 thanks to Borut for the bug report
11 2006-04-28 Raphael Neider <rneider AT web.de>
13 * src/pic/{gen.c,main.h,pcode.c},
14 * src/pic16/{gen.c,pcode.c}: quietened compiler warnings
15 concerning signedness with casts
17 2006-04-28 Raphael Neider <rneider AT web.de>
19 * src/pic/gen.c (genFunction): set global pic14_hasInterrupt on
20 definition of an interrupt handler,
21 * src/pic/glue.c (pic14_emitInterruptHandler): moved output of
22 interrupt handler stuff from picglue() to separate routine,
23 (picglue): enabled definition of intr handlers in files w/o main()
25 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
27 * support/librarian/sdcclib.c: moved include <limits.h> up to enable
28 compilation with MSVC 2005 Express Edition (VC8)
30 2006-04-26 Bernhard Held <bernhard AT bernhardheld.de>
32 * device/lib/Makefile: fixed build of gbz80 lib
34 2006-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
36 * support/regression/tests/bug-460010.c,
37 * support/regression/tests/bug-524691.c,
38 * support/regression/tests/bug-716242.c: removed conditional defines
39 that are already in testfwk.h
41 2006-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
43 * src/ds390/gen.c (AccAXRrl1, AccAXLrl1): changed to real rotate by 1,
44 (AccAXRsh1): added, shift right by 1,
45 (AccAXLsh, AccAXRsh, AccAXRshS): updated for AccAXRrl1, AccAXRsh1 and
47 * support/regression/tests/rotate.c: use <stdint.h> and enabled ds390
49 2006-04-25 Bernhard Held <bernhard AT bernhardheld.de>
51 * src/SDCCast.c (decorateType): partial fix for RFE 1475769,
52 remove cast to same type
53 * src/SDCCast.c (decorateType): fix for RFE 1475742,
54 optimize 'ifx (op == 0)' resp. 'ifx (op != 0)'
56 * link/z80/Makefile: removed, they have moved to
59 * configure.in: replaced duplicate message about ucsim by missing sdcpp
60 * install-sh: fix bug #1204398 by setting umask 0022
61 * device/lib/Makefile: separate build of z80 and gbz80 lib
63 2006-04-24 Bernhard Held <bernhard AT bernhardheld.de>
65 Enabled VPATH feature: changed nearly all Makefiles (149 files).
66 See sdccman.lyx '2.4.10 VPATH feature' about how to use it.
68 One basic decision: e.g. src/clean.mk includes further files. In order
69 to make this work there are two solutions:
70 - rename another dozen clean.mk to clean_in.mk, add srcdir to them and
71 run configure on them. This way they can use
72 'include $(srcdir)/port-clean.mk'
73 - always include clean.mk by the Makefile at the same level. To avoid
74 that `make clean` tries to include and build Makefile.dep the
75 MAKECMDGOALS are examined (see e.g. src/Makefile.in). This has been
76 implemented, because now even `make uninstall` doesn't create
77 Makefile.in. clean.mk could be eliminated by pasting it in
80 * debugger/mcs51/Makefile.in: build own objects from library sources
81 (SLIB, SDCC) in current directory
83 * configure, configure.in: renamed --disable-device-lib-build in
84 --disable-device-lib; added --enable-doc, the required tools are
85 searched by configure; added result message; the toolchain for the
86 belonging ports are now only built, if the port is enabled.
88 * support/regression/*: all output is written in directory gen, because
89 the fwk and ports directories don't livet in the build tree using vpath
91 * doc/sdccman.lyx: renamed --disable-device-lib-build to
92 --disable-device-lib, added --enable-doc, added section VPATH
94 * sim/ucsim/configure.in,
95 * sim/ucsim/configure.in: hc08 couldn't be disabled, now hc08 and
96 z80 are enabled by default
98 2006-04-24 Raphael Neider <rneider AT web.de>
100 * src/pic/device.c (pic14_assignConfigWordValue): remember assignments
101 to config word, "pic14_"-prefixed some extern functions
102 (pic14_emitConfigWord): emit __config directive(s) if assignment to
103 config word has been found
104 * src/pic/device.h: added prototypes
105 * src/pic/pcode.c: added "pic14_"-prefix where needed
106 * src/pic/ralloc.c (IS_CONFIG_ADDRESS,pic14_assignRegisters): cosmetic
108 * src/pic/glue.c (pic14_constructAbsMap): handle assignments to config
110 (pic14emitRegularMap): ignore config words,
111 (pic14createInterruptVect): moved generating __config directives away
112 (picglue): have __config directives emitted
114 2006-04-24 Borut Razem <borut.razem AT siol.net>
116 * doc/Makefile: sync with nightly build makefile
118 2006-04-24 Raphael Neider <rneider AT web.de>
120 * src/pic/pcoderegs.c (OptimizeRegUsage): do not optimize
121 registers that have not been assigned proper liveranges,
122 fixes #1469504 and #1474602,
123 (pCodeRegOptimizeRegUsage): fixed typo in comment
125 2006-04-24 Borut Razem <borut.razem AT siol.net>
127 * device/examples/main8051.c: deleted - it was removed from CVS
128 24.mar.2000 and after that modified 18.feb.2001, so it reappered
129 after the transition to Subversion
130 * src/SDCCalloc.h: deleted - it was removed from CVS
131 3.feb.2001 and after that modified 18.feb.2001, so it reappered
132 after the transition to Subversion
133 * sim/ucsim/cpu.gif, sim/ucsim/interrupt.gif, sim/ucsim/new.gif,
134 sim/ucsim/serial1.gif, sim/ucsim/serial2.gif,
135 sim/ucsim/term_cpuopt.gif, sim/ucsim/timers.gif, sim/ucsim/wins.gif,
136 sim/ucsim/post.jpg, sim/ucsim/UCsim.jpg: corrected
138 2006-04-22 Maarten Brock <sourceforge.brock AT dse.nl>
140 * as/asx8051.dsp: added mcs51/strcmpi.h
141 * as/hc08/as_hc08.dsp: added asm.h, m6808.h, strcmpi.h
142 * as/hc08/aslink.h: updated lnksect prototype
144 * as/mcs51/asm.h: added a_addr to struct area and s_org to struct sym
146 * as/mcs51/asmain.c (asmbl): init dot.s_org for S_ORG,
147 (newdot): handle A_ABS
149 * as/mcs51/asout.c (outarea): output address
150 * as/hc08/lkaomf51.c,
151 * as/mcs51/lkaomf51.c: disabled unused array UsageType
154 * as/z80/z80pst.c: "ABS" is not A_OVR
155 * as/hc08/lkarea.c (newarea): read a_addr,
156 (lnkarea): added codemap array, sort absolute areas to the front,
157 combine all GSINITx/GSFINAL,
158 (find_empty_space, allocate_space): new functions,
159 (lnksect): return next address, handle absolute sections
160 * as/mcs51/lkarea.c (newarea): read a_addr,
161 lnksect2 prototype changed,
162 (lnkarea2): define codemap unsigned, combine all GSINITx/GSFINAL,
163 (find_empty_space, allocate_space): new, factored out of lnksect2,
164 (lnksect2): return next address, handle absolute sections
166 * as/mcs51/lkhead.c (newhead): head is absolute but not overlay
167 * as/hc08/lklibr.c (addfile, fndsym),
168 * as/mcs51/lklibr.c (addfile, buildlibraryindex, fndsym): prevent
169 index out of range and detect both '\' and '/'
170 * device/include/mcs51/c8051f200.h: added _XPAGE, removed bad comment
171 * device/include/stdbool.h: removed SDCC_ds390 from check to pass
172 regression tests (ds390 cannot return bool yet)
173 * doc/sdccman.lyx: changed version number, document changed --no-peep,
174 document critical interrupts on z80, document changed SDCC define
175 * src/asm.c (_asxxxx_mapping): fixed .org directive,
176 (_a390_mapping): added .org directive
177 * src/hc08/gen.c (transferAopAop): made bytemask log to fix warning,
178 (genMultOneByte): fixed warnings
179 * src/hc08/hc08.dsp: lowered warning level to 2 to suppress pedantic
181 * src/pic16/device.c: removed newReg prototype, removed BYTE_IN_LONG
182 * src/pic16/gen.c (pic16_popGetLabel): made parameter key signed,
183 (pic16_genLeftShiftLiteral, genRightShiftLiteral): fixed warnings
184 * src/pic16/gen.h: changed prototype for pic16_popGetLabel
185 * src/pic16/main.c: removed newReg prototype
187 * src/pic16/pcode.h (pic16_emitDB): changed parameter c to int to fix
189 * src/pic16/pic16.dsp: lowered warning level to 2 to suppress pedantic
192 * src/pic16/ralloc.h (newReg): changed type to int and size to unsigned
194 * src/pic/pcode.c (allocInternalRegister): changed parameter optype
195 from short to PIC_OPTYPE
196 * src/pic/pic.dsp: lowered warning level to 2 to suppress pedantic ones
197 * src/pic/ralloc.c (newReg, allocInternalRegister): changed parameter
198 optype from short to PIC_OPTYPE
199 * src/port.h: made int_size unsigned to fix warnings
200 * src/SDCC.y: fixed warning on MSVC
201 * src/SDCCicode.c (getArraySizePtr): return unsigned int
202 * src/SDCCopt.c (convertToFcall): fixed warnings
203 * src/SDCCsymt.h: removed double prototype for genSymName
204 * src/xa51/ralloc.c (allocReg): made size unsigned int, type int and
205 offset int to fix warnings
207 2006-04-22 Borut Razem <borut.razem AT siol.net>
209 * doc/sdccman.lyx, */Makefile, */Makefile.in:
210 references to CVS replaced with Subversion
212 2006-04-21 Borut Razem <borut.razem AT siol.net>
214 * doc/sdccman.lyx, */Makefile, */Makefile.in:
215 references to CVS replaced with Subversion
217 2006-04-19 Borut Razem <borut.razem AT siol.net>
219 * src/version.awk: adapted for svn
220 * /asxxxx/asxhtml/*.gif: set property svn:mime-type to image/gif
221 sim/ucsim/doc/*.gif: set property svn:mime-type to image/gif
222 sim/ucsim/doc/*.jpg: set property svn:mime-type to image/jpeg
223 /binutils-avr/etc/*.vi, *.jin: removed all properties
224 support/scripts/sdcc.ico: set property svn:mime-type to image/x-icon
226 2006-04-19 Borut Razem <borut.razem AT siol.net>
228 * CVS to Subversion migration completed
230 2006-04-18 Borut Razem <borut.razem AT siol.net>
232 * support/scripts/sdcc.nsi: removed unexisting ${DEV_ROOT}\lib\pic\*.o,
233 ${DEV_ROOT}\lib\src\pic\libdev\*.S, ${DEV_ROOT}\lib\src\pic\libdev\*.inc
235 2006-04-17 Borut Razem <borut.razem AT siol.net>
237 * device/include/Makefile.in: added pic/*.inc to the installation
239 2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
241 * support/regression/collate-results.py: fixed output in case of
243 * support/regression/generate-cases.py: fixed splitting of pathnames
245 * as/hc08/lklibr.c (addfile),
246 * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
248 2006-04-11 Raphael Neider <rneider AT web.de>
250 * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
251 * src/pic16/ralloc.c (pic16_allocregWithName): removed debug output
252 * src/pic16/pcode.c (assignValnums): fixed #1460578
254 2006-04-11 Raphael Neider <rneider AT web.de>
256 * device/lib/pic/libdev/*.c,
257 * device/include/pic/*.h: replaced sfr and data with __sfr and __data,
258 fixes #1468739, enables compilation in --std-c99 mode
259 * support/scripts/inc2h.pl: emit __sfr/__data instead of sfr/data
261 2006-04-11 Raphael Neider <rneider AT web.de>
263 * src/pic/device.c (find_device): removed debug output
264 (list_valid_pics): enabled verbose listing of supported devices
265 * device/include/stdbool.h: define bool as char for pic14/16 as well
267 2006-04-07 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
269 * src/SDCC.y: allow using brackets here: "__interrupt (1) __using (1)"
271 2006-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
273 * .version: bumped version to 2.5.6
274 * src/pic/ralloc.c (newReg): MSVC doesn't support __builtin_return_address
276 2006-04-06 Raphael Neider <rneider AT web.de>
278 * .version: bumped version to 2.5.6 (pic14 ABI changed)
279 * src/SDCCmain.c: add -DSDCC_PROCESSOR=<id> for pic14 port
280 * src/pic/glue.c (emitSymbolToFile,pic14_constructAbsMap,
281 pic14emitRegularMap,pic14emitMaps): moved output for absolute symbols to
282 pic14_constructAbsMap
283 (pic14printPublics): declare absolute global symbols as global
284 (pic14createInterruptVect),
285 * src/pic/ralloc.c (IS_CONFIG_ADDRESS): support second config word,
286 (newReg): assume new registers unused, use correct name in
287 hashtable (reg->name instead of name), more debugLog output
288 * src/pic/device.h (PIC_device): added fields for verbose output
289 * src/pic/device.c: moved device definition to pic14devices.txt,
290 added routines for runtime parsing of pic14devices.txt,
291 added support for second config word
292 * src/pic/main.c (_process_pragma): removed #pragma maxram,
293 (_pic14_keywords): no longer accept "bit" and "sbit" keywords
294 (_pic14_initPaths): add search paths with "pic" suffix (not "pic14")
295 (_pic14_parseOptions): moved pCodeInitRegisters here
296 (_pic14_do_link): add "pic$(ARCH).lib" to linker arguments
297 * src/pic/pcode.c (AnalyzeBanking): bail out on unset processor,
298 (pCodeInitRegisters): rewrapped comments, perpared new approach to
299 handling the pseudo stack
300 * device/lib/Makefile.in: ignore failures in objects-pic16,
301 * device/lib/pic/{configure,configure.in,Makefile}: added libdev/
302 * device/lib/pic/NEWS: document new dependency on picXXX.lib
303 * device/lib/pic/Makefile.subdir,
304 * device/lib/pic16/Makefile.subdir: improved clean rules
305 * device/lib/pic/libdev/: NEW, pic14 device libraries
306 * device/lib/pic/libsdcc/_gptr{get,put}{1,2,3,4}.S: use _X not X
307 * device/lib/pic/libsdcc/macros.inc: use _X not X, declare default SFRs
308 * device/include/Makefile.in: create subdir and install pic14 headers
309 * device/include/pic/p16f_common.inc: removed unused declarations
310 * device/include/pic/pic16*.h: added header files for 100+ 14 bit
311 PICs from inc2h.pl v1.6,
312 replaced BIT_AT macros with struct declarations
313 * device/include/pic/pic14devices.txt: definition of supported devices,
314 all above improvements contributed by Zik Saleeba, thanks
315 * support/scripts/inc2h.pl: removed BIT_AT, replaced with structs
316 * support/scripts/sdcc.nsi: also install pic14 device libraries and
319 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
321 * device/include/mcs51/c8051f410.h: added interrupt numbers,
322 * device/include/mcs51/c8051f200.h: old SiLabs mcu completes the list,
323 thanks to Charles Olds
325 2006-04-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
327 * debugger/mcs51/cmd.c (infoRegisters): show return address on stack
329 2006-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
331 * src/SDCCpeeph.c (labelIsReturnOnly): fixed bug 1464657
332 * src/mcs51/gen.c (genJumpTab): fixed bug in medium model
333 * support/regression/bug1464657.c: added, new test
335 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
337 * src/SDCCmain.c (preProcess): implemented RFE 1449908, define SDCC as the
340 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
342 * src/SDCCpeeph.c (initPeepHole): implemented RFE 1460196, when both
343 --no-peep and --peep-file <file> are used don't use default rules but
346 2006-04-05 Maarten Brock <sourceforge.brock AT dse.nl>
348 * src/mcs51/gen.c (genCall): fixed bug 1457608
350 2006-03-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
352 * doc/sdccman.lyx: reverted to version 1.129 of december as my latest
353 changes seem to cause (trigger?) problems with the build system.
355 2006-03-29 Maarten Brock <sourceforge.brock AT dse.nl>
357 * src/SDCCpeeph.c (operandsLiteral): new, added,
358 (callFuncByName): inserted operandsLiteral
359 * src/mcs51/peeph.def: reenabled 132.e, added extra check to 132.x
361 2006-03-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
363 * doc/sdccman.lyx: added paragraph "Use of SDCC in Education"
364 * src/mcs51/peeph.def: disabled rule 132.e fixing bug #1453093
366 2006-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
368 * src/z80/gen.c (genFunction, genEndFunction): fixed bug 1160666,
369 implemented patch 1120823 Thanks to Willy De la Court (normal
370 interrupts need an interrupt number now if they are made critical),
371 and enabled nesting of critical functions though not for gbz80
372 (genCritical, genEndCritical): added functions
373 (genZ80Code): added cases for CRITICAL and ENDCRITICAL
374 * src/z80/mappings.i: added "ei" to all mappings
376 2006-03-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
378 * sim/ucsim/cmd.src/newcmdcl.h: applied patch fixing GCC 4.1 build
379 submitted by the Debian SDCC maintainer Aurelien Jarno:
380 "Credits goes to Martin Michlmayr, who rebuilt the whole Debian
381 archive with gcc 4.1 on mips and wrote the patch"
383 2006-03-16 Raphael Neider <rneider AT web.de>
385 * src/pic16/genarith.c (genAddLit): simplified and fixed case where
386 the left operand is shorter than the result (c* = lit-c* + int),
388 * src/pic16/gen.c (genRightShift): check IS_SYMOP before accessing
391 2006-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
393 * src/.version: increased version number to 2.5.5
394 * src/SDCCmain.c (linkEdit): do not test for PIC16 target since, PIC16
395 linking is done manually in pic16 port's _linkEdit,
396 * src/SDCCsymt.c (compStructSize): for target PIC16 and shell variable
397 PIC16_PACKED_BITFIELDS, compact bitfield structures as much as possible,
398 * src/pic16/gen.c (aopForSym): when direct register name is WREG then
399 allocate asmop as AOP_ACC,
400 (aopForRemat): added parameter 'bool result' in function declaration,
401 (pic16_aopGet): return AOP_ACC when accessing WREG,
402 (pic16_popGetTempReg): minor modification,
403 (pic16_popRegFromIdx): first try with 'pic16_regWithIdx' then with
404 'pic16_allocWithIdx',
405 (genPcall): removed ftype, usage of OP_SYM_TYPE asserted error when
406 calling function in absolute addresses,
407 (genAssign): take into account AOP_ACC asmop,
408 * src/pic16/pcode.c (pic16_newpCodeOpReg): minor modifications,
409 * src/pic16/pcoderegs.c: some debug functions and lines added,
410 * src/pic16/ralloc.c (decodeRegType): added but commented out,
411 * (pic16_typeRegWithIdx): search 'pic16_dynInternalRegs' for given
413 * (pic16_findFreeReg, pic16_findFreeRegNext): allocate new register via
414 call to allocReg, not by manually allocating a new one,
415 (pic16_assignRegisters): now before going through the register
416 allocating functions mark all registers as free. This eliminates some
417 side effects resulting from peephole parser done earlier in the backbone
419 2006-03-13 Maarten Brock <sourceforge.brock AT dse.nl>
421 * src/SDCCicode.c (geniCodeLogic),
422 * src/SDCCast.c (decorateType): applied patch by Bernhard for rfe 1422617
424 2006-03-10 Maarten Brock <sourceforge.brock AT dse.nl>
426 * src/mcs51/gen.c (sameReg): new, checks if two aop regs are the same,
427 (genSend): bugfix, do not allocate and free twice,
428 (shiftRLong): handle partially overlapping aops
429 * support/regression/tests/bitopcse.c: fixed warning redefined idata
431 2006-03-08 Borut Razem <borut.razem AT siol.net>
433 * support/regression/fwk/include/testfwk.h: added defines for xdata, idata
436 2006-03-08 Maarten Brock <sourceforge.brock AT dse.nl>
438 * support/regression/tests/bug1409955.c: new, added
439 * src/mcs51/gen.h: changed asmop.freed:1 to asmop.allocated for tracking
440 * src/mcs51/gen.c (newAsmop): set asmop.allocated to 1,
441 (aopForSym, aopOp): increment asmop.allocated if reused,
442 (freeAsmop): decrement asmop.allocated and check for zero instead of
444 (freeForBranchAsmop): use asmop.allocated instead of asmop.freed,
445 (genNot, genCpl, genUminus, genMinus, genMult, genDiv, genMod, genCmpGt,
446 genCmpLt, genAndOp, genOrOp, genAnd, genOr, genXor, genRRC, genRLC,
447 genGetHbit, genGetAbit, genGetByte, genGetWord, genSwap,
448 genLeftShiftLiteral, genLeftShift, genRightShiftLiteral,
449 genSignedRightShift, genRightShift, genDataPointerGet,
450 genPagedPointerGet, genFarPointerGet, genCodePointerGet,
451 genGenPointerGet, genDataPointerSet, genAssign, genCast): free asmop's
452 in reverse order from allocation,
453 (genPlus, genCmpEq): free asmop's in reverse order from allocation and
454 added swappedLR to keep track
455 * support/regression/fwk/include/testfwk.h: added defines for xdata, idata,
456 pdata & code for GCC, z80, gbz80 & hc08
457 * support/regression/tests/zeropad.c: moved defines to testfwk.h
459 2006-03-08 Raphael Neider <rneider AT web.de>
461 * src/pic16/main.c (_hasNativeMulFor): fixed bug #1444425
463 2006-03-07 Maarten Brock <sourceforge.brock AT dse.nl>
465 * device/include/mcs51/c8051f410.h: new SiLabs mcu
466 * src/ds390/peeph.def: disabled 186.d and 227.a as fix for #1434401
467 * support/regression/tests/array.c: added parenthesis, made arrays unsigned
469 2006-03-06 Borut Razem <borut.razem AT siol.net>
471 * support/regression/ports/pic16/spec.mk: link with libm18f.lib,
472 made the linker quiet
474 2006-03-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
476 * src/pic16/gen.c (genPcall): fixed bug #1443644
477 * src/pic16/device.h (struct pic16_options_t): added 'int CATregs' flag
478 which dumps before the function entry point a data byte which represents
479 the number of the local variables used by the specified function, added
480 'xinst' for initial support for Extended Instruction Support,
481 * src/pic16/gen.c (aopForSym, pic16_aopGet): beautifications,
482 (pic16_testStackOverflow): do not prefix GSTACK_TEST_NAME with
483 port->fun_prefix anymore (may change later),
484 (genFunction, genEndFunction): do not store/restore local registers for
485 _main (this should take care the --main-return command line option in
487 (genOr): removed some legacy pic-port instructions,
488 * src/pic16/genarith.c (genAddLit): re-enabled old code because
489 performing operations with SFR's causes data to be written more than
490 once to each SFR. Perhaps SFRs should be handled in special cases...
491 * src/pic16/glue.c: macros BIG_ENDIAN and BYTE_IN_LONG are moved to
493 * src/pic16/main.c (_process_pragma): stack bound checking did not take
494 into account for stack starting position,
495 (struct OPTIONS pic16_optionsTable): added command line argument
496 --extended or -y for Extended Instruction Support,
497 * src/pic16/ralloc.c (pic16_decodeOp): added case for FUNCTION,
498 (deassignLRs): *** perhaps the most important change, old 'for' code
499 (commented out for reference), didn't account for some registers which
500 were left marked 'not free' after a pointer operation. The change
501 reduces register usage a lot in some cases
503 2006-03-04 Borut Razem <borut.razem AT siol.net>
505 * support/regression/ports/hc08/spec.mk: remove *.asm in traget
507 * support/regression/tests/bug-524697.c: decreased array size for
508 mcs51 to fit into the internal RAM
509 * support/regression/Makefile.in: a little bit more verbose
511 2006-03-03 Borut Razem <borut.razem AT siol.net>
513 * support/regression/fwk/lib/testfwk.c,
514 support/regression/fwk/include/testfwk.h: introduced function
515 _prints(), nonrecursive _printn(), call _initEmu() from main()
516 * support/regression/ports/gbz80/support.asm,
517 support/regression/ports/ucz80/support.asm,
518 support/regression/ports/z80/support.asm,
519 support/regression/ports/ds390/support.c,
520 support/regression/ports/hc08/support.c,
521 support/regression/ports/host/support.c,
522 support/regression/ports/mcs51/support.c,
523 support/regression/ports/xa51/support.c: added empty _initEmu()
525 * support/regression/ports/pic16/gpsim.cmd,
526 support/regression/ports/pic16/spec.mk,
527 support/regression/ports/pic16/support.c,
528 support/regression/Makefile.in: added pic16 regression test
530 2006-03-01 Raphael Neider <rneider AT web.de>
532 * src/pic16/gen.c (genPcall,pic16_derefPtr,genGenPointerGet,
533 genConstPointerGet): use safe way of generating MOVFF to cover
534 literals as well as registers, fixes bug #1440527
535 * src/pic16/glue.c (pic16_printIvalBitFields): prevent NULL pointer
537 (pic16_printIvalUnion,pic16_isUnion): NEW, handle initialized unions
538 more correctly, fixes bug #1232186
539 (pic16_printIval): use pic16_printIvalUnion() for initialized unions
540 * src/pic16/main.c (_pic16_linkEdit): reorder linker arguments to make
541 gplink guess the correct processor in more cases, applied patch
542 from Till Riedel attached to and fixing bug #1436552
544 2006-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
546 * support/regression/tests/array.c: added, contains check for #1434401
547 * src/mcs51/peeph.def: disabled 186.d as temporary fix for #1434401
549 2006-02-16 Maarten Brock <sourceforge.brock AT dse.nl>
551 * device/include/mcs51/at89s8253.h: new, thanks to Krzysztof Polomka
552 * device/include/mcs51/at89S8252.h: fixed, thanks to Krzysztof Polomka
553 * device/include/mcs51/c8051f326.h,
554 * device/include/mcs51/c8051f340.h: new SiLabs mcu's
555 * device/include/mcs51/c8051f000.h,
556 * device/include/mcs51/c8051f018.h,
557 * device/include/mcs51/c8051f020.h: used () with __at, renamed IDLE,STOP to
558 PCON_IDLE,PCON_STOP and added sfr16 definitions
560 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
562 * src/mcs51/gen.c (genPlus, genMinus, genMult, genGetAbit, genGetByte,
563 genGetWord): fixed bug 1409955
565 2006-02-14 Maarten Brock <sourceforge.brock AT dse.nl>
567 * device/include/hc08/mc68hc908gp32.h,
568 * device/include/hc08/mc68hc908jb8.h: removed AWUL, added PTA6 & PTA7
570 2006-02-13 Maarten Brock <sourceforge.brock AT dse.nl>
572 * src/SDCCast.c (constExprValue): return NULL if not a value
573 * src/SDCCglue.c (printIvalArray): fixed bug 1225568
574 * src/hc08/gen.c(genUnpackBits, genUnpackBitsImmed): fixed bug 1019480
575 * support/regression/tests/bitfields.c: enabled signed bitfield for all
577 2006-02-13 Borut Razem <borut.razem AT siol.net>
579 * src/regression/ptrarg.c: added, fails due to bug #1430967
580 * src/regression/Makefile: ptrarg.c added, ...
582 2006-02-12 Maarten Brock <sourceforge.brock AT dse.nl>
584 * src/z80/gen.c (genUnpackBits): fixed bug 1019480
585 * support/regression/tests/bitfields.c: enabled signed bitfield for z80
587 2006-02-11 Borut Razem <borut.razem AT siol.net>
589 * src/SDCCmain.c: Added "sdcc: Calling linker..." if --verbose,
590 print "Processor: xxx" message to stdout only if --verbose
592 2006-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
594 * src/SDCCglue.c (printIvalStruct): fixed bug 1426356 union initializer
595 * support/regression/tests/bug1426356.c: added
596 * support/regression/tests/bitfields.c: removed 2 tests
598 2006-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
600 * device/include/mcs51/at89c51snd1c.h: updated comments, see patch 1428901
601 * device/include/mcs51/c8051f330.h,
602 * device/include/mcs51/c8051f350.h: used () with __at, renamed IDLE,STOP to
603 PCON_IDLE,PCON_STOP and added sfr16 definitions
604 * device/lib/_divsint.c,
605 * device/lib/_divuint.c,
606 * device/lib/_divulong.c,
607 * device/lib/_divulong.c: renamed a,b to x,y to avoid confusion, fixed
608 register bank bug for small stackauto
610 2006-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
612 * support/regression/fwk/lib/timeout.c: include <stdlib.h> for exit()
614 2006-02-08 Maarten Brock <sourceforge.brock AT dse.nl>
616 * support/regression/ports/mcs51-xstack-auto/spec.mk: forgot -I(...)/mcs51
617 * all.dsp: corrected several bin paths
618 * device/include/mcs51/c8051f120.h,
619 * device/include/mcs51/c8051f300.h,
620 * device/include/mcs51/c8051f310.h: used () with __at and renamed IDLE,STOP
621 to PCON_IDLE,PCON_STOP
622 * device/include/mcs51/c8051f320.h: see above, also added sfr16 definitions
623 * device/lib/printf_large.c (output_float): fixed bug 1388703
624 * support/regression/tests/bug1057979.c: added test for bug 1388703
626 2006-02-08 Raphael Neider <rneider AT web.de>
628 * src/pic/pcode.c (pciTRIS): fixed typo,
629 (BuildFlow,LinkFlow_pCode): added (disabled) debug output,
630 (LinkFlow): fixed handling of flows that end in a call,
631 (ReuseReg): perform safety check earlier
632 * src/pic/pcoderegs.c (pCodeRegMapLiveRangesInFlow): fixed
633 to work with flows at the beginning of a pBlock,
634 fixes #1426557 (Symbol not previously defined),
635 (pic14_ReMapLiveRanges): NEW, destroy and rebuild register
637 (RemoveUnusedRegisters): update register usage info
638 * src/pic/ralloc.c (newReg): prevent duplicate registers from being
639 created, reuse existing ones instead
640 * src/pic/gen.c (genPcall): fixed #1424719
642 2006-02-07 Bernhard Held <bernhard AT bernhardheld.de>
647 * link/z80/aslink.h: fixed build on current cygwin:
648 replaced getline() by lk_getline()
650 2006-02-01 Borut Razem <borut.razem AT siol.net>
652 * src/regression/add.c, src/regression/add2.c, src/regression/add3.c,
653 src/regression/add4.c, src/regression/and1.c, src/regression/and2.c,
654 src/regression/arrays.c, src/regression/b.c, src/regression/bank1.c,
655 src/regression/bool1.c, src/regression/bool2.c,
656 src/regression/bool3.c, src/regression/call1.c,
657 src/regression/compare.c, src/regression/compare10.c,
658 src/regression/compare2.c, src/regression/compare3.c,
659 src/regression/compare4.c, src/regression/compare5.c,
660 src/regression/compare6.c, src/regression/compare7.c,
661 src/regression/compare8.c, src/regression/compare9.c,
662 src/regression/configword.c, src/regression/for.c,
663 src/regression/inline.c, src/regression/mult1.c,
664 src/regression/nestfor.c, src/regression/or1.c,
665 src/regression/pointer1.c, src/regression/ptrfunc.c,
666 src/regression/rotate1.c, src/regression/rotate2.c,
667 src/regression/rotate3.c, src/regression/rotate4.c,
668 src/regression/rotate5.c, src/regression/rotate6.c,
669 src/regression/rotate7.c, src/regression/string1.c,
670 src/regression/struct1.c, src/regression/sub.c,
671 src/regression/sub2.c, src/regression/switch1.c,
672 src/regression/while.c, src/regression/xor.c,
673 src/regression/create_stc, src/regression/simulate,
674 src/regression/rt.sh, src/regression/Makefile: reenabled Scott's PIC14
676 * src/regression/gpsim_assert.h: added
678 2006-01-28 Bernhard Held <bernhard AT bernhardheld.de>
680 * src/ds390/gen.c (unsaveRegisters): fixed literal function pointer
681 ((void (code *) (void)) 0) ();
698 * as/z80/asmain.c: fixed build on current cygwin:
699 replaced getline() by as_getline()
701 2006-01-27 Bernhard Held <bernhard AT bernhardheld.de>
703 * src/SDCC.y: fixed bug #716242, exchanged pointer and function
704 declarator in the symbol chain
706 * src/SDCCsymt.c (processFuncPtrArgs): added, removes "(void)"
707 parameter list for function pointers
708 * src/SDCCast.c (decorateType): added call of processFuncPtrArgs()
709 * support/regression/tests/bug-716242.c: added
711 2006-01-20 Bernhard Held <bernhard AT bernhardheld.de>
713 * src/SDCCicode.c (geniCodeAdd, geniCodeArray): use char for array
715 * src/SDCCast.c (getLeftResultType): 255 fits in char, not 256
717 2006-01-18 Bernhard Held <bernhard AT bernhardheld.de>
719 * src/SDCCast.c (backPatchLabels): fixed bug #1408066: made it
720 inifinitely recurseable, added static
721 * support/regression/tests/bug-1408066.c: added
723 2006-01-17 Bernhard Held <bernhard AT bernhardheld.de>
726 * src/SDCCicode.c (newiTempPreheaderLabel, newiTempLoopHeaderLabel):
727 renamed, added possibility to create "postLoopLbl"-labels
728 * src/SDCCBBlock.c (iCodeBreakDown): renamed newiTempPreheaderLabel to
729 newiTempLoopHeaderLabel
730 * src/SDCCloop.c (newInduction, newRegion, backEdges, insertIntoLoop,
731 isNotInBlocks, addToExitsMarkDepth, createLoop, dominatedBy,
732 addDefInExprs, assignmentsToSym, isOperandInvariant, pointerAssigned,
733 hasNonPtrUse, loopInvariants, addressTaken, findInduction,
734 findDefInRegion, mergeRegions, ifMerged, mergeInnerLoops): made static,
735 (pinduction, pregion, hasIncomingDefs, findLoopEndSeq): disabled,
736 (basicInduction): fixed bug #136564, made static,
737 (loopInduction): changed parameter of basicInduction, made static,
738 (addPostLoopBlock): added
739 * src/SDCCloop.h: removed backEdges, pregion, pinduction,
740 loopOptimizations, addressTaken, findDefInRegion, hasIncomingDefs,
742 * support/regression/tests/bug-136564.c: added
743 * support/regression/ports/mcs51-xstack-auto/spec.mk: added
744 --std-sdcc99 to LIBSDCCFLAGS
746 2006-01-16 Bernhard Held <bernhard AT bernhardheld.de>
748 * src/SDCCicode.c (geniCodeIfx): fix bug 1406131: always false
750 * support/regression/tests/bug-1406131.c: added
752 2005-12-31 Bernhard Held <bernhard AT bernhardheld.de>
754 * src/SDCCast.c (decorateType): fix promotion of unary minus
755 * src/SDCCsymt.c (computeType): beautified
756 * src/SDCCval.c (cheapestVal): beautified, old non-Ansi version removed,
757 (valUnaryPM, valComplement): fix sign and promotion,
758 (valNot): ANSI: result type is int (SDCC: unsigned char)
759 * support/regression/tests/uminus.c: speedup by removing superflous
761 * support/regression/tests/onebyte.c: added promotion and signedness
762 tests for unary minus
763 * support/regressions/tests/bug-477927.c: disable warning about
764 uninitialized variables
765 * support/regression/tests/not.c: added
767 2005-12-28 Bernhard Held <bernhard AT bernhardheld.de>
769 * device/lib/Makefile.in: added --std-sdcc99 to CFLAGS
770 * src/mcs51/gen.c (gen51Code): show final register usage after
771 fillGaps in asm with --i-code-in-asm
772 * src/SDCClrange.c (sequenceiCode, setLiveFrom, setLiveTo,
773 markLiveRanges, markAlive, findNextUseSym, findNextUse, unvisitBlocks,
774 incUsed, rliveClear, adjustIChain): made static,
775 (setFromRange): excluded because it's unused,
776 (findPrevUseSym, markWholeLoop): added,
777 (findPrevUse): rewritten; fixes bug 895992; now a complete search
778 through all branches of predecessors enables sdcc to emit the warning
779 W_LOCAL_NOINIT, marking of outermost loop was incomplete,
780 (rlivePoint): made static, added parameter emitWarnings which is only
781 true during the first run out of two,
782 (findRecursiveSucc, findRecursivePred): removed,
783 (computeLiveRanges): made static, added parameter emitWarnings,
784 (dumpIcRlive): added for debugging only
785 * src/SDCClrange.h: added boolean parameter to computeLiveRanges(),
786 removed prototype of setFromRange()
787 * src/SDCCopt.c (eBBlockFromiCode): added new parameter emitWarnings
788 in call of computeLiveRanges()
789 * support/regression/tests/bug-895992.c: added
790 * support/regression/tests/bug-971834.c: added
791 * support/valdiag/tests/bug-895992.c: added
792 * support/valdiag/tests/bug-971834.c: added
794 2005-12-18 Raphael Neider <rneider AT web.de>
796 * src/pic16/gen.c: added IS_DIRECT macro for "direct" operands,
797 (genUnpackBits): improved code for direct operands,
798 (genPackBits): improved code for literal assignment to bitfields
799 and for direct destination operands (no FSR indirection),
800 prevented redundant AND, fixes #1362800,
801 (AccLsh): added parameter to disable masking of the result
802 * src/pic16/pcode.c (pic16_safepCodeUnlink): fixed to work with
803 skip instructions with side-effects (like incfsz),
804 (pic16_pCodeIsAlive): suppress verbose output unless pcode_verbose,
805 * src/pic16/pcoderegs.c (RemoveRegsFromSet): removed annoying warning
806 * device/lib/pic16/Makefile.common.in: added --asm=@GPASM@ to CC,
809 2005-12-11 Bernhard Held <bernhard AT bernhardheld.de>
811 * src/SDCCicode.c (geniCodeAssign): fixed bug 11369874, don't use
812 volatile variables as spill location
814 2005-12-10 Bernhard Held <bernhard AT bernhardheld.de>
816 * src/SDCCcse.c (findCheaperOp): fixed bug 1376320, copy signedness to
818 * support/regression/tests/bug-1376320.c: added
820 2005-12-08 Raphael Neider <rneider AT web.de>
822 * src/pic/device.c: renamed is_shared to pic14_is_shared
823 * src/pic/gen.c (genIfx): re-enabled handling of sbits
824 * src/pic/glue.c (emitSymbolToFile): added workaround for sbits,
825 (is_valid_identifier): added for above workaround
827 2005-12-07 Maarten Brock <sourceforge.brock AT dse.nl>
829 * device/lib/Makefile.in: fixed to enable port-specific-objects
830 * device/lib/ds390/i2c390.c (BitOutI2C): optimized by making bout unsigned
831 char, thanks Hubert Sack
832 * doc/sdccman.lyx: documented --xstack-loc,
833 elaborated a bit more on interrupts and pitfalls,
834 removed "setjmp/longjmp unsupported",
835 documented some unsupported C99 features
836 * src/SDCCmain.c (linkEdit): adapted default lib path for --stack-auto
837 * src/SDCCpeeph.c (readRules): inserted patch 1367130 for finding missing
838 if, thanks Hubert Sack
839 * src/mcs51/gen.c (genEndFunction): enabled "pop psw" for regbank 0 isr
840 * support/regression/Makefile.in: test-mcs51-stack-auto no longer needs to
842 * support/regression/get_ticks.py: new, get cpu cycles and code size, so
843 regression tests can report resource usage (rfe 700441)
844 * support/regression/collate-results.py: report resource usage
845 * support/regression/ports/ds390/spec.mk,
846 * support/regression/ports/hc08/spec.mk,
847 * support/regression/ports/mcs51/spec.mk,
848 * support/regression/ports/ucz80/spec.mk: run sim output through get_ticks
849 * support/regression/ports/ds390/uCsim.cmd,
850 * support/regression/ports/hc08/uCsim.cmd,
851 * support/regression/ports/mcs51/uCsim.cmd,
852 * support/regression/ports/ucz80/uCsim.cmd: inserted "state" to report time
853 * support/regression/ports/mcs51-stack-auto/spec.mk: no need to build the
854 library, use the default one
855 * support/regression/ports/mcs51-xstack-auto/spec.mk: inserted rules for
858 2005-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
860 * config.dsp: added dependency on .version and configure_vc.awk
861 * device/include/setjmp.h: updated for --stack-auto and --xstack
862 * device/include/mcs51/at89c51snd1c.h: corrected line endings
863 * device/include/mcs51/XC866.h: added, thanks Llewellyn van Zyl
864 * device/lib/_setjmp.c: updated for --stack-auto and --xstack
865 * device/lib/libsdcc.lib: added _setjmp
866 * src/SDCCast.c (createIvalCharPtr): fixed warnings,
867 (decorateType): fixed bug 1372851,
868 (optimizeGetHbit): fixed warning
869 * src/SDCCglue.c (printIvalChar, printIvalArray): adapted for flexible
871 * support/regression/tests/bug1057979.c: added test for bug 1358192
872 * support/regression/tests/setjmp.c: added, test for setjmp/longjmp
874 2005-12-03 Borut Razem <borut.razem AT siol.net>
876 * support/scripts/sdcc.nsi: added /SOLID option to "SetCompressor lzma"
877 command since the NSIS was upgraded to version 2.11 on CF x86-linux2
879 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
881 * src/SDCCast.c (createIvalStruct, createIvalArray, createIvalPtr,
882 createIval): implement symbol independant "flexible array member",
883 (createIvalCharPtr): implemented flexible array initialisation with a
885 * src/SDCCsymt.c (copyStruct): removed,
886 (getSize): fixed misleading comment,
887 (getAllocSize): removed, the additional allocation size is now in
888 sym->flexArrayLength,
889 (checkStructFlexArray): new, syntax checks for flexible array members,
890 (compStructSize): added syntax checks for "flexible array members"
891 (copyStruct): removed,
892 (copyLinkChain): removed inefficient fix for bug 770487
893 * src/SDCCglue.c (emitRegularMap): getAllocSize has been removed
894 * src/SDCCsymt.h: added structdef.b_flexArrayMember and
895 symbol->flexArrayLength
897 * src/SDCCerr.h: added W_INVALID_FLEXARRAY, W_C89_NO_FLEXARRAY,
898 E_FLEXARRAY_NOTATEND and E_FLEXARRAY_INEMPTYSTRCT
899 * support/regression/tests/structflexarray.c: added
900 * support/valdiag/tests/structflexiblearray.c: added
902 2005-11-29 Bernhard Held <bernhard AT bernhardheld.de>
904 * src/SDCCast.c (decorateType): fixed bug 1368489
905 * support/Util/SDCCerr.c,
906 * support/Util/SDCCerr.h: added warning W_CMP_SU_CHAR
908 2005-11-28 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
910 * device/include/mcs51/at89c51snd1c.h: added file submitted by
911 Weston T. Schmidt <schmidtw AT users.sourceforge.net>, patch #1368001
913 2005-11-27 Borut Razem <borut.razem AT siol.net>
915 * support/cpp2/cppinit.c, support/cpp2/cpplib.h, support/cpp2/mkdeps.c,
916 support/cpp2/mkdeps.h: added command line option
917 -obj-ext=<extension> to SDCPP to define object file externion, used
918 for generation of make dependencies (-M)
919 * src/SDCCmain.c: pass -obj-ext=<extension> to SDCPP
921 2005-11-26 Borut Razem <borut.razem AT siol.net>
923 * support/scripts/sdcc.nsi: added small-stack-auto libraries,
924 added missing device/lib/mcs51/crt*.asm, pic and pic16 sources,
925 added pic and pic16 libraries
927 2005-11-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
929 * device/include/float.h: Corrected typo in prototype of __fsgt
931 2005-11-25 Borut Razem <borut.razem AT siol.net>
933 * sdcc/device/lib/Makefile.in, sdcc/device/lib/incl.mk:
934 added creation of model-mcs51-stack-auto libraries
936 2005-11-24 Bernhard Held <bernhard AT bernhardheld.de>
938 * src/SDCCsymt.c (copyLinkChain): fixed bug 770487, copy structdef
940 * src/SDCCast.c (createIvalArray): removed obsolete comment
942 2005-11-24 Borut Razem <borut.razem AT siol.net>
944 * sdcc/device/lib/Makefile.in: remove all unnecessary files, 2nd try...,
945 added missing device/lib/mcs51/crt*.asm sources
947 2005-11-23 Bernhard Held <bernhard AT bernhardheld.de>
949 * src/SDCCast.c (createIvalCharPtr): fixed bug 1348271
951 2005-11-22 Maarten Brock <sourceforge.brock AT dse.nl>
953 * device/lib/_fs2schar.c,
954 * device/lib/_fs2sint.c,
955 * device/lib/_fs2slong.c: optimized inline asm
957 2005-11-21 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
959 * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
960 Better handling of floats between -1.0 and 0.0.
962 2005-11-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
964 * src/mcs51/peeph.def: added missing "if"s as noted by Hubert Sack.
965 (the missing "if"s prohibited removal of redundant labels)
967 2005-11-19 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
969 * device/lib/_fs2slong.c, device/lib/_fs2sint.c, device/lib/_fs2char.c:
970 Properly convert floats between -1.0 and 0.0 to long, int, and char
971 types (max integer value of negative floats tends to zero).
972 * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
973 Removed changes made so to work properly with floats between
974 -1.0 and 0.0, as the problem is fixed in _fs2slong.c, _fs2sint.c,
977 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
979 * src/SDCCcse.c (ReplaceOpWithCheaperOp): minor fix for debugging only
980 * src/mcs51/gen.c (genUnpackBits): better code and a fix,
981 (genCast) cosmetic change
982 * src/ds390/gen.c (genUnpackBits, ): ported from mcs51
983 * src/ds390/ralloc.c (packRegsForAssign): ported fix for bitfields
985 * support/regression/tests/bitfields (testSignedBitfields): added
987 2005-11-18 Borut Razem <borut.razem AT siol.net>
989 * sdcc/device/lib/Makefile.in: remove all unnecessary files
990 * device/lib/pic/Makefile.rules, device/lib/pic16/Makefile.subdir:
991 introduced SILENT option to make building of pic16 libraries less
993 2005-11-18 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
995 * device/lib/modff.c, device/lib/ceilf.c, device/lib/floorf.c:
996 Now they work properly with floats between -1.0 and 0.0
997 * device/lib/printf_large.c: Removed temporary patch for bug 1358192
999 2005-11-18 Maarten Brock <sourceforge.brock AT dse.nl>
1001 * src/SDCCicode.c (printOperand): added missing else
1003 2005-11-18 Bernhard Held <bernhard AT bernhardheld.de>
1005 * src/SDCCsymt.c (computeType): fixed bug 1358192: added missing else,
1006 reformatted for better readability
1007 * src/mcs51/gen.c (genUnpackBits): initial, incomplete support for
1010 2005-11-17 Borut Razem <borut.razem AT siol.net>
1012 * device/lib/pic16/Makefile.rules, device/lib/pic16/Makefile.subdir:
1013 introduced SILENT option to make building of pic16 libraries less
1014 verbose - used for nightly snapshot build
1015 * doc/sdccman.lyx: documented that SDCDB and ucSim are currently not
1016 available on Win32 platforms.
1017 * sdcc/device/lib/Makefile.in: added library sources for mcs51, small,
1018 medium, large, pic and pic16
1020 2005-11-16 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1022 * device/lib/printf_large.c: Temporary patch for bug 1358192:
1023 printf("%f"...) sets fraction to zero.
1025 2005-11-16 Raphael Neider <rneider AT web.de>
1027 * src/pic/pcode.c (LinkFlow): handle empty flows correctly,
1029 * src/pic/gen.c (genIfx): implemented for CARRY bit
1030 * src/pic16/gen.c (genAssign,genCast): fixed assigning/casting
1031 to generic pointers, fixes #1357332,
1032 (pic16_movLit2f): NEW,
1033 (pic16_storeForReturn,genDataPointerSet): use pic16_movLit2f
1035 2005-11-14 Maarten Brock <sourceforge.brock AT dse.nl>
1037 * src/SDCCmain.c (parseCmdLine): fixed bug 1356800, thanks rsudjian
1039 2005-11-11 Raphael Neider <rneider AT web.de>
1041 * src/pic/gen.c: handle FPOINTERS like POINTERS everywhere
1042 * src/pic16/gen.c (pic16_derefPtr): now works for non-pointers as well,
1043 compute pointer's type from operand,
1044 (genUnpackBits,genPackBits): handle FPOINTERS correctly, re-indented,
1045 improved single bit reads, fixes bug #1353379
1047 2005-11-09 Borut Razem <borut.razem AT siol.net>
1049 * support/scripts/sdcc.nsi: added lib/pic to the package
1051 2005-11-08 Maarten Brock <sourceforge.brock AT dse.nl>
1053 * src/SDCCval.c (valUnaryPM): fixed bug 1350699
1055 2005-11-06 Maarten Brock <sourceforge.brock AT dse.nl>
1057 * support/regression/tests/bug1348008.c: added
1058 * src/mcs51/gen.c (saveRBank, unsaveRBank): fixed bug 1348008
1059 * support/regression/tests/bug1337835.c: updated comment
1061 2005-11-06 Borut Razem <borut.razem AT siol.net>
1063 * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1064 sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1065 sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1066 sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1067 sim/ucsim/cmd.src/set.cc, sim/ucsim/cmd.src/show.cc:
1068 dynamic construction of cl_error_class and derivates - 2.nd try
1070 2005-11-05 Borut Razem <borut.razem AT siol.net>
1072 * sim/ucsim/sim.src/error.cc: fixed uninitialized class member variable
1073 bug, which caused Bus Errors on sparc solaris
1075 2005-11-04 Borut Razem <borut.razem AT siol.net>
1077 * sim/ucsim/error.cc, sim/ucsim/errorcl.h,
1078 sim/ucsim/sim.src/stack.cc, sim/ucsim/sim.src/stackcl.h,
1079 sim/ucsim/sim.src/uc.cc, sim/ucsim/sim.src/uccl.h,
1080 sim/ucsim/sim.src/mem.cc, sim/ucsim/sim.src/memcl.h,
1081 sim/ucsim/cmd.src/cmdconf.cc: dynamic construction of cl_error_class
1082 and derivates to resolve the initialization problem on OSX
1084 2005-11-02 Borut Razem <borut.razem AT siol.net>
1086 * sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1087 corrected typo - #include <winsock2.h>
1089 2005-11-02 Maarten Brock <sourceforge.brock AT dse.nl>
1091 * src/asm.c (printILine): always close tmpFile, thanks Beau E. Cox,
1092 (_asxxxx_mapping): added org directive for future enhancements
1094 2005-11-01 Borut Razem <borut.razem AT siol.net>
1096 * sim/ucsim/app.cc, sim/ucsim/cmd.src/cmdutil.cc, sim/ucsim/cmd.src/newcmd.cc:
1097 enabled sockets on WIN32
1098 * sim/ucsim/cmd.src/newcmd.cc: fixed bug with uninitialized variables
1100 2005-10-31 Borut Razem <borut.razem AT siol.net>
1102 * support/regression/generate-cases.py: escape backslashes in {testcase}:
1103 WIN32 backslash path delimiters should be escaped when used in C strings
1104 * support/regression/tests/bitfields.c: exclude failing assertions for
1105 __CYGWIN32__ and __MINGW32__ hosts
1107 2005-10-30 Borut Razem <borut.razem AT siol.net>
1109 * src/SDCCutil.c: corrected double comparison typo
1111 2005-10-30 Maarten Brock <sourceforge.brock AT dse.nl>
1113 * device/lib/medium/Makefile: added for new memory model medium
1114 * device/include/asm/mcs51/features.h: updated for medium/pdata
1115 * device/include/mcs51/c8051f120.h: added sfr16/sfr32 definitions,
1116 added Multiply & Accumulate sbit's and MAC0_PAGE define
1117 * device/include/mcs51/c8051f300.h: added sfr16 definitions
1118 * device/include/mcs51/c8051f310.h: added sfr16 definitions
1119 * device/lib/_mullong.c: update for medium model
1120 * device/lib/incl.mk: added medium model
1121 * doc/sdccman.lyx: documented medium model
1122 * src/SDCCast.c (isBitAndPow2): simplified using updated powof2
1123 * src/SDCCicode.c (geniCodeMultiply, geniCodeDivision): use updated powof2
1124 * src/SDCCmain.c (optionsTable, linkEdit): enabled medium model
1125 * src/SDCCmem.c (allocIntoSeg): set iaccess for pdata symbols,
1126 (allocParms): set SCLS and OCLS to pdata for medium model
1127 * src/SDCCsymt.c (processFuncArgs): use default_local_map and set iaccess
1129 (powof2): return <0 if not power of 2
1130 * src/avr/gen.c (genBitWise): use updated powof2
1131 * src/mcs51/gen.c (genMinusDec): use acc if necessary,
1132 (shiftR2Left2Result): small optimization in setup, save acc when storing,
1133 (shiftLLeftOrResult): use B if necessary
1134 * src/mcs51/main.c (_mcs51_finaliseOptions, mcs51_port): added medium model
1135 * src/mcs51/peeph.def: renamed 226 to 226.b, added 226.a
1136 * src/pic/main.c (_pic14_do_link): made void parameter list explicit
1137 * support/regression/Makefile.in: added test-mcs51-medium
1138 * support/regression/ports/mcs51-medium/spec.mk: added to test medium model
1140 2005-10-28 Bernhard Held <bernhard AT bernhardheld.de>
1142 * src/SDCCsymt.c (compStructSize): make bitfields without (un)signed
1144 * device/lib/time.c (mktime): fixed bug 1334315
1146 2005-10-28 Raphael Neider <rneider AT web.de>
1148 * device/include/pic/p16f_common.inc: added common declarations
1149 * src/pic/ralloc.c (initStack): moved regs *r to block start for Alpha
1151 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1153 * src/mcs51/gen.c (getTempRegs): return 0 if not enough registers found,
1154 (aopPutUsesAcc): added to predict accumulator use,
1155 (assignResultValue): save acc if necessary,
1156 (genMinusDec): store result if indirectly addressed,
1157 (genDivOneByte): save acc if necessary,
1158 (movLeft2Result): bugfix if left already in acc,
1159 (genAnd, genOr, genXor, shiftL2Left2Result, shiftR2Left2Result): pay more
1160 attention to accumulator use (esp. pdata),
1161 (genReceive): receive pdata correctly
1162 * src/SDCCicode.c (isOperandInPagedSpace): added to detect pdata operands
1163 * src/SDCCicode.h: added isOperandInPagedSpace prototype
1165 2005-10-27 Raphael Neider <rneider AT web.de>
1167 * doc/sdccman.lyx: corrected version (should be 2.5.4 not 2.5.5)
1169 2005-10-27 Raphael Neider <rneider AT web.de>
1171 * .version: changed version to 2.5.4
1172 * doc/sdccman.lyx: changed version to 2.5.4, added some remarks to PIC14
1173 * device/lib/pic/libsdcc/{_mulint.c,_mullong.c}: use unsigned literals,
1174 (_divschar.c,divuchar.c,_mulchar.c,_modschar.c,_moduchar): NEW,
1175 arithmetics support routines
1176 * device/lib/pic/Makefile.rules: have assembler sources preprocessed
1177 * device/lib/Makefile.in: also create installdir for pic
1179 * src/SDCCopt.c (cnvToFcall): mark support routines `extern' for
1181 * src/pic/device.c (dump_sfr): rewritten to delegate register
1182 placement to the linker (use `extern sym' rather than sym EQU addr),
1183 (validAddress): fixed to check last specified address
1184 * src/pic/gen.c (aopForSym): added code to deal with array (useless?),
1185 (popGetLit): truncate literal value to 8 bit,
1186 (popGet): moved assert to more appropriate place
1187 (popGetExternal): create pCode operand from and mark the according
1188 symbol as being `extern'
1189 (popGetAddr): added sanity check on immediate's offset, provide
1190 GPOINTER tag on demand
1191 (aopPut): fixed for immediates,
1192 (mov2w_op): move operand's address or contents to WREG (depending on
1193 operand type), safer variant of mov2w,
1194 (movwf,call_libraryfunc): NEW, handy abbreviations,
1195 (get_argument_pcop,get_return_val_pcop,pass_argument,
1196 get_returnvalue): interface for accessing function parameters and
1198 (assignResultValuei,genRet): use new parameter/return value interface
1199 (pic14_getDataSize): back to old version handling generic pointers,
1200 (pic14_toBoolean,genNot,genCpl,genCmpEq,genOrOp): heavily rewritten,
1201 provided implementation and/or fixed old one,
1202 (genMultOneByte,genDivOneByte,genModOneByte): implemented as library
1203 calls, removed legacy 8051 reference code
1204 (AccLsh,AccRsh): rewritten and fixed to deal with signed operands
1205 (loadSignToC): NEW, move the operands sign bit to CARRY,
1206 (genGenericShift): NEW, replaces genLeftShift, genRightShift and
1207 genRightShiftSigned, accepts negative shift counts,
1208 (setup_fsr): load FSR and adjust IRP (indirect memory access),
1209 (emitPtrByteGet,emitPtrByteSet): rewritten, now works with
1210 generic pointers, __data pointers and __code pointers,
1211 (genUnpackBits,genPackBits): rewritten to work with generic pointers
1212 and signed bitfields, limit bitfields to 8 bit,
1213 (genDataPointerGet): fixed number of bytes read,
1214 (genGenPointerGet,genConstPointerGet): fixed bitfield access,
1215 (genPointerGet,genPointerSet): fixed handling of __code pointers,
1216 pointers to constant data are no longer assumed to point to __code
1217 space, removed invalid pointer types,
1218 (bitpatternFromVal): retrieve the PICs representation of an integer
1220 (genDataPointerSet): fixed assigning to po_immediate operands,
1221 (genGenPointerSet): implemented as library call,
1222 (genIfx): fixed incorrect condition,
1223 (genAddrOf): limit generic pointers' addresses to 2 bytes,
1224 provide GPOINTER tag according to destination's storage class,
1225 (genCast): added code to handle casting to generic pointers, added
1226 sign-/zero extension of the result
1227 (aop_isLitLike,op_isLitLike): fixed handling of immediates
1228 * src/pic/gen.h: added macros to access IRP bit in STATUS register
1229 * src/pic/genarith.c (genAddLit): use min(result's,left's) size, sign
1231 * src/pic/glue.c (is_shared_address,is_shared): check whether a given
1232 address/register resides in the shared banks
1233 (emitSymbolToFile): improved to handle global and `pinned' symbols,
1234 put all variables into separate sections (have the linker arrange
1236 (picglue): put init code and interrupt handlers in separate sections
1237 * src/pic/main.c: added port specific options table, modified to PORT
1238 structure to make GPOINTERs 3 byte, added pic14_options
1239 (_pic14_do_link): private linking routine (update paths to libraries,
1240 add libsdcc.lib by default)
1241 * src/pic/main.h: declare pic14_options
1242 * src/pic/pcode.c: fixed instructions i/o relations,
1243 (RegCond): reverted to correct version,
1244 (newpCodeOpLit): truncate literals to 8 bit,
1245 (genericPrint): added debug output,
1246 (getRegFromInstruction): fixed for various operand types, simplified
1247 (BuildFlow): fixed broken handling of isntructions with labels
1248 (LinkFlow): start at last instruction in flow (skip trailing comments),
1249 pass the flow on to the next instruction after CALL
1250 (pCodeReplace): NEW, replace a pCode and move meta data to the new one
1251 (insertPCodeInstruction): fixed inserting after a skip instruction,
1252 (DoBankSelect): fixed for labeled instructions
1253 (OptimizepBlock): honor --nopeep switch
1254 (AnalyzeFlow,ReuseReg): prevent crash on source files with no function
1255 * src/pic/pcodepeep.c (pCodePeepMatchRule): prevent NULL pointer accesses
1256 * src/pic/pcoderegs.c (regIsLocal): NEW, check visibility of a register
1257 (pCodeOptime2pCodes): allow disabling this optimization via
1258 --no-pcode-opt due seldomly occuring bugs, fixed some conditions
1259 but is still buggy), started implementation of a dataflow based
1260 pCode optimization (CSE + dead code elimination)
1261 (pCodeRegMapLiveRangesInFlow): removed bogus inCond
1262 * src/pic/ralloc.c (initStack): renamed stack registers to STK%d, the new
1263 names are independant of the stack location and therefore portable across
1266 2005-10-27 Maarten Brock <sourceforge.brock AT dse.nl>
1268 * src/mcs51/ralloc.c (bitType): added to detect bit variables,
1269 (selectSpil): fixed bug 1337835 by not spilling bit variables
1270 * support/regression/tests/bug1337835.c: added test for this bug
1271 * src/mcs51/peeph.def: restart after rule 3.c,
1272 addded rules 263.x to optimize loading constants
1274 2005-10-26 Raphael Neider <rneider AT web.de>
1276 * src/SDCCsymt.c (compStructSize): allow signed bitfields for PIC ports
1277 * src/pic16/gen.c (genUnpackBits): support signed bitfields,
1278 (genAssign): emit warning when casting literals to generic pointer
1279 type, also applies when taking the address of a fixed variable,
1280 (genCast): improved casting to generic pointers
1281 * src/pic16/glue.c (pic16emitStaticSeg): fixed(?) handling of fixed
1282 extern variables, added verbose error message
1283 * device/include/pic16/{string.h,errno.h}: added #pragma library c
1285 2005-10-26 Bernhard Held <bernhard AT bernhardheld.de>
1287 * src/mcs51/gen.c (genMinus): fixed bug 1270906: reverse subtraction,
1288 carry must be complemented too
1289 * src/mcs51/peeph.def: addded rule 262 to remove double cpl c, which
1290 could be emitted by genMinus
1291 * src/SDCCval.c (constVal): fixed bug 1305065
1293 2005-10-25 Bernhard Held <bernhard AT bernhardheld.de>
1295 * src/SDCCast.c (addCast): added promotion for bit variables
1296 (decorateType): emit W_COMPLEMENT before the problem vanishes behind
1297 promotion casts + optimisation
1298 (optimizeGetWord): fix warning 'i' might be used uninitialized
1299 * src/mcs51/gen.c (genCpl): removed W_COMPLEMENT
1300 * src/ds390/gen.c (genCpl): removed W_COMPLEMENT
1302 2005-10-24 Bernhard Held <bernhard AT bernhardheld.de>
1304 * src/SDCCicode.c (ast2iCode): reverted to 1.224 because of regression:
1305 all chars are promoted to int; promotion should be handled in SDCCast.c
1307 2005-10-15 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1309 * device/lib/_strcmp.c: Fixed bug 1326457
1311 2005-10-11 Raphael Neider <rneider AT web.de>
1313 * device/lib/pic16/libio/i2c.ignore: added 1320, fixes broken builds
1314 * device/lib/pic16/libdev/pic18f1320.c: added 1320's device library
1316 2005-10-05 Maarten Brock <sourceforge.brock AT dse.nl>
1318 * src/SDCC.y (AT): fixed bug with sfr32 addresses when built with GCC
1319 * support/regression/tests/sfr16.c: added test for the sfr32 bug
1321 2005-10-04 Raphael Neider <rneider AT web.de>
1323 * device/include/pic16/pic18fregs.h, src/pic16/devices.inc,
1324 device/lib/pic16/pics.all: added pic18f1320
1325 * src/pic16/pcode.c (mnem2key): fixed prototype's argument mismatch
1327 2005-09-30 Raphael Neider <rneider AT web.de>
1329 * src/pic16/device.c (Pics16[]): moved device descriptions to devices.inc
1330 * src/pic16/devices.inc: NEW, provides device descriptions
1331 * src/pic16/gen.c (genInline): fixed handling of ';'-comments
1333 2005-09-26 Maarten Brock <sourceforge.brock AT dse.nl>
1335 * src/SDCCicode.c (operandOperation): added GETABIT, GETBYTE, GETWORD and
1338 2005-09-25 Maarten Brock <sourceforge.brock AT dse.nl>
1340 * doc/sdccman.lyx: updated Highest Order Bit documentation,
1341 documented Any Order Bit, Higher Order Byte and Higher Order Word
1342 * src/SDCC.y: added tokens GETABIT, GETBYTE, GETWORD
1343 * src/SDCCast.c (optimizeGetHbit): updated to also accept bool=expr&(1<<n),
1344 (optimizeGetAbit): new, to get any bit, not only the high bit,
1345 (optimizeGetByte): new, to get a byte from a (long) int: expr>>(8*n),
1346 (optimizeGetWord): new, to get a word from a long int: expr>>(8*n),
1347 (isConformingBody): also check GETABIT, GETBYTE, GETWORD,
1348 (decorateType): '&': also try GETABIT, GETBYTE, GETWORD optimization,
1349 RIGHT_OP: also try GETBYTE, GETWORD optimization,
1350 GETABIT, GETBYTE, GETWORD: decorate them,
1351 (isShiftRightLitVal, isBitAndPowOf2): new helper functions,
1352 (ast_print): added GETABIT, GETBYTE, GETWORD
1353 * src/SDCCcse.c (isSignedOp): added GETABIT, GETBYTE, GETWORD
1354 * src/SDCCicode.c (codeTable): added GETABIT, GETBYTE, GETWORD,
1355 (geniCodeBinary): new generic binary icode,
1356 (ast2iCode): added GETABIT, GETBYTE, GETWORD
1357 * src/port.h: updated comment for PORT.hasExtBitOp
1358 * src/mcs51/gen.c (genGetAbit): new, to get any single bit,
1359 (genGetByte): new, to get a single byte,
1360 (genGetWord): new, to get a word from a long,
1361 (gen51Code): added GETABIT, GETBYTE, GETWORD
1362 * src/mcs51/main.c (hasExtBitOp): added GETABIT, GETBYTE, GETWORD
1364 2005-09-23 Raphael Neider <rneider AT web.de>
1366 * configure.in, configure: have device/lib/pic configured
1367 * device/lib/Makefile.in: added model-pic14
1368 * device/lib/clean.mk: added pic/ to clean rule
1369 * device/lib/pic: added rudimentary pic14 library providing support
1370 functions for multiplication/division/generic pointer access
1371 * src/SDCCopt.c (convilong): mark support functions as extern
1372 for pic14 port as well
1373 * src/pic/gen.c (genMult): added assertions,
1374 (genpic14Code): emit warning on unhandled iCodes
1375 * src/pic/main.c (_hasNativeMulFor): return true only for 8x8 bit
1376 * src/pic/pcode.c (pCodeOpCopy),
1377 * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed handling of various
1378 pCodeOpReg-subtypes (PO_{STATUS,INTCON,PCL,PCLATH,PCLATU,BSR,
1379 SFR_REGISTER}), made safe for future extensions
1380 * src/pic16/pcode.c (pic16_safepCodeUnlink): allow for removal of
1381 instructions even if preceeded by SKIP instructions (also remove
1382 them); removed unused code
1383 * src/pic16/pcode.h: added arg2 to pCodeOpLit to match pCodeOpLit2,
1384 prevents leaving parts of the structure uninitialized after copying
1386 2005-09-22 Maarten Brock <sourceforge.brock AT dse.nl>
1388 * src/mcs51/gen.c (genMinus): fix for undetected bug introduced 3 months
1390 * support/regression/tests/addsub.c: added test for the bug
1392 2005-09-21 Raphael Neider <rneider AT web.de>
1394 * device/include/pic16/pic18f1220.h,
1395 device/lib/pic16/libdev/pic18f1220.c: added ECCPAS sfr and bitfield
1396 * device/lib/pic16/Makefile.rules: added missing opening paren
1397 * src/pic16/gen.c (pic16_genNot,pic16_genCpl): removed as these
1398 are provided in genutils.c,
1399 (genUminusFloat,genUminus,genCmpEq): added asserts on different
1400 operand/result sizes,
1401 (genCmp): assert on NULL pointers first, then check deref'ed values
1402 * src/pic16/genutils.c (pic16_genCpl): fixed for different operand/
1405 2005-09-18 Raphael Neider <rneider AT web.de>
1407 * src/pic16/gen.c (genFarPointerGet,genFarPointerSet): removed
1408 as these are now unused,
1409 (genPointerGet,genPointerSet): handle FPOINTERs like POINTERs
1410 * src/pic16/pcode.c (pic16_symIsSpecial): assume REG_TMPs to be
1411 local, avoids uninitialized pointer dereference on r->name
1412 * src/pic16/ralloc.c (newReg): fixed indentation
1414 2005-09-13 Maarten Brock <sourceforge.brock AT dse.nl>
1416 * src/SDCCval.c (constVal): fixed bug 730366
1417 * support/Util/SDCCerr.c,
1418 * support/Util/SDCCerr.h: added warning W_INVALID_INT_CONST
1420 2005-09-10 Maarten Brock <sourceforge.brock AT dse.nl>
1422 * as/mcs51/lkmem.c (summary2): fixed report for absolute areas (bug 1210220)
1424 2005-09-09 Maarten Brock <sourceforge.brock AT dse.nl>
1426 * src/mcs51/peeph.def (241.x): fixed bug when comparing generic pointers
1428 2005-09-08 Maarten Brock <sourceforge.brock AT dse.nl>
1430 * as/hc08/lkaomf51.c (OutputName): made name unsigned char,
1431 (hex2dec): made hex_digit unsigned char, removed ascii dependance
1432 * as/mcs51/lkaomf51.c (OutputName): made name unsigned char,
1433 (hex2dec): made hex_digit unsigned char, removed ascii dependance
1434 * as/mcs51/lkarea.c (lnkarea2): sort absolute areas to the front
1435 * packihx/packihx.c (hexDigit): made c unsigned char
1436 * as/mcs51/lklibr.c (fndsym),
1437 * link/z80/lkgb.c (gb),
1438 * link/z80/lklibr.c (fndsym),
1439 * link/z80/lkrloc.c (relr),
1440 * sim/ucsim/libltdl/ltdl.c (load_deplibs, try_dlopen),
1441 * src/SDCC.lex (checkCurrFile, process_pragma),
1442 * src/SDCCglue.c (spacesToUnderscores),
1443 * src/SDCCmain.c (setParseWithComma, processFile),
1444 * src/asm.c (tvsprintf, printCLine),
1445 * src/avr/gen.c (emitcode, aopPut),
1446 * src/ds390/gen.c (emitcode),
1447 * src/hc08/gen.c (emitcode, emitinline),
1448 * src/mcs51/gen.c (emitcode, genInline),
1449 * src/pic/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1451 * src/pic/ralloc.c (debugLog),
1452 * src/pic16/pcodepeep.c (cvt_extract_destination, cvt_extract_status,
1454 * src/pic16/ralloc.c (debugLog),
1455 * src/z80/main.c (_process_pragma):
1456 made all ctype.h function calls safe
1457 * src/SDCCopt.c: include math.h for fabs
1458 * src/SDCCpeeph.c: added macros ISCHARDIGIT, ISCHARSPACE and ISCHARALNUM
1459 and used them throughout the code to make ctype.h function calls safe
1460 * src/ds390/main.c (asmLineNodeFromLineNode),
1461 * src/mcs51/main.c (asmLineNodeFromLineNode): made p unsigned char*
1462 * src/pic/gen.c (DEBUGpic14_emitcode, pic14_emitcode): made lbp
1464 * src/pic/pcode.c (mnem2key): made mnem unsigned char*,
1465 (newpCodeAsmDir): made ctype.h function calls safe
1466 * src/pic16/gen.c (pic16_emitpcomment, DEBUGpic16_emitcode,
1467 pic16_emitcode): made lbp unsigned char*
1468 * src/pic16/pcode.c (mnem2key): made mnem unsigned char*,
1469 (pic16_newpCodeAsmDir): made ctype.h function calls safe
1470 * src/xa51/gen.c (emitcode),
1471 * src/z80/gen.c (_emit2): made lbp unsigned char*
1472 * support/Util/MySystem.c (split_command): made cmd_line and p unsigned
1475 2005-09-05 Raphael Neider <rneider AT web.de>
1477 * src/pic16/ralloc.c (pic16_allocDirReg): use device specific
1478 access bank splitpoint
1480 2005-09-05 Raphael Neider <rneider AT web.de>
1482 * device/lib/pic16/libc/Makefile: added (missing) string to SUBDIRS
1484 2005-09-03 Maarten Brock <sourceforge.brock AT dse.nl>
1486 * .version: changed to version 2.5.3
1487 * doc/sdccman.lyx: changed version to 2.5.3,
1488 documented --codeseg and --constseg and pragma codeseg and constseg,
1489 documented bit parameters (reentrant) and bit returning
1490 * src/SDCCicode.c (geniCodeReceive): fixed (possible) bug generating
1491 currFunc->recvSize, but is this ok for all ports?
1492 (ast2iCode): result of ~ on unsigned char must be cast to int for
1494 * src/SDCCmem.c (allocGlobal, allocLocal): don't put bit returning
1495 function pointers in bit space
1496 * src/SDCCsymt.c (checkSClass): allow bit returning function pointers,
1497 (processFuncArgs): call port.reg_parm() with reentrancy info
1505 * src/z80/main.c: port.reg_parm prototype extended with
1506 "bool reentrant" parameter
1507 * src/mcs51/main.c (_mcs51_regparm): use parameter reentrant instead of
1508 options.stackAuto for allocating bit register parameters
1509 * src/mcs51/gen.c (genNot): optimized complementing direct bit,
1510 (genSend): set BitBankUsed if it is,
1511 (selectRegBank): factored out of genCall for use in genPcall,
1512 (genCall): removed redundant dtype assignmen, use selectRegBank,
1513 (genPcall): handle returning in Carry properly, save in F0 if needed,
1514 (genReceive): handle bit register parameters
1515 * src/mcs51/ralloc.c (updateRegUsage): update BitBankUsed along the way,
1516 (mcs51_assignRegisters): enable bit registers for all reentrant
1517 functions and don't set BitBankUsed unconditionally
1518 * src/mcs51/peeph.def (177.d): fixed bug if %2==%3
1519 * support/regression/tests/bitvars.c: enable tests for SDCC_STACK_AUTO
1520 * support/regression/tests/funptrs.c: added tests for BOOL and for return
1522 2005-08-27 Borut Razem <borut.razem AT siol.net>
1524 * device/lib/Makefile.in: cp on sparc-solaris (SunOS) and on
1525 ppc-osx (Darwin) does not support -u option. It seems that it is
1526 supported only on Linux - GNU cp
1528 2005-08-25 Borut Razem <borut.razem AT siol.net>
1530 * sim/ucsim/gui.src/serio.src/Makefile.in,
1531 sim/ucsim/s51.src/Makefile.in, sim/ucsim/avr.src/Makefile.in,
1532 sim/ucsim/z80.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1533 sim/ucsim/xa.src/Makefile.in: install -s changed to 2 steps:
1534 install and strip, since the strip at /usr/ccs/bin should be used
1537 2005-08-24 Borut Razem <borut.razem AT siol.net>
1539 * clean.mk, device/lib/clean.mk: find on sparc-solaris does not support -maxdepth option
1541 2005-08-23 Bernhard Held <bernhard AT bernhardheld.de>
1543 * src/SDCCopt.c (convertToFcall): fixed modulus with divisors 1 and
1546 2005-08-23 Maarten Brock <sourceforge.brock AT dse.nl>
1548 * as/mcs51/aslink.h: completed lkrloc.c prototypes
1549 * as/mcs51/lkmain.c (link_main): fixed warning
1550 * device/include/stdbool.h: ds390 has no advanced bit support yet
1551 * src/SDCC.y: use SPEC_SHORT and renamed _signed to b_signed
1552 * src/SDCCsymt.c: use SPEC_SHORT and renamed _signed to b_signed
1553 * src/SDCCsymt.h (struct specifier): renamed _xxx bitfields to b_xxx
1554 and updated their macros
1555 * src/SDCCval.c (constVal): updated comment for renamed b_long
1557 2005-08-22 Maarten Brock <sourceforge.brock AT dse.nl>
1559 * as/mcs51/asdata.c: changed ctype['['] to BINOP
1560 * as/mcs51/asexpr.c (expr): added case '[' for bit access in bdata,
1561 (term): abused bit 15 of s_addr to indicate bit-addressable bytes,
1562 (oprio): set priority for '['
1563 * as/mcs51/aslink.h: added define R_BIT, and prototypes for adb_bit
1565 * as/mcs51/asm.h: added defines R_BIT and S_BIT
1566 * as/mcs51/lkarea.c (lnksect2): use T for seg BIT_BANK and overlay it
1567 * as/mcs51/lkdata.c: changed ctype['['] to BINOP
1568 * as/mcs51/lkmain.c (Areas51): rel2 contains 12 (=C) areas now,
1569 added overlayable BIT_BANK area
1570 * as/mcs51/lkmem.c (summary): add BIT_BANK to BSEG_BYTES in the report,
1571 (summary2): explain 'T' in legenda
1572 * as/mcs51/lkrloc.c: replaced old K&R style,
1573 (relr): added R_BIT processing,
1574 (errmsg): added "Bit-addressable relocation error",
1575 (adb_bit): added for converting from byte- to bit-addressable space,
1576 (adb_24_bit): added for converting from byte- to bit-addressable space
1577 * device/include/stdbool.h: changed BOOL to __bit for mcs51 as it can be
1578 used in reentrant functions now even as return value
1579 * device/lib/_gptrput.c (_gptrput): removed obsolete code
1580 * src/SDCCast.c (resultTypePropagate): also propagate AND_OP and OR_OP,
1581 (decorateType): case '!', GETHBIT, AND_OP, OR_OP: result in bool or char
1582 * src/SDCCglobl.h: added indicator BitBankUsed
1583 * src/SDCCglue.c (glue): emit area BIT_BANK with byte 'bits' and equ's for
1584 the bit registers b0-b7
1585 * src/SDCCicode.c (operandFromSymbol): removed IS_BITVAR check,
1586 (geniCodeCast): fixed bug 1263853,
1587 (geniCodeLogicAndOr): put result in bool or char,
1588 (geniCodeReceive): added parameter func for accessing the return type,
1589 (geniCodeFunctionBody): pass func to geniCodeReceive
1590 * src/SDCCmain.c: added indicator BitBankUsed
1591 * src/SDCCmem.c (allocLocal): explicitly set sclass for V_BIT
1592 * src/SDCCsymt.c (newBoolLink): added for creating a bool/bit,
1593 (checkSClass): don't put automatic bool/bit on stack,
1594 (checkFunction): removed check on function cannot return bit
1595 * src/SDCCsymt.h: added newBoolLink prototype
1596 * src/mcs51/gen.c (rb1regs): added bit registers,
1597 (movc): created for assigning to carry,
1598 (pushReg, popReg): created for pushing registers,
1599 (sameRegs): check both AOP_REG and AOP_CRY types,
1600 (aopOp): handle bit registers,
1601 (aopPut): optimization no self-assign,
1602 (saveRegisters): push reg->base (bits) only once for bit registers,
1604 (unsaveRegisters): pop reg->base only once and use popReg,
1605 (assignResultValue): added parameter func and return in carry for bits,
1606 (genIpush): optimization no reload in A if not changed,
1607 (genSend): bit parameters in reentrant functions are passed in bit
1608 registers by first assigning to bits in B, then save registers and
1610 (genCall): handle returning in Carry properly, save it in F0 if needed,
1611 (genPcall): updated assignResultValue call, this is not safe yet for bit
1612 returning function !!!
1613 (genFunction): don't generate equ's for bit registers and use pushReg,
1614 (genEndFunction): take care of bit returning functions and use popReg,
1615 (genRet): return bit in Carry,
1616 (genIfx): optimize bit registers and other directly addressable bits,
1617 (genReceive): updated assignResultValue call
1618 * src/mcs51/main.c (_mcs51_reset_regparm): added regBitParmFlg,
1619 (_mcs51_regparm): allow passing of upto 8 bit parameters in bit
1620 registers when using stack-auto
1621 * src/mcs51/ralloc.c (_G): added allBitregs,
1622 (regs8051): added the bit registers,
1623 (createStackSpil): use macro IS_BIT,
1624 (getRegBit): added to allocate a bit register, else spill,
1625 (getRegBitNoSpil): added to allocate a bit register, else a gpr,
1626 (updateRegUsage): factored out to ease stepping while debugging,
1627 (serialRegAssign): use updateRegUsage, only spill bits if necessary,
1628 also allocate bit registers,
1629 (fillGaps): handle bit registers,
1630 (findAllBitregs): added to create bit vector with all bit registers,
1631 (mcs51_allBitregs): returns this bit vector,
1632 (mcs51_assignRegisters): when using stack-auto use bit registers for
1633 passing parameters and creating local variables
1634 * src/mcs51/ralloc.h: added B0_IDX..B7_IDX and prototype mcs51_allBitregs
1636 2005-08-22 Borut Razem <borut.razem AT siol.net>
1638 * device/lib/Makefile.in: replaced find option -or with -o
1639 to make it run on solaris
1641 2005-08-22 Raphael Neider <rneider AT web.de>
1643 * src/pic16/gen.c (pic16_loadFromReturn): added check for AOP_PCODE,
1644 fixes #1265442 (crash on Solaris)
1646 2005-08-20 Borut Razem <borut.razem AT siol.net>
1648 * configure, configure.in: added tests for libsocket and libnsl libraries,
1649 requred by sdcdb on sparc-solaris; generate support/regression/Makefile
1650 from support/regression/Makefile.in
1651 * support/regression/Makefile.in: added
1652 * device/lib/pic16/Makefile.common.in: force make to use bash shell
1653 * sim/ucsim/libtool: regenerated on sparc-solaris
1654 * sim/ucsim/avr.src/Makefile.in, sim/ucsim/hc08.src/Makefile.in,
1655 sim/ucsim/s51.src/Makefile.in, sim/ucsim/xa.src/Makefile.in,
1656 sim/ucsim/z80.src/Makefile.in: removed GNU ld specific linker options
1657 -Wl,--start-group and -Wl,--end-group to enable ucsim compilation on
1658 sparc-solaris, which doesn't use GNU ld linker
1659 * device/lib/Makefile.in: cp on sparc-solaris (SunOS) does not support -u option
1660 * as/Makefile: find on sparc-solaris does not support -maxdepth option
1662 2005-08-19 Maarten Brock <sourceforge.brock AT dse.nl>
1664 * src/mcs51/peeph.def: updated comments
1666 2005-08-16 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1668 * device/lib/_gptrget.c,
1669 * device/lib/_gptrput.c: slightly shorter
1670 * doc/sdccman.lyx: incremented version
1671 * src/mcs51/peeph.def: moved peephole comments to the line of first
1672 change to better keep line correlation, reanimated 186.e
1673 * src/mcs51/peeph.def: renamed similar peepholes by using suffixes
1675 2005-08-16 Slade Rich <slade_rich AT users.sourceforge.net>
1677 * src/pic/pcode.c : Pasted ".line" assembly directives patch from
1678 David Saxton with quotes around file name.
1680 2005-08-15 Borut Razem <borut.razem AT siol.net>
1682 * support/regression/tests/bitfields.c, support/regression/tests/bitvars.c,
1683 support/regression/tests/bitwise.c, support/regression/tests/literalop.c,
1684 support/regression/tests/rotate.c, support/regression/tests/zeropad.c:
1685 make tests run on x86_64 platform
1687 2005-08-13 Raphael Neider <rneider AT web.de>
1689 * device/lib/pic16/Makefile.subdir: weakened clean-intermediate rule
1690 as it might be executed DURING a build (parallel make is wonderful)
1692 2005-08-13 Raphael Neider <rneider AT web.de>
1694 * device/lib/Makefile.in (port-specific-objects-pic16):
1695 revert to cp $(PORT)/bin/*.* $(PORTDIR)
1696 * device/lib/pic16/Makefile: added .PHONY targets, removed builddir
1698 * device/lib/pic16/Makefile.rules: build subdirs before creating
1699 the library, removed builddir rule, create $(builddir) early in
1700 recurse rule, use empty recurse rule for leaf directories
1701 * device/lib/pic16/Makefile.subdir: added phony targets, ignore
1702 mkdir errors (race condition), removed duplicate suffix "hex"
1704 * device/lib/pic16/libdev/Makefile: recursive make via + and $(MAKE)
1705 * device/lib/pic16/libio/Makefile: create sub-make's builddir early,
1706 prevents mkdir -p from aborting on Alpha
1708 2005-08-12 Raphael Neider <rneider AT web.de>
1710 * src/pic16/glue.c (pic16_print(G)PointerType): do not flush
1711 db-statements in order to allow for arrays of pointers in code
1712 sections to be placed without interspersed 0-padding, fixes
1714 * (emitStatistics): fixed division by zero for pic18f1220
1715 * src/pic16/pcode.c: buffer (up to) 12 DB directives to allow for
1716 unpadded writing of 8-bit, 16-bit, 24-bit and 32-bit values
1717 * (pic16_emitDS): respect DB_ITEMS_PER_LINE
1718 * (pic16_pCodeConstString): keep track of already emitted string
1719 literals to prevent "duplicate definitions of symbol _str_NR"
1720 * src/pic16/ralloc.c (pic16_allocRegByName): removed not so helpful
1722 * device/lib/Makefile.in: ignore failing PIC16 library builds
1723 * device/lib/pic16/Makefile: do not build if gputils are missing
1724 * device/lib/pic16/Makefile.common.in: do not enforce MAKEFLAGS=-s
1726 2005-08-10 Raphael Neider <rneider AT web.de>
1728 * device/lib/Makefile.in: fixed copying pic16 libraries (broken by
1731 2005-08-10 Raphael Neider <rneider AT web.de>
1733 * src/*.c, src/pic16/{gen.c,glue.c,main.c}: applied Vangelis
1734 Rokas' patch to add the new fixed point type "__fixed16x16"
1735 * device/lib/pic16/libsdcc/fixed16x16: added Vangelis' support
1736 functions for __fixed16x16 arithmetics
1737 * device/lib/pic16: reimplemented the build system to support
1738 a separate build directory, better handling of libio (create
1739 the library in a separate subdir for each architecture) and
1740 easier configuration (centralized in Makefile.common)
1742 2005-08-07 Raphael Neider <rneider AT web.de>
1744 * src/pic16/gen.c (genrshTwo): fixed sign extension
1745 * src/pic16/device.c: added pic18f2320, 4220 and 4320
1746 * device/include/pic16/pic18f2220.h: changed some bit definitions,
1748 * device/include/pic16/pic18f4220.h: NEW, header for
1749 pic18f4220 and pic18f4320
1750 * device/include/pic16/pic18fregs.h: added new devices,
1751 embraced Nop(), ClrWdt(), Sleep() and Reset() with do {} while(0)
1752 * device/include/pic16/signal.h: resolved name clashes
1753 on bit definitions, added DEF_HANDLER2(sig1,sig2,handler)
1754 to also allow testing for interrupt enable bits, added
1755 comments on how to use the macros
1756 * device/lib/pic16/libdev/pic18f2220.c: added T0CONbits
1757 * device/lib/pic16/libdev/pic18f{2320,4220,4320}.c: NEW,
1758 register definitions for the devices
1759 * device/lib/pic16/pics.all: added new devices
1760 * device/lib/pic16/libc/stdlib/calloc.c: fixed zeroing
1762 * device/lib/pic16/libc/stdlib/memfree: do not count
1763 the block header as free memory
1764 * device/lib/pic16/libc/stdlib/memmisc.c (_initHeap):
1765 simplified and added missing end-of-blocklist-marker
1766 (reported by Peter Onion, fixes #1252814)
1767 * (_mergeHeapBlock): fixed loop condition
1768 * device/lib/pic16/libc/stdlib/realloc.c: return NULL for
1769 len==0, restructured code
1770 * device/lib/pic16/libc/stdlib/{malloc,memfreemax}.c: cleaned
1771 up a bit, reduced bitfield accesses, prevent endless loops
1772 in case of heap corruption
1773 * device/lib/pic16/libc/stdlib/x_ftoa.c: disabled
1774 "unreferenced arguments/must return a value" warnings
1775 * device/lib/pic16/libio/usart/ubaud.c (usart_baud):
1776 replaced BAUDREG with SPBRG
1777 * device/lib/pic16/libsdcc/lregs/{lrrest.c,lrst.c},
1778 device/lib/pic16/debug/gstack/gstack.c: replaced
1779 _naked, _asm, _endasm with __naked, __asm, __endasm
1781 2005-08-05 Raphael Neider <rneider AT web.de>
1783 * src/pic16/gen.c (pic16_aopGet): fixed handling of offsets in
1784 AOP_PCODE operands, fixes multibyte union-bitfield-accesses
1786 2005-08-05 Borut Razem <borut.razem AT siol.net>
1788 * device/lib/Makefile.in: added missing ';'
1789 * configure: removed ^M characters
1791 2005-08-04 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1793 * device/include/mcs51/at89c51ed2.h, device/include/mcs51/p89v51rd2.h,
1794 device/include/mcs51/at89s53.h: changed to GNU Lesser General Public
1797 2005-08-04 Borut Razem <borut.razem AT siol.net>
1799 * configure.in: pic16 libraries build 2nd try - enable running
1800 configure in device/lib/pic16
1801 * configure: regenerated from configure.in
1802 * device/lib/Makefile.in: create $(PORT)/bin directory
1804 2005-08-03 Raphael Neider <rneider AT web.de>
1806 * src/pic16/gen.c (pic16_derefPtr): NEW, single place
1807 to get/set values via pointers
1808 * (genUnpackBits,genPackBits): changed detection of
1809 ptr->bitfield vs. sym.bitfield, fixed access via generic
1810 pointers, removed dead (wrong) code for multibyte bitfields
1811 * (genNearPointerGet, genGenPointerGet): removed useless code,
1812 fixed bitfield detection, fixes #1250594
1813 * (genNearPointerSet): removed useless code
1814 * src/pic16/gen.h: renamed pic16_emitpcode to pic16_emitpcode_real
1815 and introduced macro pic16_emitpcode that conditionally emits
1816 the origin of the following pCode (useful for debugging SDCC)
1817 * src/pic16/pcode.c: changed (and disabled) some debug outputs
1818 * (createDefmap): fixed handling of LFSR for --optimize-df
1820 2005-08-02 Borut Razem <borut.razem AT siol.net>
1822 * device/lib/Makefile.in: pic16 libraries build enabled since
1823 gputils-0.13.2 are now localy installed at sourceforge's compile farm
1825 2005-08-02 Raphael Neider <rneider AT web.de>
1827 * src/pic16/gen.c (genPackBits): removed deprecated warning
1828 * (genGenPointerSet): fixed bitfield detection
1830 2005-08-02 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1832 * device/include/mcs51/msm8xc154s.h: Removed PT2 definition, now in 8052.h.
1834 2005-07-31 Raphael Neider <rneider AT web.de>
1836 * device/lib/pic16/libdev/pic18f458.c,
1837 device/include/pic16/pic18f458.h: added missing T0CONbits
1839 2005-07-29 Maarten Brock <sourceforge.brock AT dse.nl>
1841 * device/include/mcs51/msm8xc154s.h: added, thanks to Matthias Arndt
1843 2005-07-28 Maarten Brock <sourceforge.brock AT dse.nl>
1845 * src/mcs51/gen.c (operandsEqu): fixed bug 1246687
1847 2005-07-23 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
1849 * device/include/mcs51/at89c51ed2.h: added.
1851 2005-07-23 Raphael Neider <rneider AT web.de>
1853 * src/pic/gen.h: added emitpcode macro for debugging
1854 * src/pic/gen.c (emitpcode): renamed to emitpcode_real
1855 and replace by macro adding debug information on demand
1856 * (genNot): fixed to C semantics (!0 = 1; !x = 0 iff x != 0)
1857 * (gencjne): tried to fix; replaced with correct (slower) code
1858 * (gen{Unp,P}ackBits): fixed single bit access
1859 * src/pic/pcode.c (AnalyzepCode): fixed DFPRINTF argument
1860 * src/pic/pcodepeep.c (pCodeSearchCondition): fixed finding
1861 previous instruction
1862 * src/pic/pcoderegs.c (regIsSpecial): NEW, check whether a
1863 register has to be handled with care (forbidding movement
1864 of assignments/uses, removing assignments completely, ...)
1865 * (pCodeOptime2pCodes): make use of regIsSpecial
1866 * added lots of debugging output (commented out)
1867 * src/pic/rallloc.c (deassignLRs): prevent operand registers
1868 from being reused as result UNLESS it is known to work
1870 2005-07-23 Maarten Brock <sourceforge.brock AT dse.nl>
1872 * support/Util/dbuf.h: include <stddef.h> for size_t
1873 * .version: changed to version 2.5.2
1875 2005-07-23 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1877 * src/SDCCloop.c (loopInvariants): fixed bug #1234048
1879 2005-07-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1881 * src/hc08/gen.c (genMinus): fixed bug #1241835,
1882 (genModOneByte): removed needless psha/pula
1884 2005-07-22 Raphael Neider <rneider AT web.de>
1886 * src/SDCCmain.c (linkEdit): initialized linkerScriptFileName,
1887 have PIC14 handled like PIC16, fixes broken pic14 linker calls
1888 * src/pic/gen.c (resolveIfx): do not "invent" labels
1889 * (genSkipc): changed to positive logic
1890 * (genSkipCond): removed as no longer needed
1891 * (pic14_mov2w_regOrLit,genCmp): NEW, replacement for buggy version,
1893 * (genLeftShift): check operands are in different registers
1894 * src/pic/genarith.c (genPlus): replaced INCF with ADDLW as
1895 INCF does not update CARRY...
1896 * src/pic/main.c: fixed _linkCmd
1897 * src/pic/pcode.c (unlinkpCode): added inactive code
1898 * src/pic/ralloc.c (deassignLRs): keep arguments to shift operations
1899 alive (do not assign result and operand overlapping registers)
1901 2005-07-22 Raphael Neider <rneider AT web.de>
1903 * src/pic/device.c (dump_sfr): replaced register declaration with
1904 call to emitSymbolToFile() to avoid duplicate symbols
1905 * (assignRelocatableRegisters): do not declare external symbols
1906 * src/pic/ralloc.c (allocNewDirReg): fixed to get size of arrays
1907 right (take size of type, not etype)
1908 * (allocDirReg): fixed call to allocNewDirReg() to pass OP_SYM_TYPE
1909 * (writeUsedRegs): also dump dynDirectRegs (e.g. local variables)
1910 * (packRegsForAccUse): disabled assignment of WREG as
1911 the result reg to prevent occurence of just fixed #1235003,
1913 * src/pic/glue.c (emitSymbolToFile): NEW, central place to declare
1914 symbols (avoids duplicate symbols in .asm file)
1915 * (pic14emitRegularMap): use emitSymbolToFile()
1916 * src/pic/gen.c (aopOp): fixed spillLocation handling
1917 * (gen{Unp,P}ackBits): fixed acquiring bit-operands
1918 * (genDataPointerSet): removed unneccessary variables/output
1920 2005-07-22 Maarten Brock <sourceforge.brock AT dse.nl>
1922 * as/mcs51/lkarea.c: enlarged codemap for banked memory
1923 * device/lib/mcs51/crtbank.asm: added # to 0x0F
1925 2005-07-21 Raphael Neider <rneider AT web.de>
1927 * src/pic/gen.c (aopOp): do not generate AOP_ACC operands as pic14
1928 architecture cannot handle them efficiently, fixes bug #1235003
1929 * src/pic16/device.c (pic16_dump_{u,i}section,pic16_dump_int_registers):
1930 check for empty sets before using them (fixes bug #1232190)
1932 2005-07-19 Maarten Brock <sourceforge.brock AT dse.nl>
1934 * as/mcs51/lkarea.c (lnkarea, lnkarea2): improved BSEG size calculation,
1935 (lnksect2): generate warnings for memory overlap
1936 * src/SDCC.lex (doPragma, process_pragma): added pragma's codeseg and
1937 constseg to set the name of these segments so you can instruct the linker
1938 to place them in banks
1939 * src/SDCCast.c (decorateType): use new macro IS_FUNCPTR()
1940 * src/SDCCglobl.h: added MODEL_HUGE to enum,
1941 added code_seg and const_seg to options
1942 * src/SDCCglue.c (emitMaps): use options.const_seg,
1943 (createInterruptVect): put interrupt vectors in segment HOME,
1944 (glue): put HOME before static segment and put the main glue in HOME,
1945 (glue): use options.code_seg
1946 * src/SDCCicode.c (geniCodeCall): use new macro IS_FUNCPTR()
1947 * src/SDCCmain.c: added option --codeseg and --constseg to set the name of
1948 these segments so you can instruct the linker to place them in banks
1949 (linkEdit): use code_loc for HOME segment which should be the first
1950 segment in code memory now
1951 * src/SDCCmem.c: fixed more stuff like bug 1238386
1952 * src/SDCCsymt.c (getSize): use generic pointer size for banked functions,
1953 (changePointer): don't change function pointers to code pointers for
1955 (compareType): added exceptional check for banked function pointers
1956 * src/SDCCsymt.h: changed IFFUNC_ISBANKEDCALL, added IS_FUNCPTR
1957 * src/hc08/main.c (_hc08_genAssemblerPreamble): put HOME first, put CSEG
1958 after static in code memory
1959 * src/mcs51/gen.c: added aopLiteralLong prototype,
1960 (aopForSym): use getSize for functions,
1961 (genCall): generate banked calls over one trampoline __sdcc_banked_call
1962 in HOME with lsb of address in r0, msb in r1 and bank in r2, use
1963 -Wl-bBANKSEG=0xbbaaaa option to set the address (aaaa) and bank (bb) of
1965 (genPcall): use call for literal function pointers and generate banked
1966 calls over the one trampoline so there's only one place for the user to
1967 modify according to his/hers hardware,
1968 (genEndFunction): jump to __sdcc_banked_ret in HOME for banked functions,
1969 (genPlusIncr): moved check icount>4 beyond inc dptr optimization
1970 * src/mcs51/main.c: added keyword banked,
1971 (_mcs51_genExtraAreas): put HOME first followed by GSINIT, STATIC and CSEG
1972 * support/Util/SDCCerr.c,
1973 * support/Util/SDCCerr.h: added E_BANKED_WITH_CALLEESAVES, registers are
1974 needed for passing the bank and address to the trampoline
1975 * device/lib/mcs51/crtbank.asm: added for bankswitching
1976 * device/lib/mcs51/Makefile: added crtbank
1978 2005-07-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
1980 * src/SDCCcse.c (algebraicOpts): fixed loss of volatility
1981 for fields at offset 0 of a struct or union as reported
1982 on 2005-07-07 in the developer mailing list.
1984 2005-07-15 Maarten Brock <sourceforge.brock AT dse.nl>
1986 * src/SDCCmem.c: fixed bug 1238386
1988 2005-07-12 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1990 * src/mcs51/peeph.def: added labelrefcounting for peepholes
1991 (patch #1144962), added peephole 300, enabled 259.x
1992 * doc/sdccman.lyx: removed screenshot and provided link instead
1994 2005-07-05 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
1996 * doc/sdccman.lyx: added section about debugging with ddd
1997 * doc/figures/ddd_example.eps: screenshot of debugging session
1999 2005-07-04 Raphael Neider <rneider AT web.de>
2001 * src/pic/gen.c (genPointerGet): handle pointers to CONST values
2002 like CODE pointers, fixes #1115683
2003 * src/pic/pcode.c (DoBankSelect): forget LastRegIdx during function
2004 call, fixes bugs #1232211, #1228110,
2005 fixed wrong casts to pCodeFlow from pCodeInstructions
2007 2005-07-04 Raphael Neider <rneider AT web.de>
2009 * src/pic/gen.c (popGet): changed assert to allow for
2011 * (popGetAddr): changed signature to provide
2012 an additional index, patched all call sites
2013 * (genCmpEq): handle literal-like operands correctly
2014 * (genAddrOf): added sanity checks on __code/__data pointers
2015 * (genAssign): added handling of symbols from __code section
2016 * (gencjne): do not generate code for comparisons whose result
2017 is neither stored nor used, fixes bug #1171114
2018 * (AccLsh, AccRsh): operate on operand instead of WREG
2019 * (shift{Left,Right}_Left2ResultLit): NEW, size independant
2020 replacement for Shift{LR}{12}Left2Result; shift (byte/int/long)
2022 * rewrote complete shift-by-literal logic, commented unused
2024 * (genConstPointerGet): get multiple bytes (if result size > 1),
2025 fixed handling of non-immediate addresses
2026 * (genPointerGet): handle CODE pointers like CONST pointers
2027 * (genpic14Code): insert C-SRC lines as Cource-pCodes
2028 * ({aop,op}_isLitLike): NEW, single place to decide whether an
2029 operand is to be treated as a literal or not
2030 * (mov2w,genPcall,genCmpEq),
2031 src/pic/genarith.c: use aop_isLitLike() to decide between
2032 literal/register contents
2033 * (addSign): added missing offset
2034 * src/pic/gen.h: remove newline after FENTRY/FEXIT comments,
2035 only emit comment in debug-mode,
2036 use {aop,op}_isLitLike throughout the file
2037 * src/pic/glue.c: fix initializers for pointers (work in progress)
2038 * src/pic/pcode.c (get_op): honor index on _const symbols
2039 * ({reset,dump}pCodeStatistics): NEW, estimate code size
2040 * (dumppBlock): added pCode size estimation
2041 * src/pic/ralloc.c (deassignLRs,serialRegAssign,packRegisters):
2042 check for IS_SYMOP before OP_SYMBOL'ing
2043 * fixed indentation, compacted switch-statements
2044 * (allocReg): find free register and allocate it instead of
2045 allocating new registers all the time
2046 * (deassignLRs): prevent POINTER_GET's from being assigned the same
2047 registers as its operands (necessary only for multibyte GETs)
2049 2005-07-01 Raphael Neider <rneider AT web.de>
2051 * src/pic/gen.h: added prototypes emitpComment, popGetAddr and
2052 debugging .asm-output macros FENTRY + FEXIT
2053 * src/pic/gen.c (Safe_vsnprintf): NEW, is there a more generic
2055 * (emitpComment): NEW, printf to pCode
2056 * (popGet): added assert on too large offsets, fixed PO_IMMEDIATE's
2058 * (popGetAddr): NEW, variant of popGet to access an immediates
2059 high(er) bytes instead of the n'th byte of memory they reference,
2060 replaced popGet with popGetAddr where neccessary
2061 * (genDataPointerGet): reactivated and fixed implementation
2062 * (genNearPointerGet): enabled call to genDataPointerGet, fixes array-
2064 * (genDataPointerSet): fixed multibyte assignments
2065 * (genpic14Code): fixed --i-code-in-asm handling
2066 * src/pic/genarith.c: fixed PO_IMMEDIATE issue using popGetAddr,
2067 * (genPlus): fixed index-out-of-bounds error
2068 * src/pic/pcode.c (get_op): fixed PO_IMMEDIATE's index/offset handling
2069 * src/pic/ralloc.c: added debugging output macro FENTRY2
2070 * (spillThis): fixed indentation, enbraced for-body for clarity
2071 * (rematStr): commented out as now unused
2072 * (regTypeNum): commented out special spill case (overwrites
2074 * fixes bugs #1229346, #1216476 (both arrays) and #1115667 (SIGSEGV)
2076 2005-06-30 Maarten Brock <sourceforge.brock AT dse.nl>
2078 * doc/sdccman.lyx: documented sfr16/sfr32,
2079 added example for using storage class with function pointers
2080 * src/mcs51/gen.c (genPlusIncr): optimized small offsets from dptr
2082 2005-06-28 Maarten Brock <sourceforge.brock AT dse.nl>
2084 * device/lib/_gptrget.c: also push/pop _PSBANK, added # to 0x03
2085 * device/lib/_itoa.c,
2086 * device/lib/_ltoa.c: optimized codesize
2087 * src/SDCCsymt.c (checkSClass): added sanity check for sfr at addresses,
2088 but don't know how to suppress the double warning.
2089 * src/mcs51/gen.c (genPlusIncr): fixed bug when incrementing volatile int's
2090 * support/Util/SDCCerr.c,
2091 * support/Util/SDCCerr.h: added warning W_SFR_ABSRANGE for sanity check
2093 2005-06-27 Maarten Brock <sourceforge.brock AT dse.nl>
2095 * as/mcs51/asexpr.c (expr): disabled warning "not in .flat24 mode",
2096 fixed old K&R prototypes
2097 * as/mcs51/asout.c (outrb): always output as if generating 24bit addresses
2098 * device/lib/_gptrget.c,
2099 * device/lib/_gptrgetc.c,
2100 * device/lib/_gptrput.c: changed versions for new memory indicator values,
2101 also new versions for small generic pointers and banked generic pointers
2102 * src/port.h: added const_name
2103 * src/SDCC.lex: added keywords sfr16, __sfr16, sfr32, __sfr32
2104 * src/SDCC.y: added tokens SFR16, SFR32 and their sfr_attributes
2105 * src/SDCCcse.c (findPrevIc): check all associative operators
2106 * src/SDCCglue.c (emitMaps): use CONST_NAME if defined
2107 * src/SDCCicode.h: added macro IS_ASSOCIATIVE
2108 * src/SDCCmem.c: updated comments,
2109 set far-space to 0 for pdata, results in optimized code
2110 * src/SDCCmem.h: added macro CONST_NAME
2111 * src/SDCCsymt.h: renumerated generic pointer types GPTYPE_... thereby
2112 moving the info into the highest bits, see also gptrget/gptrput
2113 * src/src.dsp: added sdcc.ico to project files
2114 * src/avr/gen.c (genCast): fixed bug 0x%d
2115 * src/avr/main.c (avr_port): added "CONST (CODE)" for const_name
2116 * src/ds390/gen.c (aopForRemat, adjustArithmeticResult): disconnected direct
2117 relation between ptr_type and DCL_TYPE,
2118 (genCast): fixed bug 0x%d
2119 * src/ds390/main.c (ds390_port, tininative_port, ds400_port): added "CONST
2120 (CODE)" for const_name
2121 * src/hc08/gen.c (genCast): fixed bug 0x%d
2122 * src/hc08/main.c (_hc08_genAssemblerPreamble): added .area ...const_name,
2123 (hc08_port): added "CONST (CODE)" for const_name
2124 * src/mcs51/gen.c (aopForSym): optimized pushing ACC,
2125 (aopForRemat, adjustArithmeticResult): disconnected direct relation
2126 between ptr_type and DCL_TYPE,
2127 (aopGetUsesAcc, aopGet, aopPut): changed first parameter from asmop* to
2128 operand* and took AOP() inside function so sfr-ness can be checked,
2129 (all over): repaired calls to aopGetUsesAcc, aopGet, aopPut to comply with
2131 (genFunction, genEndFunction): optimized stack setup,
2132 (genMinus): optimized for literals with ending zeroes (in bytes),
2133 (genCast): fixed bug 0x%d
2134 * src/mcs51/main.c (_mcs51_keywords): added sfr16 and sfr32,
2135 (mcs51_port): added "CONST (CODE)" for const_name
2136 * src/mcs51/peeph.def: made rule 226 more generic
2137 * src/pic/main.c (pic_port): added "CONST (CODE)" for const_name
2138 * src/pic16/main.c (pic16_port): added "CONST (CODE)" for const_name
2139 * src/xa51/main.c (xa51_port): added "CONST (CODE)" for const_name
2140 * src/z80/main.c (z80_port): added NULL for const_name,
2141 (gbz80_port): added NULL for const_name
2142 * support/regression/tests/bug663539.c,
2143 * support/regression/tests/sfr16.c: new tests
2145 2005-06-25 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2147 * device/include/mcs51/p89v51rd2.h, device/include/mcs51/at89s53.h: added.
2149 2005-06-24 Raphael Neider <rneider AT web.de>
2151 * device/lib/pic16/libdev/pic18f[68][567]20.c:
2153 * device/include/pic16/signal.h: added USBIF
2156 2005-06-24 Raphael Neider <rneider AT web.de>
2158 * device/lib/pic16/libdev/pic18f2455.c,
2159 device/include/pic16/pic18f2455.h: NEW
2160 * device/include/pic16/pic18fregs.h,
2161 device/lib/pic16/pics.all,
2162 src/pic16/device.c: added 18f2455
2163 * device/lib/pic16/libdev/pic18f[68][567]20.c,
2164 device/include/pic16/{pic18f[68][567].h,usart.h}:
2165 replaced MULTIPLE_USARTS define with more relaible
2166 compatibility sfrs (for USART access)
2168 2005-06-20 Slade Rich <slade_rich AT users.sourceforge.net>
2170 * src/pic/pcode.c : Fixed problem when a string constant contains a "\r\n"
2171 and the output asm file line is printed on two lines.
2173 2005-06-19 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2175 * sim/ucsim/hc08.src/inst.cc (inst_condbranch): fixed simulation of
2176 BGT, BLE, BHI, and BLS instructions
2177 * src/hc08/gen.c (outAcc, outBitC, outBitNV, genCmpLt, genCmpGt,
2179 * src/hc08/gen.c (genCmpEQorNE, genCmp, branchopCmp, nameCmp,
2180 negatedCmp, exchangedCmp, genhc08Code): rewrite of comparison handling,
2182 * src/hc08/peeph.def: added rules 2g - 2l for new conditional branches
2184 2005-06-15 Raphael Neider <rneider AT web.de>
2186 * src/pic16/NOTES: moved Vangelis from active developers to people to contact
2187 * device/include/pic16/{6520.h,8520.h}: fixed configuration bits
2188 * src/pic16/gen.c (): prevent iTemps from being considered to be in CODESPACE,
2189 fixes bug #1221120; for symbols in CODESPACE get number of bytes to read from
2190 OP_SYM_TYPE() instead of OP_SYM_ETYPE()
2192 2005-06-06 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2194 * device/include/mcs51/reg764.h: Changed PB0 to PBO as requested by
2195 Marcel Telka in bug #1215704
2197 2005-06-02 Slade Rich <slade_rich AT users.sourceforge.net>
2199 * src/pic/pcode.c : Changed pseudo stack size to 15 to allow WSAVE to be
2200 located in shared memory bank.
2202 2005-05-31 Raphael Neider <rneider AT web.de>
2204 * src/pic16/{gen.c,genarith.c}: replaced sign-extension
2205 "CLRF, BTFSC <signbit>, DECF/COMF" with side-effect-free
2206 "CLRF, BTFSC <signbit>, SETF"; fixes "long>>9"
2208 2005-05-27 Maarten Brock <sourceforge.brock AT dse.nl>
2210 * device/lib/_strncpy.c: fixed the fix
2212 2005-05-26 Raphael Neider <rneider AT web.de>
2214 * src/pic16/glue.c (pic16_printIvalChar): fixed _constant_ string
2215 initializers with \0, bug #1208187
2216 * src/pic/glue.c (printIvalChar): fixed (non- and constant) string
2217 intializers with \0, bug #1208187
2219 2005-05-26 Raphael Neider <rneider AT web.de>
2221 * src/pic16/glue.c (pic16_printIvalChar): fixed string
2222 initializers with \0, bug #1208187
2223 * src/pic16/main.c (_process_pragma): added sanity checks
2224 for stack position and size, emit warnings when appropriate
2226 2005-05-26 Maarten Brock <sourceforge.brock AT dse.nl>
2228 * device/lib/_strncpy.c: fixed not filling with \0
2230 2005-05-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2232 * src/SDCCast.c (funcOfType, funcOfTypeVarg, stringToSymbol,
2234 * src/SDCC.y (external_definition, enumerator, parameter_declaration,
2235 compound_statement),
2237 * src/SDCCsymt.c (addSymChain, processFuncArgs): fixed bug #1159134
2239 2005-05-24 Raphael Neider <rneider AT web.de>
2241 * src/pic16/glue.c (pic16_printGPointerType): fixed #1207796
2243 2005-05-24 Raphael Neider <rneider AT web.de>
2245 * device/include/pic16/pic18f{442,452,458}.h: fixed wrong
2246 TRISE definitions, closes bug #1162453
2248 2005-05-22 Raphael Neider <rneider AT web.de>
2250 * src/pic16/main.c (_process_pragma): check for missing
2251 arguments to pragmas code and udata
2252 * device/include/pic16/pic18f{2550,4331,4455,4520}.h:
2253 consistency fixes to match other headers (thanks to Jim Paris)
2254 * device/lib/pic16/libio/i2c.ignore: 18f4331 provides no I2C
2256 2005-05-21 Maarten Brock <sourceforge.brock AT dse.nl>
2258 * src/SDCCicode.c (isOperandEqual): fixed missing ;
2260 2005-05-19 Maarten Brock <sourceforge.brock AT dse.nl>
2262 * support/regression/tests/bug1198642.c: new test
2263 * src/SDCCicode.c (isOperandEqual): fixed bug 1198642
2264 * src/SDCCcse.c (findPrevIc): added comment, please have a look
2265 * support/scripts/resource.h,
2266 * support/scripts/resource.rc,
2267 * src/src.dsp: added sdcc.ico to project as icon for sdcc.exe
2268 * support/scripts/sdcc.ico: added 32x32 icon
2270 2005-05-18 Raphael Neider <rneider AT web.de>
2272 * device/lib/pic16/libdev/pic18f*.c,
2273 * device/include/pic16/pic18f*.h: updated "sfr" and "at X"
2274 keywords to "__sfr" and "__at (X)"
2275 * device/include/pic16/pic18fregs.h: added pic18f4520
2276 * src/pic16/pcode.c (pic16_pCode2str): fixed (?) bug
2277 #1203088 (MPLAB compatibility)
2279 2005-05-17 Raphael Neider <rneider AT web.de>
2281 * device/include/pic16/pic18f{2550,4331,4455,4520}.h: NEW
2282 * device/lib/pic16/libdev/pic18f{2550,4331,4455,4520}.c: NEW
2283 * device/lib/pic16/pics.all: added new devices
2284 * src/pic16/device.c: added support for pic18f4520
2286 2005-05-16 Raphael Neider <rneider AT web.de>
2287 * src/pic16/gen.{c,h}: s/mov2f/pic16_mov2f made public
2288 * src/pic16/genarith.c (genAddLit): fixed bug 1202480
2289 * src/pic16/pcode.{c,h} (pic16_newpCodeOpBit_simple): NEW
2290 convenience function for bit access
2292 2005-05-15 Maarten Brock <sourceforge.brock AT dse.nl>
2294 * device/lib/printf_large.c: fixed bug 1193299
2295 * support/regression/tests/bug1057979.c: added test %3.3s
2297 2005-05-15 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2299 * device/include/mcs51/8051.h,
2300 * device/include/mcs51/8052.h: made parseable with lint
2301 * device/include/mcs51/lint.h: added include file for (sp)lint
2302 * doc/sdccman.lyx: added doc about use of splint (syntax checking tool)
2303 * doc/cdbfileformat.lyx,
2304 * doc/test_suite_spec.lyx: hardcoded date to the date of last text change
2306 2005-05-14 Raphael Neider <rneider AT web.de>
2308 * device/lib/pic16/Makefile.common.in: add --optimize-df to OPT_FLAGS
2309 * device/lib/pic16/libc/stdlib/itoa.c (new)
2310 * device/lib/pic16/libc/stdlib/Makefile: have itoa.c built
2311 * device/lib/pic16/libio/Makefile: exclude subdir according to
2312 ${subdir}.ignore for certain PICs (lacking e.g. i2c)
2313 * device/lib/pic16/libio/i2c.ignore (new): pic18f1220 has no I2C support
2314 * src/pic16/gen.c (genFunction): prevent annoying warning
2315 * src/pic16/pcode.c: renamed stack_t to dynstack_t to prevent
2317 * support/cpp2/cppmain.c (cpp_output_string): new
2318 * support/cpp2/cpplib.c (_cpp_do__Pragma): fixed _Pragma(""),
2321 2005-05-13 Borut Razem <borut.razem AT siol.net>
2323 * src/SDCCmain.c (linkEdit): fixed bug 1195202
2325 2005-05-12 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2327 * .version: changed to version 2.5.1; back to bleeding edge development
2329 2005-05-11 Borut Razem <borut.razem AT siol.net>
2331 * doc/sdccman.lyx doc/cdbfileformat.lyx doc/test_suite_spec.lyx:
2332 generate PDF version 1.3 documents
2334 2005-05-07 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2336 * .version: changed to version 2.5.0
2338 2005-04-27 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2340 * doc/sdccman.lyx: updated weblinks, index and smaller updates
2342 2005-04-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2344 * doc/sdccman.lyx: changed version 2.5.0, documented --std-c89,
2345 --std-sdcc89, --std-c99, --std-sdcc99, and the corresponding #pragmas, as
2346 well as many smaller updates.
2347 * .version: changed to version 2.5.0-pre1
2349 2005-04-26 Jesus Calvino-Fraga <jesusc AT ece.ubc.ca>
2351 * src/SDCCmain.c (setIncludePath): added port->target to SDCC_INCLUDE_NAME
2353 2005-04-26 Maarten Brock <sourceforge.brock AT dse.nl>
2355 * support/regression/tests/bug1185672.c: added
2356 * src/mcs51/gen.c (aopGetUsesAcc, genCpl, genAnd, genOr, genXor): fixed
2358 * src/mcs51/gen.c (genCall): added comments, made it look safer
2359 * src/mcs51/gen.c (genEndFunction): simplified
2361 2005-04-25 Maarten Brock <sourceforge.brock AT dse.nl>
2363 * src/mcs51/ralloc.c (serialRegAssign): fixed bug 1189609
2365 2005-04-14 Borut Razem <borut.razem AT siol.net>
2367 * fixed bug 1045046 - SIGSEGV with really simple code?:
2368 src/pic/pcode.c (pCodeInitRegisters)- pseudo stack size increased to 16
2369 src/pic/ralloc.c (typeRegWithIdx) - error message on pseudo stack overflow
2371 2005-04-14 Borut Razem <borut.razem AT siol.net>
2373 * src/pic16/gen.c (genInline), src/pic16/main.c (_process_pragma),
2374 src/pic16/device.h: temporarily disabled experimental #inline pragma
2377 2005-04-14 Maarten Brock <sourceforge.brock AT dse.nl>
2379 * device/include/z80/stdio.h,
2380 * device/include/z80/string.h: removed these highly incomplete files so
2381 SDCC can use the default ones in device/include/
2383 2005-04-14 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2385 * src/mcs51/gen.c (genEndFunction): removed unused variable to fix
2387 * device/lib/Makefile.in: default PORTINCDIR to the mcs51 subdir to
2390 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2392 * device/include/malloc.h: removed redundant __reentrant prototypes
2393 * device/lib/_mullong.c: added working xstack variant in asm (C version
2394 doesn't pass regression tests)
2395 * device/lib/bpx.c: used __data and made bpx char for mcs51
2396 * src/SDCCast.c (decorateType): removed unused GPTYPE_IDATA,
2397 (createFunction): fixed bug with xstackPtr
2398 * src/SDCCcse.c: corrected comments
2399 * src/SDCCopt.c (convertToFcall): fixed warning in MSVC,
2400 (killDeadCode, eBBlockFromiCode): removed unused code
2401 * src/SDCCsymt.h: removed unused GPTYPE_GPTR and GPTYPE_IDATA,
2403 * src/mcs51/gen.c (aopForSym, aopPut, toBoolean, unsaveRegisters,
2404 assignResultValue, genCall, genFunction, genEndFunction, genAnd,
2405 genOr, genXor, genAddrOf): fixed several bugs concerning xstack
2406 (genModOneByte): fixed warning in MSVC
2407 * src/mcs51/main.c (): added comments
2408 * src/mcs51/peeph.def: changed 129 to 129.a, added 129.b, 129.c & 129.d
2410 2005-04-12 Maarten Brock <sourceforge.brock AT dse.nl>
2412 * src/SDCCmain.c (linkEdit): oops, changed one line too many
2414 2005-04-11 Maarten Brock <sourceforge.brock AT dse.nl>
2416 * src/SDCCmain.c (linkEdit): fixed bug with finding crt0.o for z80
2418 2005-04-10 Vangelis Rokas <vrokas AT users.sourceforge.net>
2420 * src/pic16/glue.c (printIvalChar): fixed bug when emitting
2421 characters arrays of larger size than the declared one.
2423 2005-04-10 Borut Razem <borut.razem AT siol.net>
2425 * src/pic/gen.c (genInline),
2426 src/pic/pcode.c (newpCodeAsmDir), (pCode2str),
2427 (genericPrint), (unlinkpCodeFromBranch), (compareLabel),
2428 (findNextInstruction), (findPrevInstruction),
2429 (findInstructionUsingLabel),
2430 src/pic/pcode.h: fixed bug #1164907 - Labels not being recognized
2431 * src/pic/pcode.c (findLabel): added missing '\n'
2432 * src/src.dsp: added SDCCdwarf2.c to the project
2434 2005-04-09 Borut Razem <borut.razem AT siol.net>
2436 * support/scripts/sdcc.nsi: added include/hc08/* h to NSIS setup
2438 2005-04-08 Raphael Neider <rneider AT web.de>
2440 * src/pic16/pcode.c: added helpers defmapInsertAfter (insert a new item
2441 into the chain after a given one) and mergeDefmapSymbols (combine
2442 defmap entries for each symbol per pcode)
2443 * (createDefmap): have defmap entries merged in the end
2444 * (defmapReplaceSymRef): split defmap entries covering two accesses to
2445 a symbol before replacing one access type's symbol, merge symbols in
2446 the end (replacement symbol might already have an entry)
2447 * (assignValnums): keep reference to written WREG intact
2449 2005-04-08 Raphael Neider <rneider AT web.de>
2451 * src/pic16/pcode.c (struct defmap_s): named anonymous union (for
2454 2005-04-08 Vangelis Rokas <vrokas AT users.sourceforge.net>
2456 * src/pic16/pcode.c (pic16_get_op2): enlarged size of array b to 128
2459 2005-04-07 Raphael Neider <rneider AT web.de>
2461 * device/include/pic16/usart.h: added compatibility defines for
2462 devices with more than one USART
2463 * device/include/pic16/pic18f[68][567]20.h: activated above defines
2465 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2467 * device/lib/Makefile.in: updated for port specific include
2469 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2471 * support/regression/ports/mcs51/spec.mk: added mcs51 include
2473 2005-04-07 Maarten Brock <sourceforge.brock AT dse.nl>
2475 * device/include/8051.h,
2476 * device/include/8052.h,
2477 * device/include/at89S8252.h,
2478 * device/include/at89c55.h,
2479 * device/include/at89x051.h,
2480 * device/include/at89x51.h,
2481 * device/include/at89x52.h,
2482 * device/include/mcs51reg.h,
2483 * device/include/reg51.h,
2484 * device/include/reg764.h,
2485 * device/include/regc515c.h,
2486 * device/include/sab80515.h: (re)moved these 12 files
2487 * device/include/mcs51/8051.h,
2488 * device/include/mcs51/8052.h,
2489 * device/include/mcs51/at89S8252.h,
2490 * device/include/mcs51/at89c55.h,
2491 * device/include/mcs51/at89x051.h,
2492 * device/include/mcs51/at89x51.h,
2493 * device/include/mcs51/at89x52.h,
2494 * device/include/mcs51/mcs51reg.h,
2495 * device/include/mcs51/reg51.h,
2496 * device/include/mcs51/reg764.h,
2497 * device/include/mcs51/regc515c.h,
2498 * device/include/mcs51/sab80515.h: and added them here
2500 2005-04-06 Maarten Brock <sourceforge.brock AT dse.nl>
2502 * device/include/stdarg.h: changed SDCC specific keywords to double
2504 * device/include/stdint.h: changed intptr_t and uintptr_t for others than
2506 * device/include/hc08/mc68hc908gp32.h,
2507 * device/include/hc08/mc68hc908jb8.h,
2508 * device/include/hc08/mc68hc908jkjl.h,
2509 * device/include/hc08/mc68hc908qy.h: fixed comments
2510 * device/include/mcs51/README: updated
2511 * device/include/mcs51/c8051f120.h: added PINRSF
2512 * device/lib/pic16/libc/stdlib/crc16.c: fixed comments
2513 * src/pic16/pcode.c: MSVC6 doesn't accept declaring new variables
2514 amidst code. Also inline is not supported.
2516 2005-04-06 Raphael Neider <rneider AT web.de>
2518 * src/pic16/pcode.c (pic16_pCodeReplace): also update pcflow->end
2519 * (createDefmap): fixed CALLs to depend on FSR1 and RETLW to restore
2520 callers stack/frame pointers
2522 2005-04-06 Vangelis Rokas <vrokas AT users.sourceforge.net>
2524 * device/include/pic16/usart.h: added, missing in previous commit,
2525 * device/include/pic16/adc.h: fixed typo,
2526 * device/lib/pic16/libc/utils/cvtdec.S: added missing in previous
2528 * device/lib/pic16/libc/stdlib/g_ftoa.S: modified to include
2530 * device/lib/pic16/libc/stdio/streams.c: leave stdin, stdout
2531 uninitialized because a bug appears with gplink
2532 * device/lib/pic16/{some makefiles}: moved $(CSTD) from CFLAGS to
2533 COMPILE_FLAGS and added CPPFLAGS with -nostdinc because sdcpp
2534 complains for unrecognised option
2536 2005-04-05 Raphael Neider <rneider AT web.de>
2538 * src/pic16/gen.c (pic16_popCopyReg): made copying work for extended
2539 structs as well (using memcpy)
2540 * (genFunction): fixed comparison, used pCodeOpLabel to reduce warning
2541 on ISRs (GOTO has no label)
2542 * src/pic16/device.h: added OF_OPTIMIZE_DF
2543 * src/pic16/main.c: added compiler switch --optimize-df to enable the
2544 new data flow analysis/optimization
2545 * src/pic16/pcode.c: added (prototypes for and implementation of)
2546 dataflow analysis functions, fixed pCodeInstructions' inCond and
2547 outCond values, made RCALL a branch instruction
2548 * (pic16_unlinkpCode): keep C line if possible
2549 * (pic16_pCodeUnlink): removed cast on left side of assignment, have
2550 C line moved if possible
2551 * (pic16_getRegFrompCodeOp): NEW, improved version of...
2552 * (pic16_getRegFromInstruction,pic16_getRegFromInstruction2): changed
2553 to use new pic16_getRegFrompCodeOp (works for more SFRs)
2554 * (pic16_BuildFlow): fixed skip instructions with label (did not start
2556 * (pic16_getJumptabpCode): NEW, needed in...
2557 * (LinkFlow): fixed handling of jumptables, calls and conditional
2559 * (pic16_InsertCommentAfter): NEW
2560 * (pic16_pCodeReplace): made verbose and flow preserving
2561 * (AnalyzeFlow): added call to data flow analysis
2562 * src/pic16/pcode.h: added defmaps to pCodeFlow struct
2563 * src/pic16/pcodeflow.h: added PCC_STATUS to mean all STATUS bits
2564 * src/pic16/ralloc.c (packRegsForAssign): added return 1 in the end
2566 2005-04-03 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2568 * src/SDCCast.c (decorateType): fixed bug #1105626
2570 2005-04-02 Vangelis Rokas <vrokas AT users.sourceforge.net>
2572 * device/include/asm/pic16/features.h,
2573 * pic18f*.h headers,
2574 * device/include/pic16/adc.h,
2575 * device/include/pic16/delay.h,
2576 * device/include/pic16/i2c.h,
2577 * device/include/pic16/malloc.h,
2578 * device/include/pic16/stdio.h,
2579 * device/include/pic16/stdlib.h,
2580 * device/include/pic16/string.h,
2581 * device/lib/pic16/libc/stdio/printf_tiny.c,
2582 * device/lib/pic16/libc/stdio/printf_small.c,
2583 * device/lib/pic16/libc/stdio/strmgpsim.c,
2584 * device/lib/pic16/libc/stdio/strmmssp.c,
2585 * device/lib/pic16/libc/stdio/strmusart.c,
2586 * device/lib/pic16/libc/stdio/vfprintf.c,
2587 * device/lib/pic16/libc/stdlib/ltoa.c,
2588 * device/lib/pic16/libc/stdlib/putchar.c,
2589 * device/lib/pic16/libc/stdlib/x_ftoa.c,
2590 * device/lib/pic16/libc/stdlib/memchrpgm.c,
2591 * device/lib/pic16/libc/stdlib/memchrram.c,
2592 * device/lib/pic16/libc/stdlib/memcpypgm2ram.c,
2593 * device/lib/pic16/libc/stdlib/memcpyram2ram.c,
2594 * device/lib/pic16/libio/adc/adcbusy.c,
2595 * device/lib/pic16/libio/adc/adcread.c,
2596 * device/lib/pic16/libio/adc/adcsetch.c,
2597 * device/lib/pic16/libio/usart/ubaud.c,
2598 * device/lib/pic16/libio/usart/ubusy.c,
2599 * device/lib/pic16/libio/usart/udrdy.c,
2600 * device/lib/pic16/libio/usart/uopen.c,
2601 * device/lib/pic16/libio/usart/uputc.c,
2602 * device/lib/pic16/libsdcc/gptr/gptrget1.c,
2603 * device/lib/pic16/libsdcc/gptr/gptrget2.c,
2604 * device/lib/pic16/libsdcc/gptr/gptrget3.c,
2605 * device/lib/pic16/libsdcc/gptr/gptrget4.c,
2606 * device/lib/pic16/libsdcc/gptr/gptrput1.c,
2607 * device/lib/pic16/libsdcc/gptr/gptrput2.c,
2608 * device/lib/pic16/libsdcc/gptr/gptrput3.c,
2609 * device/lib/pic16/libsdcc/gptr/gptrput4.c: modified all SDCC
2610 specific keywords to double underlined form,
2611 * device/lib/pic16/libc/Makefile.rules,
2612 * device/lib/pic16/libsdcc/Makefile.rules,
2613 * device/lib/pic16/libm/Makefile,
2614 * device/lib/pic16/libio/Makefile.rules: added CSTD macro in CFLAGS
2615 to compile with C standard set in Makefile.common
2616 * device/lib/pic16/libc/stdlib/Makefile: added new C sources
2617 rand.c and crc.c in compilation process,
2618 * device/lib/pic16/libsdcc/int/divuint.c,
2619 * device/lib/pic16/libsdcc/long/divulong.c: changed declaration of
2620 `c' from signed to unsigned,
2621 * device/lib/pic16/startup/crt0.c,
2622 * device/lib/pic16/startup/crt0i.c,
2623 * device/lib/pic16/startup/crt0iz.c: adopted to all SDCC specific
2624 keywords to double underlined form, bug fixes in _do_cinit function
2625 which prevented the correct initialization of the .idata segment,
2626 * src/pic16/pcoderegs.c (insideLRBlock): fixed a bug that caused the
2627 core to enter a infinite loop
2628 * device/lib/pic16/libc/stdlib/rand.c, crc.c: new files
2630 2005-04-02 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2632 * src/SDCCicode.c (getArraySizePtr): fixed bug #1122171
2634 2005-04-01 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2636 * device/include/Makefile.in: add support for hc08 subdirectory
2637 * device/include/hc08/: new subdirectory
2638 * device/include/hc08/mc68hc908jkjl.h: new header contributed by
2639 Lucas Loizaga, thanks!
2640 * device/include/hc08/mc68hc908qy.h,
2641 * device/include/hc08/mc68hc908gp32.h,
2642 * device/include/hc08/mc68hc908jb8.h: moved hc08 register defs to
2643 their own directory. Changed internal macro names to use the compiler
2644 reserved namespace. Changed SDCC specific keywords to double
2646 * device/include/math.h,
2647 * device/include/malloc.h,
2648 * device/include/stdarg.h,
2649 * device/include/stdbool.h
2650 * device/include/string.h,
2651 * device/include/tinibios.h,
2652 * device/include/ds400rom.h,
2653 * device/include/8051.h,
2654 * device/include/8052.h,
2655 * device/include/80c51xa.h,
2656 * device/include/at89c55.h,
2657 * device/include/at89S8252.h,
2658 * device/include/at89x51.h,
2659 * device/include/at89x52.h,
2660 * device/include/ds80c390.h,
2661 * device/include/reg764.h,
2662 * device/include/regc515c.h,
2663 * device/include/sab80515.h,
2664 * device/include/mcs51/c8051f000.h,
2665 * device/include/mcs51/c8051f018.h,
2666 * device/include/mcs51/c8051f020.h,
2667 * device/include/mcs51/c8051f040.h,
2668 * device/include/mcs51/c8051f060.h,
2669 * device/include/mcs51/c8051f120.h,
2670 * device/include/mcs51/c8051f300.h,
2671 * device/include/mcs51/c8051f310.h,
2672 * device/include/mcs51/c8051f320.h,
2673 * device/include/mcs51/c8051f330.h,
2674 * device/include/mcs51/c8051f350.h,
2675 * device/include/z180.h: Changed SDCC specific keywords to double
2678 2005-03-31 Vangelis Rokas <vrokas AT users.sourceforge.net>
2680 * src/pic16/device.c (Pics16[]): added devices 18F2550, 18F4331,
2682 * (pic16_assignConfigWordValue): disable testing of configuration
2683 register value with config mask,
2684 * src/pic16/gen.c (pic16_testStackOverflow): prefix stack test
2685 function with port->fun_prefix,
2686 * (genFunction): when generating a naked interrupt function never
2687 create an absolute segment placed in interrupt vector address, place
2688 the actual interrupt function at IVA instead, when an interrupt
2689 function is generated with unspecified interrupt then do not create
2690 the absolute section,
2691 * (genGenPointerGet, genGenPointerSet, genPackBits): replace all
2692 code for generating a call to generic pointer get/put function with
2693 a call to function pic16_callGenericPointer(),
2694 * src/pic16/genutils.c (pic16_callGenericPointerRW): NEW, generates
2695 the call to the generic pointer get/put functions with prefixing the
2696 function name with port->fun_prefix,
2697 * src/pic16/glue.c (pic16glue): ifdef-out test of OF_LR_SUPPORT,
2698 * src/pic16/main.c (_process_pragma): prefix function with
2700 * (_pic16_finaliseOptions): define macro __18Fxxxx macro when
2701 calling assembler, old 18Fxxxx macro is deprecated,
2702 * src/pic16/pcode.c (unlinkpCodeFromBranch): added PC_INLINE and
2703 PC_ASMDIR in while condition,
2704 * (findInstruction): add PC_ASMDIR in while condition,
2705 * (buildCallTree): prefix main with port->fun_prefix,
2706 * (pic16_pCode2str): fixed bug that didn't emit the memory access
2707 identifier for variable with banked access in instructions BTFSS,
2708 BTFSC, BCF, BSF, BTG
2709 * (AnalyzeFlow): moved call to OptimizepCode to pic16_AnalyzeBanking,
2710 * src/pic16/pcodepeep.c (pCodeOpCompare): increase size of b to 1024,
2711 * src/pic16/pcoderegs.c (pic16_pCodeRegoptimizeRegUsage): don't
2712 perform optimization when enviroment variable NO_REG_OPT is set,
2713 * (insideLRBlock): NEW, return 1 if register is inside an
2714 INF_LOCALREGS block,
2715 * (RemoveRegFromLRBlock): remove a register that is completely
2716 eliminated by register optimization, but it is still left in local
2717 register store/restore in/from stack block,
2718 * (Remove2pcodes): after removing register, check to see if it
2719 should be removed from local register store/restore in/from stack
2721 * src/pic16/ralloc.c (pic16_decodeOp): added decode for
2722 DUMMY_READ_VOLATILE,
2724 * device/include/pic16/adc.h: minor prototype modifications and
2726 * device/include/pic16/malloc.h: added GPL notice various
2728 * device/include/pic16/stdint.h: NEW, standard header for ints
2729 * device/include/pic16/delay.h: NEW, header for delay functions,
2730 delay10tcy, delay100tcy, delay1ktcy, delay10ktcy, delay100ktcy,
2732 * device/include/pic16/signal.h: NEW, header providing helper macros
2733 for implementing signal handlers,
2734 * device/include/pic16/stdio.h: added prototypes for functions,
2735 printf, vprintf, sprintf, vsprintf, fprintf, vfprintf. Added
2736 prototypes for stdin and stdout, added macro PUTCHAR to
2737 automatically implement putchar function prototype,
2738 * device/include/pic16/usart.h: modified and updated USART library,
2739 * device/lib/pic16/libio/adc/,
2740 * device/lib/pic16/libio/i2c: some modifications to improve library
2742 * device/lib/pic16/libc/stdio/: modifications for the new printf*
2743 family of functions,
2744 * device/lib/pic16/libc/stdlib/: various modifications in the malloc
2745 family of functions and other sources,
2746 * device/lib/pic16/libio/usart/: NEW, c sources for the usart module
2747 of the PIC18Fxx[28] devices,
2748 * device/lib/pic16/libc/delay/: NEW, c sources for the delay functions,
2749 * device/lib/pic16/libc/utils/: minor modifications in the .S sources,
2750 * device/lib/pic16/startup/{crt0i.c, crt0iz.c}: redesign of the
2751 _do_cinit function, because the previous failed when local variables
2752 where not placed in the same memory bank,
2753 * device/lib/pic16/libsdcc/char/: various modifications to improve
2754 library performance,
2755 * doc/sdccman.lyx: some reorganization of the PIC16 part, added many
2756 information on the new functions of the c library and more...
2758 2005-03-28 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2760 * src/SDCCBBlock.c (iCodeBreakDown): fixed bug #1170212
2762 2005-03-26 Raphael Neider <rneider AT web.de>
2764 * src/pic16/gen.c (genSkipc): fixed semantics (execute branch
2765 if condition == CARRY)
2766 * (genCmp): adapted to new genSkipc semantics
2767 * src/pic16/genutils.c (pic6_genCmp_special): removed side effect
2768 on rIfx (genCmp was broken)
2770 2005-03-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2772 * src/SDCCmain.c (setDefaultOptions, optionsTable[], parseCmdLine),
2773 * src/z80/main.c (_keywords[]),
2774 * src/SDCCglobal.h (struct options),
2776 * src/SDCC.lex (isTargetKeyword, doPragma, pragma_tbl[]): new pragmas
2777 to enable/disable SDCC and C99 extensions/keywords (std_c89, std_sdcc89,
2778 std_c99, std_sdcc99). Also, equivalent command line options (--std-c89,
2779 --std-sdcc89, --std-c99, --std-sdcc99). SDCC specific keywords are
2780 always available in leading double underscore form. The C99 support is
2781 mostly missing, but it's a start.
2782 * support/regression/tests/bug-227710.c: fixed nonconforming use of
2783 reserved identifier "__data".
2785 2005-03-24 Maarten Brock <sourceforge.brock AT dse.nl>
2787 * src/mcs51/peeph.def: fixed bug 1170013
2789 2005-03-22 Maarten Brock <sourceforge.brock AT dse.nl>
2791 * device/include/mcs51reg.h: fixed bug 842007
2793 2005-03-21 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2795 * src/SDCCcflow.c (dfNumCompare): committed the wrong version of this
2798 2005-03-20 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2800 * src/port.h (struct PORT),
2801 * src/avr/ralloc.c (avr_assignRegisters),
2803 * src/ds390/ralloc.c (ds390_assignRegisters),
2805 * src/hc08/ralloc.c (hc08_assignRegisters),
2807 * src/mcs51/ralloc.c (mcs51_assignRegisters),
2809 * src/pic/ralloc.c (pic14_assignRegisters),
2811 * src/pic16/ralloc.c (pic16_assignRegisters),
2813 * src/xa51/ralloc.c (xa51_assignRegisters),
2815 * src/z80/ralloc.c (z80_assignRegisters),
2817 * src/SDCCopt.c (eBBlockFromiCode, replaceRegEqv, killDeadCode),
2818 * src/SDCCcse.c (ifxOptimize, cseBBlock, cseAllBlocks),
2820 * src/SDCCdflow.c (computeDataFlow),
2822 * src/SDCCloop.c (addDefInExprs, loopInvariants, loopOptimizations),
2824 * src/SDCCcflow.c (*),
2826 * src/SDCCBBlock.c (iCodeBreakDown, dumpEbbsToFileExt, eBBWithEntryLabel),
2827 * src/SDCCBBlock.h (struct ebbIndex): new struct that keeps two copies
2828 of the eBBlock list, sorted by both bbnum and dfnum. (fixes bug with
2829 immedDom() returning wrong block; probably fixes bug #1160833)
2831 2005-03-20 Borut Razem <borut.razem AT siol.net>
2833 * support/scripts/inc2h.pl: WIN32 port
2835 2005-03-19 Maarten Brock <sourceforge.brock AT dse.nl>
2837 * device/lib/makefile.in: added abs.c and labs.c
2839 2005-03-17 Maarten Brock <sourceforge.brock AT dse.nl>
2841 * device/include/stdint.h: added
2842 * device/lib/abs.c: added
2843 * device/lib/labs.c: added
2844 * device/include/stdlib.h: added abs() and labs() prototypes
2845 * device/lib/libsdcc.lib: added abs and labs
2846 * device/include/float.h,
2847 * device/lib/_fsmul.c,
2848 * device/lib/printf_fast.c,
2849 * device/lib/printf_tiny.c: updated comments
2851 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2853 * src/SDCCicode.c (geniCodeSwitch, geniCodeJumpTable): fixed
2856 2005-03-16 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2858 * src/SDCCcse.c (cseBBlock): retain assignment to self when volatile
2859 * src/SDCCast.c (isLoopCountable): fixed bug #1161985
2861 2005-03-15 Maarten Brock <sourceforge.brock AT dse.nl>
2863 * device/lib/printf_large.c: removed inline assembly for portability and
2864 readability. Use printf_fast if speed or size are more important.
2865 * src/pic16/gen.c: removed conditions around use of DEBUGpc
2866 * src/pic16/genutils.h: added define for DEBUGpc for MSVC
2868 2005-03-15 Vangelis Rokas <vrokas AT users.sourceforge.net>
2870 * src/pic16/genutils.c (pic16_genCmp_special): initialized offs to
2871 prevent compiler warning
2873 2005-03-14 Vangelis Rokas <vrokas AT users.sourceforge.net>
2875 * device/lib/pic16/startup/crt0i.c (_cinit): local variables where
2876 moved to level 0 and declared as static. Also they are explicit
2877 placed in access bank. This was necessery because some times they
2878 might cross memory bank boundaries. crt0iz.c is *NOT* updated!!!
2879 * src/pic16/device.h: added flag OPTIMIZE_CMP to enable some compare
2880 optimizations. Currently only compare to unsigned char is implemented,
2881 * src/pic16/gen.c: added fReturnIdx array,
2882 * (struct resolvedIfx) is moved to gen.h and made public,
2883 * (struct _G): added sregsAlloc and sregsAllocSet fields,
2884 * (aopForSym): added an optimization to directly store in stack of
2885 the operand of a SEND iCode,
2886 * (pic16_aopOp): don't return return registers as strings (AOP_STR)
2887 but as registers instead (AOP_REG) using the fReturnIdx array,
2888 * (pic16_freeAsmop): remove the freed register from the
2889 _G.sregsAlloc field,
2890 * (pic16_aopGet): in case AOP_STR, the compare to 'a' is changed to
2891 a compare of 'WREG',
2892 * (pic16_popGetTempRegCond): changed function prototype, now
2893 function takes also a bitVector argument v which holds the current
2894 set of registers that are allocated for stack access by aopForSym,
2895 registers allocated in aopForSym for accessing stack symbols are not
2896 any more part of the functions usedRegs field,
2897 * (genCall): some times aopOp is called for a stack variable to be
2898 send, aopForSym might perform the push, if this is true make sure
2899 that genCall doesn't push the variable twice by testing _G.resDirect,
2900 * (genFunction): changed testing for unspecified interrupt number
2901 from 256 to INTNO_UNSPEC,
2902 * modified selection scheme of frame pointer generation. Previously
2903 if function did use local registers a frame pointer was generated,
2904 now a frame pointer is generated only if function has arguments
2905 (that need PLUSW2 register access), or has stack arguments, or the
2906 compiler is not instructed to omit the frame pointer,
2907 * (genEndFunction): before restoring local registers that were saved
2908 in the function preamble, also restore the registers that *might*
2909 have been allocated for stack access,
2910 * (genRet): removed some old comments,
2911 * (genCmp, the active (RN's) version): added a call to the
2912 pic16_genCmp_special function to perform the compare with a more
2913 robust and optimized way,
2914 * (genInline): a feature has been added in inline code generation,
2915 which allows a wildcard variable substitution when writing inline
2916 assembly. Code is incomplete and experimental therefore undocumented,
2917 * (genCast): changed order of aopOp for result and right to allow
2918 aopForSym to directly load the result if possible,
2919 * src/pic16/genutils.c (selectCompareOp, pic16_genCmp_special): NEW,
2920 perform an optimized compare on some selected special occasions,
2921 * src/pic16/genutils.h: declaration of resolvedIfx structure from gen.c,
2922 * src/pic16/glue.c (pic16createInterrupVect): make sure we never
2923 generate an IVT any more,
2924 * src/pic16/main.c (pic16_optionsTable): added command line option
2926 * (_pic16_initPaths): when calling C preprocessor define pic18fXXXX
2927 macro too, when calling assembler define pic18fXXXX *and* __18Fxxxx
2929 * src/pic16/NOTES: Raphael Neider added in list of active developers
2930 * src/pic16/pcode.c (OPT_TYPE_STR): added strings jumptable_begin and
2931 jumptable_end to prevent bug #,
2932 * (pic16_pciADDWFC, ADDFWC, COMF, CLRF): added some missing flags in
2933 inCond and outCond fields,
2934 * src/pic16/pcoderegs.c (pCodeOptime2pCodes): add a fix for bug #,
2935 * src/pic16/ralloc.c (serialRegAssign): explicit set willCS to 0 to
2936 turn off register spilling,
2937 * (packRegsForOneUse): synced with other ports' versions although it
2938 is not used currently,
2939 * (pic16_packRegisters): added an optimization while reading
2940 structure bitfields, some registers may be saved (malloc code is
2941 decreased by 80 bytes)
2943 2005-03-12 Vangelis Rokas <vrokas AT users.sourceforge.net>
2945 * src/SDCCcse.c (cseBBlock): inside 'do operand lookup' loop test if
2946 left is a bitfield, if yes, then don't optimize assignment. Perhaps
2947 this can be optimized more?
2949 2005-03-10 Raphael Neider <rneider AT web.de>
2951 * src/pic16/gen.c (pic16_loadFSR0, genPackBits, genUnpackBits,
2952 genNearPointerGet): (hopefully) fixed access to bitfields via
2953 pointers (p->bitN = x; and x = p->bitN; failed)
2955 2005-03-09 Paul Stoffregen <paul AT pjrc.com>
2957 * device/lib/printf_fast.c: fix leading zero format, eg "%02d"
2959 2005-03-09 Raphael Neider <rneider AT web.de>
2961 * src/SDCCopt.c (killDeadCode): fixed bug #1156016
2963 2005-03-06 Maarten Brock <sourceforge.brock AT dse.nl>
2965 * src/SDCCicode.h: moved CRITICAL and ENDCRITICAL from SKIP_IC2 to SKIP_IC
2966 * src/mcs51/ralloc.c (willCauseSpill): added check for REG_BIT type,
2967 (regTypeNum): set REG_BIT type if necessary
2968 * src/mcs51/ralloc.h: added define REG_BIT, used to fix bug 1144613
2969 * support/regression/tests/critical.c: check bug 1144613
2971 2005-03-02 Raphael Neider <rneider AT web.de>
2973 * src/pic16/gen.c (genRightShiftLiteral): fixed bug #1154256
2975 2005-02-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
2977 * src/avr/ralloc.c (serialRegAssign),
2978 * src/ds390/ralloc.c (serialRegAssign),
2979 * src/hc08/ralloc.c (serialRegAssign),
2980 * src/mcs51/ralloc.c (serialRegAssign),
2981 * src/pic/ralloc.c (serialRegAssign),
2982 * src/pic16/ralloc.c (serialRegAssign),
2983 * src/xa51/ralloc.c (serialRegAssign),
2984 * src/z80/ralloc.c (serialRegAssign): fixed bug #1105154
2986 2005-02-22 Maarten Brock <sourceforge.brock AT dse.nl>
2988 * src/SDCCast.c (decorateType): fixed bug 1124787
2990 2005-02-20 Hubert Sack <sack AT digiplan.de>
2991 committed by Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2993 * src/mcs51/peeph.def: added peepholes 3.h-k and 132.a-f from
2996 2005-02-20 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
2998 * src/SDCCpeeph.def: new keyword "labelRefCountChange" which allows peepholes
2999 to keep the correct label reference count when adding/removing references
3000 to labels. A peephole file using this is appended to patch #1144962.
3002 2005-02-14 Raphael Neider <rneider AT web.de>
3004 * device/lib/pic16/libc/string/memccpy.c: changed 3rd argument to char
3005 * src/SDCC.lex (process_pragma): fixed to make disable_warning work for PIC16
3006 * src/pic16/gen.c (aopForSym, calls to pic16_aopOp): prevent unneccessary
3007 retrievals of result operand's value on assignment
3009 2005-02-13 Vangelis Rokas <vrokas AT otenet.gr>
3011 * device/include/pic16/string.h: modified prototype for memccpy()
3012 to memccpy(void *, void *, char, size_t)
3013 * src/pic16/gen.c (genFunction, genEndFunction): reenable if-case to
3014 check whether to omit frame pointer or not,
3015 * (genInline): convert all occurences of "\n" to LF in inline
3016 assembler blocks, this helps formatting the inline text,
3017 * (pic16_loadFSR0): modified prototype,
3018 * (genNearPointerGet, genNearPointerSet): reorganization of code,
3019 removed some 8051 legacy code,
3020 * (genPackBits): enabled handling bitfields exceeding one byte in size,
3021 * src/pic16/ralloc.c (pic16_assignRegisters): clear dynrIdx variable
3022 before allocating temporary registers in functions,
3024 2005-02-11 Maarten Brock <sourceforge.brock AT dse.nl>
3026 * support/regression/tests/bitvars.c: corrected the "fix"
3028 2005-02-10 Maarten Brock <sourceforge.brock AT dse.nl>
3030 * support/regression/tests/bitvars.c,
3031 * support/regression/tests/bitwise.c,
3032 * support/regression/tests/rotate.c: "fixed" problems on Alpha
3034 2005-02-10 Raphael Neider <rneider AT web.de>
3036 * src/pic16/pcode.c (assignToSameBank) : fixed cast to pointer of
3037 different size for Alpha
3038 * src/pic16/gen.c (genCmpEq) : improved compare with 0
3040 2005-02-09 Raphael Neider <rneider AT web.de>
3042 * src/SDCC.lex(doPragma) : save and restore warning options as well
3043 (also added new stack plus clone- and copyAndFreeSDCCERRG())
3044 * have #pragma less_pedantic set the errorlevel to WARNING
3046 * (cloneOptimize) : fixed wrong malloc's size
3047 * support/Util/SDCCerr.[ch] : made SDCCERRG globally accessible to
3048 facilitate correct handling of #pragma (save|restore)
3050 2005-02-09 Maarten Brock <sourceforge.brock AT dse.nl>
3052 * src/mcs51/gen.c: removed non-standard C nameless struct/union
3054 2005-02-04 Slade Rich <slade_rich AT users.sourceforge.net>
3056 * src/pic/gen.c : Fix for bugs #1080519 & #1115662.
3058 2005-02-03 Maarten Brock <sourceforge.brock AT dse.nl>
3060 * device/include/mcs51/c8051f120.h: added declarations for sbit port 2,3&4
3062 2005-02-02 Raphael Neider <rneider AT web.de>
3064 * src/SDCCast.c (processParms): disabled W_NONRENT_ARGS for pic16 port
3065 * src/pic16/gen.c (aopForSym): reenabled special case for function pointers
3066 * (pic16_storeForReturn): fixed to allow returning function pointers
3067 * (genPackBits): improved accessing full bytes, implemented for GPOINTERs
3068 * device/include/pic16/{stddef.h,stdbool.h}: added
3070 2005-02-02 Maarten Brock <sourceforge.brock AT dse.nl>
3072 * device/include/mcs51/c8051f040.h: added define CPT2_PAGE
3074 2005-02-01 Slade Rich <slade_rich AT users.sourceforge.net>
3076 * src/pic16/pic16.dsp : Added file graph.c to make it compile under windows
3077 * src/pic16/Makefile.bcc : Do not use this file but added file graph.c as it
3078 appeared to be required
3080 2005-01-31 Borut Razem <borut.razem AT siol.net>
3082 * support/scripts/sdcc.nsi: added include/asm/ds390, include/asm/mcs51,
3083 include/mcs51 and include/z80 directories to the package
3085 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3087 * src/hc08/gen.c (genFunction): fixed bug #1112752
3089 2005-01-30 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3091 * src/mcs51/peeph.def: adapted peephole 258.x to changed gen.c (genAnd)
3093 2005-01-29 Frieder Ferlemann <Frieder.Ferlemann AT web.de>
3095 * src/mcs51/gen.c (genAnd): accessing LSB/MSB by rotating acc
3097 2005-01-29 Maarten Brock <sourceforge.brock AT dse.nl>
3099 * device/include/Makefile.in: create/copy mcs51 and z80 include subdirs
3101 2005-01-27 Maarten Brock <sourceforge.brock AT dse.nl>
3103 * device/include/c8051fxxx.h: removed these 6 files
3104 * device/include/mcs51/c8051fxxx.h: added these 11 new files
3106 2005-01-26 Raphael Neider <rneider AT web.de>
3108 * src/pic16/gen.c (genAssign): fixed assignment from longs
3109 in codespace (were cut to three bytes)
3110 * (genDummyRead): implemented (except for CODESPACE...),
3112 * src/pic16/glue.c (emitStatistics): beautified
3113 * device/lib/pic16/libm/Makefile: added include path
3115 2005-01-26 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3117 * src/z80/gen.c (aopPut): fixed bug #1103902
3119 2005-01-25 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3121 * device/lib/expf.c: fixed bug #1095792
3123 2005-01-24 Vangelis Rokas <vrokas AT otenet.gr>
3125 * device/lib/pic16/libm: added Math library sources
3127 2005-01-24 Raphael Neider <rneider AT web.de>
3129 * src/pic16/pcode.h: added second memory operand to pCodeOpReg
3130 to enable upcast to pCodeOpReg2 (there is no type tag to
3131 differenciate the two and pic16_popGet2p cast into PCOR2)
3132 * src/pic16/main.c (_process_pragma): fixed another malloc bug
3133 (sizeof(sectNames) changed to sizeof(sectName))
3134 Both patches fix segfaults under MinGW.
3136 2005-01-23 Raphael Neider <rneider AT web.de>
3138 * src/pic16/{device.c,pcode.c}: s/free/Safe_free/g for
3139 Safe_[mc]?alloc()'ed variables
3140 * src/pic16/gen.c (pic16_aopOp,pic16_popGet): added handling
3141 of (byte sized) temporaries (assign them to WREG for now)
3142 * src/pic16/main.c (_process_pragma): fixed nasty malloc bug
3143 (used sizeof(set *sectSyms) instead of sizeof(struct sectSym)),
3144 this might fix SIGSEGVs on MinGW...
3145 * src/SDCCopt.c (killDeadCode): restored original behaviour
3146 (volatile operands might get thrown away though)
3148 2005-01-23 Vangelis Rokas <vrokas AT otenet.gr>
3150 * src/pic16/gen.c: fixed bug #1106975,
3151 * src/pic16/gen.c: fixed possible bug #1102572, now during TOS
3152 pointer update, INTCON is saved, global interrupts are disabled and
3153 restored after updateing TOS.
3154 * src/SDCC.y, src/SDCC.lex, src/SDCCsymt.c, src/SDCCsymt.h:
3155 * added function attribute 'shadowregs' to take advantage of shadow
3157 * added function attribute 'wparam' as an alternative to the wparam
3159 * support/Utils/SDCCerr.[ch]: added error E_SHADOWREGS_NO_ISR when
3160 user declares a non-ISR function as 'shadowregs',
3161 * doc/sdccman.lyx: updated to reflect recent changes of pic16 port
3163 2005-01-22 Vangelis Rokas <vrokas AT otenet.gr>
3165 * .version: bumped version number to 2.4.8
3166 * device/lib/pic16/pics.all: list of PIC18F devices supported by
3168 * device/lib/pic16/libio/i2c/: I2C module support library,
3169 * device/include/pic16/i2c.h: I2C support library header,
3170 * device/lib/pic16/libc/stdio/: standard IO support sources,
3171 * (printf_small.c): printf_small() source, supports float print,
3172 * (printf_tiny.c): printf_tiny() source, does not support floats,
3173 * device/lib/pic16/Makefile.common.in: added OPT_FLAGS macro to
3174 enable global optimizations for entire library source, other
3175 Makefiles in the source tree are also modified to reflect this,
3176 * device/lib/pic16/libc/stdlib/putchar.c (putchar): dummy putchar()
3178 * doc/sdccman.lyx: updated to reflect new changes,
3179 * src/pic16/gen.c (aopForSym): don't handle sym->iaccess in
3180 sym->onStack if-case,
3181 * src/pic16/main.c (_pic16_keywords): commented out keywords bit,
3182 sbit, idata, _idata, xdata, _xdata,
3183 * added pragma library, to link an external library, (see doc),
3184 * removed command line options, --pomit-config-words, --pomit-ivt,
3185 --pleave-reset-vector,
3186 * (pic16_finaliseOptions): when define macro SDCC_MODEL_{SMALL/LARGE}
3187 when calling assembler to reflect memory model used, also define
3188 macro STACK_MODEL_{SMALL/LARGE} when compiling and assembling to
3189 reflect stack model used,
3190 * src/pic16/ralloc.c (pic16_allocDirReg): when operand is allocated
3191 on stack return NULL,
3193 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3195 * src/SDCCopt.c (killDeadCode): do not throw iCodes away if one
3196 of the operands is volatile. Fixes #1020220
3198 2005-01-22 Daniel Winkler <post AT danielwinkler.de>
3200 * src/pic16/pcoderegs.c (pCodeOptime2pCodes): reenabled optimization
3201 * (OptimizeRegUsage): make sure that there is really no other flow where
3202 the first pCode is used
3204 2005-01-22 Raphael Neider <rneider AT web.de>
3206 * src/pic16/pcoderegs.c (pCodeOptime2pCodes): disabled optimization
3207 to fix #1106967 (pCode->seq are not set up correctly)
3209 2005-01-22 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
3211 * src/SDCCglue.c (glue): make sure code area is declared before the
3212 static initialization area.
3214 2005-01-21 Raphael Neider <rneider AT web.de>
3216 * device/lib/Makefile.in: fixed test for pic16 install dir
3217 * device/lib/pic16/*/Makefile*: modified compile flags to enable
3219 * doc/sdccman.lyx: updated banksel optimization, removed --flr-support and
3220 added --optimize-goto compiler switch and pragma wparam documentation
3221 * src/pic16/pcode.c (pic16_OptimizeBanksel): removed statistics dump
3222 * src/pic16/pcodepeep.c (pic16_pCodeOpCopy): fixed copying of WREG, PRODL
3223 and PRODH closing bug #1071770 (peephole optimizer)
3225 2005-01-19 Raphael Neider <rneider AT web.de>
3227 * src/SDCCglobl.h: ensure that PATH_MAX >= 2048 to guarantee
3228 cmdLine buffers (used when calling sdcpp...) are large enough
3229 (MAX_PATH=256 truncates arguments leading to system halts when
3231 * src/pic16/gen.c (pic16_sameRegs): relaxed size criterion
3232 * (genUminus): rewritten to for efficiency
3233 * (genNearPointer[GS]et): enforce reloading of FSR0 (was still
3234 used uninitialized in some cases)
3235 * (genCast): upcasting a 16bit int to a 24bit GPOINTER may not
3236 copy the third byte from the int -- now assumes 0x80 (data memory)
3237 * src/pic16/genarith.c (pic16_genPlus): fixed bug when swapping
3238 operands (genAddLit expects the iCode's operands to swapped as
3239 well), fixed leftover bytes (crashed for short left operands)
3240 * (pic16_genMinusDec): performance improvements, removed false
3242 * (pic16_genMinus): fixed to cope with differently sized operands
3243 * src/pic16/glue.c (pic16_glue): added new banksel optimization
3245 * src/pic16/pcode.c: implemented (first phase of) banksel optimization
3246 * src/pic16/graph.[ch]: implementation of directed graphs, used by
3247 new banksel optimization