On Sat, 2015-01-31 at 21:30 +0000, Alan Cox wrote:
> > AFAIR some users want to keep the second register set reserved for
> > interrupt handlers or syscalls. However once we have the more flexible
> > handling of iy we will be able to generate code like
> > 
> > add iy, de
> > adc hl, bc
> > 
> > for 32-bit additions.
> 
> That will certainly help in a few cases. I can understand why some users
> want to keep the alternate registers free, but for those who can use it
> the lack of them really hurts the 32bit code gen.
> 
> Alan

I admit to not having looked at the documentation for some time but
could sdcc not have a "reserve" switch.  A really powerful option would
be to have the compiler not use a register, or reserve a register set on
on a per arch basis depending on the switch options, this would apply
all the way through (IE compiler and optimiser).

I can see lots of problems, push all might get complex as it would
suddenly turn into push all except - or maybe pop all but backup and
restore this register register around it, the mind boggles ....

Probably an idea that is much much simpler to say than code :-)

Something like :
-reserve <register name(s) or set(s)>

The compiler would need the logic to cough out a "I cant do that" fairly
quickly if the user got ambitious though.

Cheers,
Jon

PS I think the compiler should have per op-code clock cycle knowledge
and macros for delays like the powerful but piss poorly documented
CCS-PIC C compilers [#use delay (clock=) and delay_ms macros]

Lots of useful things can be done with simple knowledge passed down the
chain from pre-processor to assembler.  Calibrated delays, estimated CPU
cost of ISR routines, accurate bit banged drivers written with generic
chunks of C etc.... but I guess that is just my personal wishlist ;-)








------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to