SimpleIDE C Output Tokens or Native??
greybeard
Posts: 65
in Propeller 1
Does the C/C++ compiler generate/download native machine code or does it generate/download tokenized code aka SPIN tokens for the interpreter?
Just curious.
Just curious.
Comments
Wow! I didn't realize the LMM kernel was so large. A very basic LMM kernel can be implemented with just four instructions right? read from PC -> execute -> increment PC -> loop
What features is the above 4-instruction kernel missing that take up so much more memory?
That's a scary proposition. GCC is huge.... where would I even start? Or is there no short/easy answer to my question?
Having a C language target Spin bytecodes is something Parallax wanted to do a few years back. There are issues with unsigned numbers and other things so the idea was not to support all C features. It would have been a "not C" C like language. Mostly the forum did not like the idea.
Then we got Catalina and prop-gcc...
prop-gcc has it's own CMM code target for smaller code generation and the Prop II does not have the Spin byte code interpreter built in. So I guess targeting Spin byte codes is even less attractive.
I like it! P1v if nothing else I suppose. Would this allow more than 64 instructions in fcache?
Oh... right. Bummer
Jump and call (ways to modify the PC). Utility routines such as multiply, divide, count leading zeros. Useful constants like 0x0000FFFF. Fcache management functions. Not to mention that the PropGCC LMM kernel loop is unrolled so that we can execute 8 instructions before having to take the jump.
Overall I think the PropGCC LMM kernel is a bit over 1K in size, with the rest of COG memory available for FCACHE and user routines. The CMM and XMM kernels are much bigger, close to 2K each.
As David has mentioned, recent PropGCC releases overlay the LMM/CMM/XMM kernel with the BSS (uninitialized variable) and heap space, so the memory hit is minimal for most programs.
Eric