gnupic: Questions about SDCC PIC code gen
Subject:
Re: Questions about SDCC PIC code gen
From:
Scott Dattalo ####@####.####
Date:
22 Oct 2002 13:41:46 -0000
Message-Id: <Pine.LNX.4.44.0210220630210.19041-100000@ruckus.brouhaha.com>
On Tue, 22 Oct 2002, Rogier Wolff wrote:
> On Mon, Oct 21, 2002 at 09:51:40PM -0700, Scott Dattalo wrote:
> > This particular bug lies in the register allocation code. I've seen
> > several variations of this, but they all are about the same. Another
> > common bug that's lurking is with register paging. Both of these are at
> > the top of the list when I can get back to sdcc.
>
> Scott,
>
> Is there a workaround? Is there an optimization that we can turn off
> to prevent this from occurring? (-> Hint: optimizations need to be
> switchable, because sometimes you find out later that it's buggy in
> some situations!)
At the moment, the "options" are hard coded.
In src/pic/pcode.c:
/* Hardcoded flags to change the behavior of the PIC port */
static int peepOptimizing = 1; /* run the peephole optimizer if
nonzero */
static int functionInlining = 1; /* inline functions if nonzero */
int debug_verbose = 0; /* Set true to inundate .asm file */
And in src/pic/pcoderegs.c
int register_optimization=1;
---------
I wouldn't recommend dinking with these however. Their main purpose is to
inhibit portions of the code so that other portions can be debugged. For
example, if there is a problem with the flow analyzer, it can get
completely masked by the peephole optimizer.
Scott