Welcome, Guest. Please login or register.

Author Topic: Which 68060.library?  (Read 15258 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline nicholas

Re: Which 68060.library?
« on: August 09, 2013, 05:15:43 AM »
Thor's 68060.library +MuRedox on my CS060 Mk2
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #1 on: August 24, 2013, 10:18:21 PM »
Quote from: matthey;746042
ThoR has released a fix for the Mu 68060.library FPU bugs:

http://aminet.net/util/sys/Mu680x0Libs.lha http://aminet.net/package/util/sys/Mu680x0Libs

My tests so far have shown it to be a successful fix. If any one has any problems with it then please send ThoR a report and/or post here.


Thanks for the heads up Matt, much appreciated.

Thanks to Thor too if you are reading this. :)
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #2 on: August 25, 2013, 12:15:28 AM »
Quote from: wawrzon;746133
in case there is anyone interested to check, perhaps there is any room to improve aros 680x0.library inparallel. sorry to sound like broken record but thanks to mattheys hint on the other thread a huuuge lag in aros graphics.library could be identified, hopefully to be fixed soon.


On a related note, does PeterK's icon.library work on AROS 68k?
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #3 on: August 25, 2013, 01:03:13 AM »
Quote from: matthey;746138
The newest versions should. Peter fixed a few things in the last couple of versions to get it working.


Oh good, that should make a big speed difference.  I need to create an AROS partition on my A3000 to test how it works on an 060 with PIV and generate some bug reports for the AROS team.

Hopefully over time we can all contribute a bit here and there in different areas depending on expertise and make AROS a fit successor to 3.x.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #4 on: August 25, 2013, 01:53:58 AM »
Quote from: wawrzon;746146
yes. and its quite a boost. ill try to roughly profile aros icon.lib against it next, after the bltbitmap issue is outta the way. perhaps it gives some results about critical parts, if need be to solve by asm inlines.


thats my hope, a fully open extended amiga os.


Yeah, what OS4/MorphOS should have been. :)

I think you already know about the 68k assembly dos.library/scsi.device/graphics.library etc replacements on EAB.

It would be great if these things could be merged into the AROS 68k source tree if possible, obviously where it makes sense to do so for performance and compatibility reasons.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #5 on: August 25, 2013, 01:58:41 AM »
Quote from: wawrzon;746147
alas its till not within reach, and even if i had any influence upon that there are technical issues in its way. it has been discussed again and again. i fear we have to leave with it for now except someone will suddenly emerge who will take care of it.


I spent the best part of two days modifying a small tool I wrote in C for MorphOS with GCC4 to also compile without complaint with VBCC for MorphOS, VBCC for 68k and SAS/C 6.58 for 68k.

It was a very labourious (though actually quite interesting) excercise so I can't even begin to imagine the mammoth size task it would take to modify the source tree of an entire operating system to compile with something other than GCC!
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #6 on: August 25, 2013, 02:49:06 AM »
Quote from: matthey;746153
AROS was suppose to avoid the GCC-isms but it's not the easiest thing to do. My understanding is that there are only a few but that they are heavily used and difficult to avoid. The new version of vbcc will have improved C99 support and many bug fixes which should help compatibility with GCC. AROS vbbc support will take some sitting down by the brains behind AROS with Frank Wille to come up with some solutions. Vbbc has some advantages over GCC that I think will become more apparent soon. It is more portable because it's small and has less compiler dependencies. I can compile vbbc with vbbc on my 68060 Amiga in a couple of hours. I can't imagine doing that with GCC. The other advantage is that it doesn't use double memory indirect addressing modes. There are some 68k fpga processors being created that would prefer to drop these addressing modes (with a new 68k ISA hopefully). Vbbc (and vasm) will need less modifications and be easier to add support for these new enhanced 68k fpga processors.


I really like vbcc, it's very fast at compiling and produces well performing binaries on both 68k Amigas and MorphOS. It has a lot of potential and Frank really looks/sounds like he knows what he is doing and seems very passionate about his work which shows quite clearly in the end product.

For 68k code, which would you say currently creates the best performing binaries; SAS/C, GCC2, GCC3, GCC4 or VBCC?

In particular which produces binaries that perform best on an 060. Any particular recommended compiler switches?

One thing I like about GCC from v4.2 upwards is "-march=native" which detects the host machine's capabilities and automatically switches on the best flags for it. Combined with -O2 it creates very well performing binaries.

I don't know if vbcc has something similar?

/Sorry for derailing the thread everyone.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #7 on: August 25, 2013, 03:06:30 PM »
Quote from: matthey;746164
Frank is amazing! He deserves an award for his Amiga support. The nice thing is that he is not biased and supports everything Amiga. You get the best tech support in the world with Frank and it's free. He's a pretty good programmer too ;).

Yeah he's one of the Rock Star Coders of the Amiga scene for sure! :)


Quote
I think the unofficial Amiga version of GCC 2.95.3 is the best for most code. It's not the most advanced with optimizations or features but it generates consistently better than average code with few bugs. The unofficial Amiga version of GCC 3.4.0 is more advance and sometimes faster but it has a few bugs, some of which affect optimization. It's code quality can vary a lot but is generally average overall. Vbcc code quality is about on par with GCC 3.4.0 but can vary a lot also. It does some very advanced optimizations but then other generated code is obviously poor (but usually still works). Vbbc does use Frank's vasm which is the ultimate peephole optimizing assembler. It helps a lot and would benefit the other compilers if used. SAS/C is an old mature compiler. It's not advanced but the basic code generation is solid with few bugs. Some of the library link code is not the best for new processors like the 68060. Most of the classic AmigaOS is written with SAS/C so it can't be too bad but it's still pretty average code generation quality IMO. The early GCC 4.x versions generated poor 68k code. Supposedly the newest versions of GCC are better.

Thanks for the info, very useful.  Regarding the Amiga OS, what about 3.5 and 3.9?  Do you know whether H&P used their own atrocious StormC 3 compiler or GCC/StormC 4 or even SAS/C?


Quote
That's a tough call. No compiler really does much to optimize for the 68060. A good instruction scheduler would do wonders for the 68060, especially with mixed integer and FPU code. Frank mentioned something about Volker adding an instruction scheduler but I wouldn't expect anything soon. I did improve the 68060 integer 64x64=64 vclib code which is about twice as fast as GCC 3.4.0. Vbcc will be getting a m060.lib for the FPU that I have been working on and some more optimal and bug fixed FPU code in the backend, but the direct FPU support is still pretty raw. It will take some time to iron out bugs. Vasm optimizes double and extended precision fp immediates down if possible. This saves a lot of code and a few cycles. GCC still doesn't do this. GCC FPU generated code since 2.95.3 has been ok with less bugs than vbbc. The older versions of GCC use trapped instructions and don't support the 68060 as well. Some of the GCC 3.4.0 FPU code is slow as it uses the IEEE math libraries too much. The 68040 received pretty good support in GCC unlike the 68060, probably due to the 68k Macintosh.

I'm hoping that the recently ressurected 68k branch of Debian will lead to better 060 code generation from GCC4.

Quote
No. Vbbc doesn't have anything like "-march=native" although it wouldn't be that difficult to add an option that looks at the Amiga SysBase->AttnFlags (I added an option like that in my version of the ADis disassembler). It also doesn't have any options for selecting a range of processors. However, using "-cpu=68060 -fpu=68060" and linking with the new "-lm060" should generate code that is optimized for the 68060 but works well on the 68020-68060 CPU and 68881-68060 FPU. Most 68040 programmers will want to link with "-lm060" or "-lmieee" instead of "-lm040" due to the greatly reduced precision of some functions on the 68040 because of the lack of FINT/FINTRZ (huge design mistake). My plan for the "-lm040" library is to provide high speed low precision functions without trapping. The current m040.lib is a combination of low precision and trapped FINT/FINTRZ. I've just made it more consistent. Vbbc generates much better quality code already with "-O1". It's usually an improvement to use "-O2" but not always. "-O3" didn't do much on the 68k in my experience. Some of the higher level optimizations are still not implemented for the 68k. The new version of vbbc will generate SAS/C style debugging info with the "-g" option on the 68k Amiga. This allows source level debugging with powerful gui debuggers like BDebug (Barfly) and CPR (SAS/C).

That would be very handy, I've not really had any experience with Ralph's Barfly or it's GUI debugger but I do like the SAS/C debugger as it "just works".  Well, most of the time anyway. lol

Thanks again for the info, it's always an educational experience for me when you answer any questions I have about Amiga stuff. :)

Slightly OT question, but would your CopyMem routines be a good fit to merge into the 68k AROS source?  I imagine they'd speed it up a great deal.

I asked Matthias Henze who wrote the HSMathLibs if he'd consider donating the source for his libs to the AROS team because he doesn't get many registrations these days (Though I tell everyone I can to buy them) but he didn't reply to that specific question so I took it as a no.

It's a shame, as there are quite a few performance patches for 68k machines that if the source were donated to AROS could be included in the OS by default and make 68k AROS a much better experience than it currently is.

The WarpDT datatypes come to mind as a random example.
« Last Edit: August 25, 2013, 03:10:35 PM by nicholas »
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #8 on: August 25, 2013, 03:08:35 PM »
Quote from: wawrzon;746186
i once have benchmarked the same machine with aibb under aros and genuine kickstart for comparison and the results in most areas were the same. how would that be if gcc4.6.2 (this is the currently used version i guess) was so bad overall?

my impression is that you cant blame the compiler for aros performance flaws. its design decisions, missing, not efficient or simply wrong code, all that to be found and fought one by one.


Well you can't blame the compiler for design flaws within AROS but a better optimizing compiler is always a good thing to have/wish for. :)
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #9 on: August 25, 2013, 04:13:03 PM »
Quote from: bbond007;746216
No 68060.library.
I just run dual 68030 libraries ...


Yeah, from what I understand it doesn't really emulate an 060 it just shows  the CPU to the emulated Amiga as an 060 but the missing instructions from the previous CPU models are still there so the 060 libs aren't needed.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #10 on: August 25, 2013, 07:13:01 PM »
Quote
All my Amiga code is free with sources available. The AROS devs have my code and I expect some of it has been integrated in some form. If we can't revive the Amiga then it's not going to do anyone any good.


Amen to that! :)
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #11 on: August 27, 2013, 07:39:03 PM »
Quote from: Crumb;746432
@ThoR

hi! have you ever planned opensourcing your MMU.library & tools? I guess it could be a great addition to AROS and would probably bring some new life to our classics :-) Maybe somebody like Matthey could add some improvements, who knows.

+1 to ThoR's stuff being in AROS.

Wawrzon mentioned that Matt's ultra-fast 060 CopyMem routines are already in the AROS m68k Setpatch.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #12 on: August 27, 2013, 07:54:43 PM »
Quote from: wawrzon;746438
most what i ever needed thors 060 and mmu libraries was his muforce. now, aros (68k) has already both 060 library functionality (within the 680x0.library, based on the same open sources all other 060 libs are based on) and enforcer functionality to be turned on/off at boot time. that said having thor as consultant on above matters (and more) would certainly be quite a gain for aros team. but i doubt he has enough time and interest, especially his doubt afair was always if aros can become compatible enough.

With PeterK's icon.library, Matt Hey's CopyMem routines, ThoR's stuff, Mathias Henze's HSMathLibs and Oliver Robert's WarpDT datatypes, AROS m68k would be much better than it is now.

It's a shame the dos.library/scsi.device/graphics.library stuff on EAB can't be used as they are Resourced from the copyrighted CBM versions. :(
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #13 on: August 27, 2013, 08:24:55 PM »
Quote from: wawrzon;746445
im not sure if peter.k icon lib wasnt resourced as well, only that the complete code has been replaced. now i dont know what the situation legally is. however as the work was not based on any sources, only on reverse engineering of binary and since the current library does not contain copyrighted code its okay i guess.

its possible to use this library anyway and it gives nice speedup.

what concerns math libs i have never been sure how much do they improve upon genuine ones. at least integer wise aros is currently on the same level as aos afair. have to check for fp.

as for warp datatypes these are commercial, you can surely use them under aros 68k as you do on aos, no doubt, you just need to buy them.

all in all there are few aspects aros has serious performance problem. one of them has just been traced doen to a particular function within graphics library, seems toni has problems to improve it though. i will try to make it more public on the dev list.


Perhaps Ratte & Cosmos might be abe to help with the graphics.library problem?
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline nicholas

Re: Which 68060.library?
« Reply #14 on: August 27, 2013, 10:15:34 PM »
Quote from: Thomas Richter;746459
You just found another defect in my defect-enough A2000... )-: Real-time clock battery is dead. (Despite the already known defects of the disk drives being dead, the CDRW being dead and the omniscsi/GVP scsi card being defunct).


Time to clone the drive to a WinUAE setup now that it has 68060 and MMU emulation? :)
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini