Jump to content
IGNORED

SDCC 3.5.0 released


PkK
 Share

Recommended Posts

SDCC 3.5.0 has just been released. Alan Cox' FUZIX has brought the Z80
suport in 3.4.0 a bit more into the spotlight, resulting in improvements
since, which also benefit ColecoVision developers.

 

A recent presentation on SDCC can be found at
http://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 Released
Date: Wed, 24 Jun 2015 11:55:29 +0200 (CEST)
From: Maarten Brock <sourceforge.brock@dse.nl>
Reply-To: sdcc-user@lists.sourceforge.net
To: sdcc-user@lists.sourceforge.net, sdcc-devel@lists.sourceforge.net

Hello 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 more
efficient function calls and better compability with z88dk
* --lospre-unsafe-read renamed to --allow-unsafe-read

And of course numerous feature requests and bug fixes are included as well.

Once again I hope you will enjoy using this new release.

Maarten Brock
SDCC 3.5.0 Release Manager

Link to comment
Share on other sites

  • 5 weeks later...

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 :o !, 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.c
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: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 by alekmaul
Link to comment
Share on other sites

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 by alekmaul
Link to comment
Share on other sites

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;

  • Like 1
Link to comment
Share on other sites

I don't understand your reply (certainly my request was not enough explicit :P).

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 by alekmaul
Link to comment
Share on other sites

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 :o !, 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 by PkK
Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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!
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...