From: Maarten B. <sou...@ds...> - 2006-09-25 19:56:56
|
Philipp, Sorry, I have no idea why. But maybe it's better to file this as a feature request for better optimization. Please include the used options (can I guess z80?) and attach some example code and generated asm. Unfortunately there is noone really maintaining the z80 port currently. I do some fixups from time to time, but mcs51 is more my territory. Greetings, Maarten > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I compiled a function where the first line of the function body is > const uint8_t text[128] = "Some text... > I supposed sdcc would put the string constant into ROM. I looked at the > generated assembly code. Sdcc takes memory from the stack and generates > code for the ssignment, 8 instructions per character from the string > constant! > If it's a global string constant it's put into ROM. > If it's a local, but static string constant, it's put into RAM, but the > code to initialize it needs only two instructions per byte. > > Philipp > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.5 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFFF+SmbtUV+xsoLpoRAtFCAKCad8TrA8FGDeilzN7TY9h3xQ1uRACg4dLq > v/9EiqtQOPoszgmBtTmIBaQ= > =xl+K > -----END PGP SIGNATURE----- > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user > |