atari email archive

a collection of messages sent at Atari from 1983 to 1992.

New greenhills c compiler.

(1 / 1)


There is a new version of greenhills 68000 c compiler (V1.7.17)
available on kim & charm.

To use it make the following definition:-

$ ncc:== $sys$sysdevice:[green.1v7v17]ccom.exe

This appears to produce better code than the old one (V1.7.1).
(It certainly fixes a number of bugs that have been found in the old one)

There are two optimise switches available in this version -o & -o2.
The first does some good things, the second will probably upset certain
things (like volatile variables etc). The documentation for the new version 
is in SYS$SYSDEVICE:[GREEN.1V7V17.DOC].

				*** WARNINGS ***

The only gotcha (that I know of) is that it will produce a call to ldivt
in the following case:-

/* generic case of assigning to a pointer to a short */
test()
{
short *a,b,c,d;
  *a= (b * c / d); /* this produces JSR ldivt */
}

The fix is :-

/* cast the whole of the right side of the expression to short */
test()
{
short *a,b,c,d;
  *a= (short)(b * c / d); /* this uses DIV */
}

I would be interested in getting feedback on changes in code size and speed
so I can tell greenhills.

	Any bugs let me know.
		Jim (x2827).
Message 1 of 1

Jul 10, 1985