PkK Posted June 24, 2015 Share Posted June 24, 2015 SDCC 3.5.0 has just been released. Alan Cox' FUZIX has brought the Z80suport in 3.4.0 a bit more into the spotlight, resulting in improvementssince, which also benefit ColecoVision developers. A recent presentation on SDCC can be found athttp://video.fosdem.org/2015/devroom-embedded/8bit_compiler.mp4 See below for the announcement with the list of the most important changes.Philipp-------- Forwarded Message --------Subject: [sdcc-user] SDCC 3.5.0 ReleasedDate: Wed, 24 Jun 2015 11:55:29 +0200 (CEST)From: Maarten Brock <sourceforge.brock@dse.nl>Reply-To: sdcc-user@lists.sourceforge.netTo: sdcc-user@lists.sourceforge.net, sdcc-devel@lists.sourceforge.netHello SDCC friends,Today a new release of SDCC was made. We are now at version 3.5.0.You can get it at:http://sourceforge.net/projects/sdcc/files/So what's new?* --disable-non-free configure option* Changed default language dialect from --std-sdcc89 to --std-sdcc99* Reorganized and updated manual* Reduced memory consumption (most noticeable for high--max-allocs-per-node)* Faster compilation for stm8 (most noticeable for high--max-allocs-per-node)* atoll() function for conversion of strings to long long* __z88dk_fastcall and __z88dk_callee calling conventions for moreefficient function calls and better compability with z88dk* --lospre-unsafe-read renamed to --allow-unsafe-readAnd of course numerous feature requests and bug fixes are included as well.Once again I hope you will enjoy using this new release.Maarten BrockSDCC 3.5.0 Release Manager Quote Link to comment Share on other sites More sharing options...
alekmaul Posted June 24, 2015 Share Posted June 24, 2015 thanks a lot for this release, will test it for my future releases on CV ! Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 24, 2015 Share Posted July 24, 2015 (edited) ok, I tested your last version (i used sdcc 3.3.0, not the 3.4.0).Here are some things I noticed :- it use less code, we can save more than 1K for some games !, that's really great and it seems to work well. I can't notice some changes with sdcc 3.3.0 (but it is certainly faster because of code saving).Example for RObeeBlaster : SDCC 3.3.0 : Area Addr Size Decimal Bytes (Attributes)-------------------------------- ---- ---- ------- ----- ------------_CODE 00008048 00006658 = 26200. bytes (REL,CON) SDCC 3.5.0 : Area Addr Size Decimal Bytes (Attributes)-------------------------------- ---- ---- ------- ----- ------------_CODE 00008048 000061B6 = 25014. bytes (REL,CON) - I still have this warning for bagman compilation but not for RobeeBlaster : sdcc -mz80 -c -I/colecodev//cvlib/include -I/colecodev/sdcc/include --std-sdcc99 --vc -I//bagman/ miscobj.cWarning: Non-connected liverange found and extended to connected component of the CFG:iTemp136. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp136. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp138. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp138. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp140. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp140. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp142. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp142. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp144. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp144. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp145. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp145. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp141. Please contact sdcc authors with source code to reproduce.Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp141. Please contact sdcc authors with source code to reproduce. Any idea about this warning, what does it mean ? Edited July 24, 2015 by alekmaul Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted July 24, 2015 Share Posted July 24, 2015 Any idea about this warning, what does it mean ? From what I've found with Google, PkK should know something about this... Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 24, 2015 Share Posted July 24, 2015 From what I've found with Google, PkK should know something about this... Lol, really. Perhaps he knows the author of this new version ! Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 26, 2015 Share Posted July 26, 2015 (edited) another question, i'm using structure with bit size specification like that : typedef struct { byte password[5]; // 0..4 level password byte bonus:3; // 5 bonus type (0..7) bbbbbttt byte nbbircks:5; // 5 nb bricks to destroy (0..31) } LevelStruct; bonus is 3 bit sized (so values between 0..7) and nbbricks 5 (values between 0..31). I want to define a const with such structure. const LevelStruct contentlevel[MAXAREA*MAXLEVEL] = { { "AAAA", 2 | (20<<3) , ... But what I tried to test to init the bit sized value, the compiler says : level.c(63) : warning 158: overflow in implicit constant conversion and of course, put 0 instead of the value in the constant. Someone has a solution regarding this problem ? Edited July 26, 2015 by alekmaul Quote Link to comment Share on other sites More sharing options...
digress Posted July 26, 2015 Share Posted July 26, 2015 I might try assigning password[5]; to a temp variable and use that inside temp=password[5]; typedef struct { byte thepassword:temp; // 0..4 level password byte bonus:3; // 5 bonus type (0..7) bbbbbttt byte nbbircks:5; // 5 nb bricks to destroy (0..31)} LevelStruct; 1 Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 26, 2015 Share Posted July 26, 2015 (edited) I don't understand your reply (certainly my request was not enough explicit ). I want to declare a global const table with this struct, not to assign vars for it. The struct is using 5 bytes for the password, and 1 another for bonus, nbbricks, not two bytes for them because I'm using 3 bits for bonus and 5 for nbbricks, so the compiler knows it can be join into only one byte. My goal is to assign const for that and I don't want to use variables and only this struct to define the const table.for all the levels. It works fine without bit declaration, so I think it is fesible, just need to find how .... The problem is only for the byte concerning nbbricks and bonus, not for the password. Edited July 26, 2015 by alekmaul Quote Link to comment Share on other sites More sharing options...
artrag Posted July 26, 2015 Share Posted July 26, 2015 Try "AAA",2,20 Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 26, 2015 Share Posted July 26, 2015 You're right, it seems to work, Compiler transforms the value into byte a1 which seems correct ! To easy for me to test that Thanks a lot artrag ! Quote Link to comment Share on other sites More sharing options...
PkK Posted July 29, 2015 Author Share Posted July 29, 2015 (edited) ok, I tested your last version (i used sdcc 3.3.0, not the 3.4.0). Here are some things I noticed : - it use less code, we can save more than 1K for some games !, that's really great and it seems to work well. I can't notice some changes with sdcc 3.3.0 (but it is certainly faster because of code saving). Example for RObeeBlaster : - I still have this warning for bagman compilation but not for RobeeBlaster : Any idea about this warning, what does it mean ? Normally, the live-ranges should be connected by the time they reach register allocation (non-connected ones should have been split). This problem does not affect correctness of the generated code, but it can force two variables to go to the same register, potentially resulting in slightly less efficient code. Philipp Edit: Two variables that, of course, are not alive at the same time. Edited July 29, 2015 by PkK Quote Link to comment Share on other sites More sharing options...
PkK Posted July 29, 2015 Author Share Posted July 29, 2015 another question, i'm using structure with bit size specification like that : typedef struct { byte password[5]; // 0..4 level password byte bonus:3; // 5 bonus type (0..7) bbbbbttt byte nbbircks:5; // 5 nb bricks to destroy (0..31) } LevelStruct; bonus is 3 bit sized (so values between 0..7) and nbbricks 5 (values between 0..31). I want to define a const with such structure. const LevelStruct contentlevel[MAXAREA*MAXLEVEL] = { { "AAAA", 2 | (20<<3) , ... But what I tried to test to init the bit sized value, the compiler says : level.c(63) : warning 158: overflow in implicit constant conversion and of course, put 0 instead of the value in the constant. Someone has a solution regarding this problem ? Your code tries to assign 2 | (20 << 3) into LevelStruct.bonus. LevelStruct.bonus cannot hold values that big, so something is lost when converting the constant 2 | (20 << 3) into a 3-bit bitfield. The result is 0. LevelStruct.nbbricks, on the other hand, does not have an initializer, and according to the C standard, is to be initialized to 0. So your code is correct C to initialize both LevelStruct.bonus and LevelStruct.nbbricks to 0. We still give a warning in SDCC, since we consider it quite likely that this is not what was intended by the author of the code. Philipp Quote Link to comment Share on other sites More sharing options...
alekmaul Posted July 29, 2015 Share Posted July 29, 2015 thanks for your replies Philipp, it is clear for me now. Quote Link to comment Share on other sites More sharing options...
newcoleco Posted September 4, 2015 Share Posted September 4, 2015 Thanks for improving a product already quite impressive. As I experiment with the compiler, I've not notice a huge size optimization in my projects but sure realise that my devkit needs to evolve to exploit its new features and improvements. Sad to say that "--oldralloc" is now buggy, so I'm no more using it. CC3 is using oldralloc as a quick way to compile source code by default. While trying each of my demo projects in the devkit, I've found this bug : My demo source code "Chateau du Dragon" returns an error only if using the oldralloc : "MAIN.C:390: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/ralloc.c' line number '1354' : isSymbolEqual (sym, OP_SYMBOL (IC_RESULT (ic)))". The line 390 is simply "pause();" just before the end of the "void bataille(void)" routine. So to avoid this error, I simply use instead the --max-alloc-per-node parameter instead with a small value (slider closer to Normal than Slow). Keep us infomed about your incredible work. Thanks a lot PkK! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.