PedroM v0.81 Released
Posted by Michael on 3 December 2005, 06:33 GMT
Everyone's favorite operating system for 68k calculators, PedroM, has just been updated to v0.81. This version adds support for the TI-89 Titanium and Voyage 200, fixes bugs, and improves many features which are too numerous to list here. There is still no CAS yet, but Patrick Pelissier informs me that one may eventually be released as an external application.
|
|
Reply to this article
|
The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.
|
|
Re: PedroM v0.81 Released
|
CajunLuke
(Web Page)
|
Sweet. I just put Ubuntu on my iBook, this could make me that much coler to open-sourcing everything. Ah, well. If only it could dual-boot.
|
Reply to this comment
|
3 December 2005, 08:52 GMT
|
|
Re: PedroM v0.81 Released
|
KermMartian
(Web Page)
|
Pix in file page borked.
Great, this is an excellent step towards leaving behind the inefficiently-design TI-OSes!
|
Reply to this comment
|
3 December 2005, 11:29 GMT
|
|
ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
I have a patched version of PedroM on my site which:
1. is built with the TIGCC linker (ld-tigcc), not with an obsolete "maketib" hack,
2. is really fully GPL. PpHd's build includes non-Free components.
http://p080.ezboard.com/ ftichessteamhqfrm10. showMessage?topicID=186.topic
(remove the spaces)
|
Reply to this comment
|
4 December 2005, 00:19 GMT
|
|
|
|
|
|
|
|
Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
Hmmm, each time I think of something more I should have added (and sorry, there will be 2 posts because of the size limit):
The maketib hack is the main reason why PedroM is constructed in the horrible, non-scalable way it is built, i.e. including all source files into the main source file. Normally, you'd use separate compilation, but that means using more than one object file and hence requires a real linker. Due to that design, together with the lack of linker optimization support, PedroM has come to rely on the order of source files in the top-level source at several places (mainly through the use of .w or .b references to external symbols) making it really hard to change anything, which is why I'm saying the approach doesn't scale. And I know what I'm talking about! I tried to adapt PedroM for separate compilation more than once, and each time I ran into issues like that. Even just separating the startup section from the main section (a Flash OS naturally has 2 sections due to TI's memory layout) turned out to require so many changes (which PpHd refused to merge) that I dropped it once A68k's line limit was no longer an issue (I made the change so the files would stay below the line limit, and was successful at that).
|
Reply to this comment
|
4 December 2005, 04:37 GMT
|
|
|
|
|
|
|
|
Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
Really, the ld-tigcc port I did was just the easy part, the real work would be to redesign PedroM so it actually makes use of ld-tigcc's features, i.e. to compile each .asm file separately, and to stop hardcoding reference sizes and rely on linker optimization instead. Unfortunately, I don't think we can expect much (if any) support from PpHd for that. He doesn't care about his programs being easy to modify, indeed I think he'd rather we didn't modify them, despite the licensing. So everything is harcoded. He knows how big each reference should be (and even that isn't true, ld-tigcc caught some references in PreOs that should have been optimized, he might have fixed that since though), so he expects everyone else to know that too, rather than having the linker decide it automatically (and with separate compilation and section reordering, only the linker can know the correct size anyway).
|
Reply to this comment
|
4 December 2005, 04:37 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
> 1. I would use ld-tigcc when flashos.a is a part of tigcc , and not an external file to install.
Why is that so important? Is it so hard to download a ZIP file? I'm not planning to include flashos.a with TIGCC because 99.9% of our users will never need it. And if it ever grows (due e.g. to hardware initialization startup code which could be imported with one line of ASM), it will mean users would have to get a large file they'd never use. Why force them to download something they won't use?
> 2. I do a much better job than the linker in order to reduce branch size.
I doubt that! The linker reduces all branch types to the minimum possible with a certain ordering (well, almost... it's actually the minimum possible without optimizing more than one branch at once, but that rarely matters), and it can even reorder the sections (of course, this assumes there is more than one, i.e. you'd have to add section separators to your sources and/or separate them into several object files) to achieve a better ordering (not 100% optimal because that would require exponential (even superexponential in my computations) effort, but probably better than you'll ever be able to). As I said, ld-tigcc already caught some suboptimal references in PreOs at some point.
|
Reply to this comment
|
4 December 2005, 10:54 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
PpHd
(Web Page)
|
>And if it ever grows (due e.g. to hardware initialization startup code which could be imported with one line of ASM),
Why do you plan to include such a thing? It seems a bad idea. An OS is not a program: it must do its initialization stuff itself!
>Why force them to download something they won't use?
So, could you please remove this IDE I never used in tigcc? It is far bigger than flashos.a
>I doubt that!
Well, I do function reordoning, and function merging, what the linker can't do, first. I use more hacks to allow branch size reduction that the linker do (and some are not usable at link time).
>As I said, ld-tigcc already caught some suboptimal references in PreOs at some point.
Are you talking about PreOS or PedroM?
>ot 100% optimal because that would require exponential (even superexponential in my computations) effort, but probably better than you'll ever be able to
Are you sure you can't use a better algorithm than a superexponential?
>but probably better than you'll ever be able to
Prove it.
|
Reply to this comment
|
4 December 2005, 19:16 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
> >And if it ever grows (due e.g. to hardware initialization startup code which could be imported with one line of ASM),
> Why do you plan to include such a thing? It seems a bad idea. An OS is not a program: it must do its initialization stuff itself!
To make OS development easier. All non-buggy OSes have to do a certain amount of initializations, it would be nice to have this by default. There could also be defaults for the interrupt vectors, or at least a startup section with pointers to interrupt vector symbols which then have to be defined in "user" code. My ideal is that everything which absolutely does require assembly is provided as a startup section, making it possible to write a Flash OS entirely in C.
> >Why force them to download something they won't use?
> So, could you please remove this IDE I never used in tigcc? It is far bigger than flashos.a
:-)
What about KTIGCC (the Linux IDE)? Will you use that one?
> >I doubt that!
> Well, I do function reordoning, and function merging, what the linker can't do, first.
The linker can do function reordering if you define a section per function as GCC does (with -ffunction-sections, which is now set by default in the IDE for new projects and recommended as a command-line option, along with -fdata-sections). The section reordering algorithm does that. You're right that it can't do any sort of code factoring (such as what you call "function merging") though.
> I use more hacks to allow branch size reduction that the linker do (and some are not usable at link time).
Hacks are bad. ;-)
|
Reply to this comment
|
5 December 2005, 03:51 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
> >All non-buggy OSes have to do a certain amount of initializations, it would be nice to have this by default.
> But it may change due to HW change.
That's exactly the point, stuff which may change with a hardware change should be in the common startup code rather than requiring each and every OS to be updated. If it's in flashos.a, just rebuild with the new flashos.a and you're all set.
> >My ideal is that everything which absolutely does require assembly is provided as a startup section, making it possible to write a Flash OS entirely in C.
> It is a non sense. At least, the Flash part, the battery part, the extinction part need to be written in assembly.
Which is all common (independent of the actual OS), hardware-interfacing stuff that should be in flashos.a.
|
Reply to this comment
|
5 December 2005, 10:25 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
> 3. Except the C files, which I don't want to modify (That's the references ld-tigcc is able to optimize).
There are no C files in PreOs and still there were references which it could optimize.
> 4. I don't think it is hard to modify. Just modify. If the assembler failed due to a branch size problem, just edit the source, and reassemble. Not so hard.
That will still leave tons of references which just happen to fit with the current section ordering and will come back to bite you later. And besides, even that is tons of work. There's tons of bsr's or even bsr.b's to other source files in PedroM, and there's also the occasional x(pc,dn) addressing which is particularly annoying. With linker optimization, you just write jsr (or jbsr in GNU as), and ld-tigcc will figure the size out automatically. If you absolutely must have a jsr (e.g. because you're copying the code into RAM), write jsr (label).l and it will be honored (this has been like that since I added support for unoptimizable relocs - I'm not introducing TIGCC extensions into object file formats without a good reason!).
> 5. I don't know how big the reference are, but I know a68k complains if it is too small.
That only works as well as branch optimization in A68k works, which is even worse than in ld-tigcc! If you rely on that, there's no way you'll get a better result than just letting ld-tigcc do it. All references A68k can flag or optimize, ld-tigcc can flag and optimize too! And of course, the checks in A68k only work if the references are within the same file (yes, "include" counts as "in the same file", and no, doing this is not a good idea, that's what separate compilation is for). I think you're underestimating the power of linker optimization.
|
Reply to this comment
|
4 December 2005, 10:55 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
PpHd
(Web Page)
|
>There are no C files in PreOs and still there were references which it could optimize.
Which one? I know of a reference I can't optimize due to options (hw2tsr or not?).
>That will still leave tons of references which just happen to fit with the current section ordering and will come back to bite you later
Let's fix them when they came out. Not so hard.
>There's tons of bsr's or even bsr.b's to other source files in PedroM,
Are you sure? I don't think so.
>there's also the occasional x(pc,dn) addressing which is particularly annoying
What can I use instead in order to the linker to optimize it so that it is as small as x(pc,dn)?
>if you absolutely must have a jsr (e.g. because you're copying the code into RAM), write jsr (label).l
That's allready the case. Otherwise your ldtigcc's build wouldn't work.
>I think you're underestimating the power of linker optimization.
Well, GCC semms to change their mind, and wants to do all the compilation at link time to perform better optimization. Not so different that including all the source files inside one file and compile it. See GCC ML for details.
>That only works as well as branch optimization in A68k works,
I was talking about assembly failure, not the ability to a68k to optimize a branch.
|
Reply to this comment
|
4 December 2005, 19:24 GMT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Re: Re: Re: Re: Re: ld-tigcc build, 100% GPL
|
Kevin Kofler
(Web Page)
|
> Which one? I know of a reference I can't optimize due to options (hw2tsr or not?).
That was at the time I was working on Iceberg, maybe it has been fixed since.
> Let's fix them when they came out. Not so hard.
I think that's not that good an idea, but it's probably the best we can do.
> >there's also the occasional x(pc,dn) addressing which is particularly annoying
> What can I use instead in order to the linker to optimize it so that it is as small as x(pc,dn)?
Well, don't use that across files (nor sections, if you start defining multiple sections per file). ;-)
If stuff has to be near in the object code, it'd better be near in the source code too!
> >if you absolutely must have a jsr (e.g. because you're copying the code into RAM), write jsr (label).l
> That's allready the case. Otherwise your ldtigcc's build wouldn't work.
I just turned off all the linker optimization because it broke things due to that issue. Maybe I should try to turn it on again. But it's not very useful anyway unless I turn on range cutting, which in turn forces me to fix your abuses of address differences (stuff like (label1-label2)/4).
> >I think you're underestimating the power of linker optimization.
> Well, GCC semms to change their mind, and wants to do all the compilation at link time to perform better optimization. Not so different that including all the source files inside one file and compile it. See GCC ML for details.
That only shows to me that they have realized how much the linker can do to optimize things. :-)
> I was talking about assembly failure, not the ability to a68k to optimize a branch.
Oh, sorry, I was assuming you're talking about a68k -f. Anyway, you can count on ld-tigcc to optimize branches properly (if you have branch optimization and range cutting turned on).
|
Reply to this comment
|
5 December 2005, 04:00 GMT
|
|
1 2
You can change the number of comments per page in Account Preferences.
|