From: Sandeep D. <sa...@dd...> - 2001-03-19 03:46:36
|
This is a really interesting experiment. Could you send me your project in a zip file, so I can play around with the code generation ? Sandeep -----Original Message----- From: sdc...@li... [mailto:sdc...@li...]On Behalf Of Karl Bongers Sent: Sunday, March 18, 2001 7:14 PM To: sdc...@li... Subject: [sdcc-devel]mcs51reg.h/spillage Hi everyone, Its me again, your friendly troll. Bela, one last comment on the universal .h file: Maybe it is a great idea ahead of its time! And I don't see why we have to decide one way or the other, as your .h file is just one file, its not like it is cluttering up the include directory. Can we just keep both methods? Redundant simple .h file for the old and in the way, and the universal header for the young and the restless. Anyway, I did a neat hack to look into solving the mcs51 large model spillage thing, and I want to run it by all of you for ideas(Thanks Scott for your input). Heres my hack: I took a copy of ds390 code and turned off the flat24 stuff reverting it back to mcs51, but keeping the dual dptr stuff. Dropped this in the mcs51 directory and rebuilt. My TINI app then recompiled(large model) with about an 80% improvement in spillage. I guess I'm just missing some switches in the base compiler code to get the remaining 20% spillage sent to XDATA space. For the most part my app ran fine and the experiment was a success. So, this is great for processors with a dual DPTR. I don't think the gen.c code has too much else that is ds390 specific, but I'm not positive. I am wondering if it will be possible to come up with some code for mcs51 cores without a dual DPTR which will provide the same functionality. Perhaps some code to push and pop the current DPTR, or somehow swap the current DPTR into a set of registers. Maybe the other register banks can be used for this purpose. So gen.c would use a dual dptr if one was present, otherwise it would add code to fake one. A big question is how to structure this. You could combine the ds390 code back into the mcs51 code and make a universal set, adding in even more code(and complexity) to support a non-spilling version of the large model. Or we could add a third port, and call it the mcs51Big or something. We wouldn't have to rip out the existing large model in mcs51, mcs51Big could be another port or just considered experimental", for a while. But it would be good to figure out a long term direction at some point.. For now I'm just gonna tar up this experiment and throw it on my web site in case anyone wants to mess with it, its here: http://www.turbobit.com/sdcc.htm cheers, karl. _______________________________________________ sdcc-devel mailing list sdc...@li... http://lists.sourceforge.net/lists/listinfo/sdcc-devel |