English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 11 June 2018, 06:38   #1
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 3,157
IEEE-Libs for WinUAE or Amiga 68881/2 FPU

IEEE-libs for WinUAE or AMiGA 68881/2 FPU




IEEE-Libs v45.881 r14: Download


Changes in release 11:
=====================

Always set the rounding to extended precision round to zero.

Safer fallback to the original libs when no FPU is detected.
The fallback is only supported with PatchMSB or RemLib from
Thomas Rapp, but not with LoadModule, LoadResident or a ROM.

Removed the segment list pointer from the resident module to
make it possible to add these libraries to a custom ROM, but
this has not been tested and is not recommended, because if
these libraries are resident it's not possible to fallback to
the original AmigaOS libs when no FPU is found in the system.


Description:
===========

These libraries are translating all floating point function
calls directly into FPU instructions instead of doing integer
calculations as done by the original AmigaOS IEEE libraries.
In case that no FPU is detected, the original libs are loaded.


The standard installation, this is a safe setup:
===============================================

1) Copy c/PatchMSB to C:
2) Make a directory Libs:NoFPU
Copy your AmigaOS mathieeelibs to Libs:NoFPU ; as fallback
Copy the contents of libs/ to Libs:
3) Insert a line below SetPatch in your startup-sequence:

SetPatch QUIET
...
PatchMSB ; installs the same functions as in MSB-library
; remove all other patches for IEEE libraries
4) Reboot


Legal basis:
===========

My libraries and sources are freeware and freely distributable.
I don't give any warranties. You're using this software on your
own risk and you are responsible for any damage it might cause!

Last edited by AMIGASYSTEM; 28 June 2018 at 08:04.
AMIGASYSTEM is offline  
AdSense AdSense  
Old 11 June 2018, 16:14   #2
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,174
That are no news, that's 13 years old ... (just old wine in new bottles).
PeterK is offline  
Old 11 June 2018, 16:39   #3
Romanujan
Registered User
 
Join Date: Dec 2007
Location: Szczecin/Poland
Posts: 237
Name is confusing - till now I was sure they use some UAE-specific hacks
Romanujan is offline  
Old 11 June 2018, 17:45   #4
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,174
No, there is only the Pow(a, b)=a^b function left, which is a bit optimized for the PC FPU. Usually you would do e^(b*ln(a)), but the PCs don't have direct support for e^x and ln(x), thus I'm using 2^x and log2(x) instead, and these instructions are also directly available in the Amiga 68881/2 FPU.

All other PC specific "hacks", as once used in release 8, are functions in WinUAE for long. On the Amiga side all IEEE functions are translated into optimized 68881/2 FPU instructions, no other "hacks" are left. So you can use the MathLibsUAE also on a real Amiga with 68881/2 FPU. That was always possible, even with those r8 "hacks".
PeterK is offline  
Old 11 June 2018, 17:53   #5
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 3,157
Peter on AfA OS you advise to use them or I can make it pleasant

N.B. I posted the news because I had not found anything about the forun
AMIGASYSTEM is offline  
Old 11 June 2018, 18:04   #6
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,174
Yes, you can install them under AfA_OS as shown in my readme. AmiSh:t is doing that too.

Btw, you've made a nice mathlibs logo on ikir's italian news page, Carlo.
PeterK is offline  
Old 11 June 2018, 19:56   #7
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 3,157
Yes Peter I have already installed the libraries on AFA and they seem to be fine, for the logo or made a simple mixture. I'm not very good with graphics like my two sons now in their thirties, they started with DeluxPaint.

logo on ikir's, also Dual-Png icon

Last edited by AMIGASYSTEM; 19 July 2018 at 19:36.
AMIGASYSTEM is offline  
Old 11 June 2018, 21:54   #8
Kalamatee
Registered User

 
Join Date: May 2017
Location: Scotland
Posts: 41
Hello PeterK, I am currently fixing up some (soft) float related issues on AROS m68k, and would be interested in integrating something similar to your libraries in our IEEE libs.

Would you be interested in helping or allow the use of your code for such a thing?
Kalamatee is offline  
Old 11 June 2018, 22:50   #9
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,174
Hello Kalamatee,

how can I help you with my simple code? Most of the functions are just mapped to the FPU instructions. Only a few like Pow(), Floor() and Ceil() are based on my personal coding attempts. If you find anything useful for your IEEE libs, feel free to pick out whatever you need. In case that you don't understand some parts of my code or have doubt that it could work correctly, we could discuss the details per email if you like, since this is more a news thread here.

@AMIGASYSTEM
Thanks a lot for the nice icon. Ok, 30000 bytes of stack seems to be a little overkill, but that's on the safe side, for sure. I just don't know if the next release takes another 13 years before I can add your icon to the package.

Last edited by PeterK; 11 June 2018 at 23:15.
PeterK is offline  
Old 11 June 2018, 23:28   #10
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 3,157
Quote:
Originally Posted by PeterK View Post
Thanks a lot for the nice icon. Ok, 30000 bytes of stack seems to be a little overkill.

I did not insert the stack 30000, the system automatically generated it after the conversion of the two images png
AMIGASYSTEM is offline  
Old 28 June 2018, 08:05   #11
AMIGASYSTEM
Registered User
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Posts: 3,157
IEEE-Libs v45.881 r14 Update
AMIGASYSTEM is offline  
Old 28 June 2018, 18:48   #12
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,174
Shock!
I just noticed that accidentally I made a stupid little mistake in my IEEE DP compare function. I don't know wtf has driven me to replace a TST.L D1 instruction with OR.L D3,D1 ???

But then I checked the compare function for possible wrong results caused by this mistake, and I'm very glad now to realize that this "bug" seems to have no negative effects. It's still all ok.

Update: No, this small mistake is not even a bug as supposed, in fact it's a tiny optimization of the code. Some special cases are done a bit faster now.

Code:
Cmp                 TST.L          D2
                    BMI.S          minus
                    BNE.S          plus
                    TST.L          D3
                    BEQ.S          Tst       ; D2/D3=0 -> Tst
plus                SUB.L          D2,D0
                    BLT.S          less
                    BNE.S          more
                    CMP.L          D3,D1
                    BHI.S          more
                    BNE.S          less
                    RTS

                    CNOP           0,4

minus               TST.L          D0
                    BNE.S          skip
                    OR.L           D3,D1
                    BNE.S          more
                    BSET.L         #31,D0    ; D0/D1=0 -> -0
skip                SUB.L          D2,D0
                    BCS.S          more
                    BNE.S          less
                    CMP.L          D3,D1
                    BHI.S          less
                    BEQ.S          same
more                MOVEQ          #1,D0
                    RTS

less                MOVEQ          #-1,D0
                    RTS

                    CNOP           0,4

Tst                 ADD.L          D0,D0
                    BCS.S          lessi
                    OR.L           D1,D0
                    BNE.S          more
same                RTS

lessi               OR.L           D1,D0
                    BNE.S          less
                    RTS

Last edited by PeterK; 28 June 2018 at 19:43.
PeterK is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
WinUAE: Disable JIT/FPU AMIGASYSTEM support.WinUAE 11 30 November 2017 14:10
68881 FPU FMOVECR test Toni Wilen Amiga scene 3 06 August 2017 12:05
All MUI Libs for ALL flavours of Amiga are dated wrongly rockape support.Apps 1 22 December 2013 13:46
Possible WinUAE FPU Problem Ed Cruse support.WinUAE 2 01 November 2012 16:46
68881 Fpu Lord Aga support.Hardware 2 18 November 2011 21:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:04.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.10273 seconds with 15 queries