EJC (C-Compiler) experiments

Anything QL Software or Programming Related.
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: EJC (C-Compiler) experiments

Post by tofro »

ql_freak wrote:IF ALL ELSE FAILS, READ THE MANUAL!

Shame on YOU! No one answered me, that C68 is capable of creating reentrant code:

You might want to read back a few pages where I told you it can.

The problem is simply that the compiler tends to imtermittently crash when using this option. I couldn't make it run reliably in a larger project.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: EJC (C-Compiler) experiments

Post by ql_freak »

tofro wrote:You might want to read back a few pages where I told you it can.
Mea culpa I've missed your post:
tofro wrote:Q68 in fact has the option to produce position-independent code. It just doesn't work but rather crashes the compiler, at least in my experience. (If interested, have a look at the codemodel=small, datamodel=small and regdata=ax command line options)
BTW: The PDF manual for C68 on Dilwyns page is wrong, Tofro (above) is correct, the manual says

Code: Select all

codemode=small
        ^ (the 'l' is missing)
tofro wrote:The problem is simply that the compiler tends to imtermittently crash when using this option. I couldn't make it run reliably in a larger project.
Is really the compiler (c68) crashing or does the program just not run (or crashes), or another phase (e.g. as68 or ld) crashes? As the C68 manual states: YOU CANNOT USE codemodel=small and/ore datamodel=small with startup code and libraries from the C68 Development system. Especially for datamodel=small the startup code must initialize register a5 (all static data is addressed via a5). But with the library of EJC this should be possible (the startup code is no separate file in EJC but in the _link file of GST-linker the startup code is extracted from the library with "extract startup ejc_lib").


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: EJC (C-Compiler) experiments

Post by tofro »

It's the compiler crashing with an "internal error". I didn't use any libraries or startup code from C68 when I tried.


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: EJC (C-Compiler) experiments

Post by ql_freak »

Sad to hear, but at least we have the source!


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply