Finally the new binaries are somewhat finished. You can download them now. This is a full release again; it is not based on any of the previous betas. The standard library (tigcc.a) is finished. All functions which were previously declared as hex arrays have been converted as well as those in tipatch.lib. This makes code somewhat larger because the target address is not known when assembling a function call, but when using multiple source files, these functions are only included once. Moreover, it will make the addition of new functions much easier. I need your help! All of these functions need to be tested, every single one of them. So if you use one of these functions in one of your programs, please rebuild and test on VTI or on the calculator. When you have tested a function, please add a reply to my post on the message board, whether the test was successful or not. Here is a complete list of all of the functions that still need to be tested (will be updated whenever I have time): assert, qsort, bsearch, atoi, atol, strtol, strtoul, ftell, fseek, fgetc, fwrite, fread, fgets, rename, unlink, sprite16, atexit, exit, rand, srand, realloc, calloc, puts, fputs, atof, push_longint, NoCallBack, kbd_queue, OSContrastUp, OSContrastDn, OSVRegisterTimer, OSVFreetimer, EV_getAppID, enter_ghost_space printf and fprintf are now real functions. This means that GCC can check if the specified format string and the arguments match. Of course GCC did not know about the TI-specific format identifiers, so I had to add them. I hope I didn't forget any, please tell me if I did. I implemented a new addressing mode proposed by Julien Muchembled: At first a base address is stored in a reserved register, then (almost) all other addresses are stored in relation to that one address. Since the assembler and linker only support relocation of direct addresses at link time, only one single source file can be used, and tigcc.a may not be linked to the project if this addressing mode is used. The switch for this is -freg-relative-reg, where reg is an address register which would otherwise not be used. Note that a0 and a1 are clobbered by function calls, a5 is used by OPTIMIZE_ROM_CALLS, a6 is the frame pointer (see -fomit-frame-pointer), and a7 is, of course, the stack pointer. I recommend a4. But anyway, only use this switch if you really want to do some hardcore optimization. This switch implies -ffixed-reg. And lastly, Thomas Nussbaumer's new flicker-less grayscale implementation is used now. Johan Eilert had the original idea for this, and Julien Muchembled implemented it in the latest release of Universal OS. |
|