From f755a86f5408ab034d4478f4a635612d1df9a00e Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Sun, 24 Feb 2008 19:32:38 +0000 Subject: [PATCH] * src/SDCCglue.c (printIvalBitFields): fixed bug 1806631 * support/regression/tests/bitopcse.c: removed hc08 exception, see testfwk.h * support/Util/MySystem.c (my_system): output errorcode when verbose, see bug 1533372 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5043 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 3 +++ src/SDCCglue.c | 11 ++++++----- support/Util/MySystem.c | 5 +++++ support/regression/tests/bitopcse.c | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index de4bd271..c6ed9cd4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ 2008-02-24 Maarten Brock * src/SDCCast.c (expandInlineFuncs): fixed bug 1875869 + * src/SDCCglue.c (printIvalBitFields): fixed bug 1806631 + * support/regression/tests/bitopcse.c: removed hc08 exception, see testfwk.h + * support/Util/MySystem.c (my_system): output errorcode when verbose 2008-02-22 Philipp Klaus Krause diff --git a/src/SDCCglue.c b/src/SDCCglue.c index c35f114a..af8c5999 100644 --- a/src/SDCCglue.c +++ b/src/SDCCglue.c @@ -704,7 +704,7 @@ void printIvalBitFields(symbol **sym, initList **ilist, struct dbuf_s * oBuf) (IS_BITFIELD(lsym->next->type)) && (SPEC_BSTR(lsym->next->etype)))) break; lsym = lsym->next; - lilist = lilist->next; + lilist = lilist ? lilist->next : NULL; } while (1); switch (size) { case 1: @@ -714,9 +714,9 @@ void printIvalBitFields(symbol **sym, initList **ilist, struct dbuf_s * oBuf) case 2: dbuf_tprintf (oBuf, "\t!dw !constword\n",ival); break; - case 4: /* EEP: why is this db and not dw? */ - dbuf_tprintf (oBuf, "\t!db !constword,!constword\n", - (ival >> 8) & 0xffff, (ival & 0xffff)); + case 4: + dbuf_tprintf (oBuf, "\t!dw !constword,!constword\n", + (ival >> 16) & 0xffff, (ival & 0xffff)); break; } *sym = lsym; @@ -1531,7 +1531,8 @@ emitOverlay (struct dbuf_s * aBuf) sym->rname, SPEC_ADDR (sym->etype)); } - else { + else + { int size = getSize(sym->type); if (size==0) { diff --git a/support/Util/MySystem.c b/support/Util/MySystem.c index 089b6b55..6aec20f9 100644 --- a/support/Util/MySystem.c +++ b/support/Util/MySystem.c @@ -321,6 +321,11 @@ my_system(const char *cmd) } e = system(cmdLine); + + if (options.verboseExec && e) { + printf("+ %s returned errorcode %d\n", cmdLine, e); + } + Safe_free(cmdLine); return e; diff --git a/support/regression/tests/bitopcse.c b/support/regression/tests/bitopcse.c index c99fa022..23f05712 100644 --- a/support/regression/tests/bitopcse.c +++ b/support/regression/tests/bitopcse.c @@ -16,7 +16,7 @@ # define UNSIGNED unsigned #endif -#if defined(TYPE_bool) || defined(SDCC_hc08) +#if defined(TYPE_bool) # define _data #else # define _data idata -- 2.39.5