a friend of mine told me some days ago that the new netsurf 68k was asking for fpu.

i told him to run netsurf after snoopdos and we found that the new ixemul was that which asking for the fpu.

after a version check he realize that had the 68060 ixemul, but in his amiga has only a blizard030/50.

also if you have a ixemul without FPU support, the problem is today on Linux systems a FPU is standard and its most used.for example netsurf need it for CSS.and CSS layouting is a speed critical part.

we all know amiga have a fast floating point ffp format, the old Amiga Compilers support direct.But this need special compiled programs and translation code for data.because the format is not compatible to FPU format.

GCC do only support the software float format, that is compatible with the FPU.And this is slow.

so the result is, when you compile a program only for software float it get unusable slow.

see here thats the code for mul a single float.normaly a FPU can do that in 2 clocks.but this code need more than 80 clocks.thats around 40* slower.but if you not believe you can try a non fpu build of netsurf.the source is on aminet.

| float __mulsf3(float, float);

FUNC(__mulsf3)

SYM (__mulsf3):

#ifndef __mcoldfire__

link a6,IMM (0)

moveml d2-d7,sp@-

#else

link a6,IMM (-24)

moveml d2-d7,sp@

#endif

movel a6@(

,d0 | get a into d0

movel a6@(12),d1 | and b into d1

movel d0,d7 | d7 will hold the sign of the product

eorl d1,d7 |

andl IMM (0x80000000),d7

movel IMM (INFINITY),d6 | useful constant (+INFINITY)

movel d6,d5 | another (mask for fraction)

notl d5 |

movel IMM (0x00800000),d4 | this is to put hidden bit back

bclr IMM (31),d0 | get rid of a's sign bit '

movel d0,d2 |

beq Lmulsf$a$0 | branch if a is zero

bclr IMM (31),d1 | get rid of b's sign bit '

movel d1,d3 |

beq Lmulsf$b$0 | branch if b is zero

cmpl d6,d0 | is a big?

bhi Lmulsf$inop | if a is NaN return NaN

beq Lmulsf$inf | if a is INFINITY we have to check b

cmpl d6,d1 | now compare b with INFINITY

bhi Lmulsf$inop | is b NaN?

beq Lmulsf$overflow | is b INFINITY?

| Here we have both numbers finite and nonzero (and with no sign bit).

| Now we get the exponents into d2 and d3.

andl d6,d2 | and isolate exponent in d2

beq Lmulsf$a$den | if exponent is zero we have a denormalized

andl d5,d0 | and isolate fraction

orl d4,d0 | and put hidden bit back

swap d2 | I like exponents in the first byte

#ifndef __mcoldfire__

lsrw IMM (7),d2 |

#else

lsrl IMM (7),d2 |

#endif

Lmulsf$1: | number

andl d6,d3 |

beq Lmulsf$b$den |

andl d5,d1 |

orl d4,d1 |

swap d3 |

#ifndef __mcoldfire__

lsrw IMM (7),d3 |

#else

lsrl IMM (7),d3 |

#endif

Lmulsf$2: |

#ifndef __mcoldfire__

addw d3,d2 | add exponents

subw IMM (F_BIAS+1),d2 | and subtract bias (plus one)

#else

addl d3,d2 | add exponents

subl IMM (F_BIAS+1),d2 | and subtract bias (plus one)

#endif

| We are now ready to do the multiplication. The situation is as follows:

| both a and b have bit FLT_MANT_DIG-1 set (even if they were

| denormalized to start with!), which means that in the product

| bit 2*(FLT_MANT_DIG-1) (that is, bit 2*FLT_MANT_DIG-2-32 of the

| high long) is set.

| To do the multiplication let us move the number a little bit around ...

movel d1,d6 | second operand in d6

movel d0,d5 | first operand in d4-d5

movel IMM (0),d4

movel d4,d1 | the sums will go in d0-d1

movel d4,d0

| now bit FLT_MANT_DIG-1 becomes bit 31:

lsll IMM (31-FLT_MANT_DIG+1),d6

| Start the loop (we loop #FLT_MANT_DIG times):

moveq IMM (FLT_MANT_DIG-1),d3

1: addl d1,d1 | shift sum

addxl d0,d0

lsll IMM (1),d6 | get bit bn

bcc 2f | if not set skip sum

addl d5,d1 | add a

addxl d4,d0

2:

#ifndef __mcoldfire__

dbf d3,1b | loop back

#else

subql IMM (1),d3

bpl 1b

#endif

| Now we have the product in d0-d1, with bit (FLT_MANT_DIG - 1) + FLT_MANT_DIG

| (mod 32) of d0 set. The first thing to do now is to normalize it so bit

| FLT_MANT_DIG is set (to do the rounding).

#ifndef __mcoldfire__

rorl IMM (6),d1

swap d1

movew d1,d3

andw IMM (0x03ff),d3

andw IMM (0xfd00),d1

#else

movel d1,d3

lsll IMM (

,d1

addl d1,d1

addl d1,d1

moveq IMM (22),d5

lsrl d5,d3

orl d3,d1

andl IMM (0xfffffd00),d1

#endif

lsll IMM (

,d0

addl d0,d0

addl d0,d0

#ifndef __mcoldfire__

orw d3,d0

#else

orl d3,d0

#endif

moveq IMM (MULTIPLY),d5

btst IMM (FLT_MANT_DIG+1),d0

beq Lround$exit

#ifndef __mcoldfire__

lsrl IMM (1),d0

roxrl IMM (1),d1

addw IMM (1),d2

#else

lsrl IMM (1),d1

btst IMM (0),d0

beq 10f

bset IMM (31),d1

10: lsrl IMM (1),d0

addql IMM (1),d2

#endif

bra Lround$exit

Lmulsf$inop:

moveq IMM (MULTIPLY),d5

bra Lf$inop

Lmulsf$overflow:

moveq IMM (MULTIPLY),d5

bra Lf$overflow

Lmulsf$inf:

moveq IMM (MULTIPLY),d5

| If either is NaN return NaN; else both are (maybe infinite) numbers, so

| return INFINITY with the correct sign (which is in d7).

cmpl d6,d1 | is b NaN?

bhi Lf$inop | if so return NaN

bra Lf$overflow | else return +/-INFINITY

| If either number is zero return zero, unless the other is +/-INFINITY,

| or NaN, in which case we return NaN.

Lmulsf$b$0:

| Here d1 (==b) is zero.

movel a6@(

,d1 | get a again to check for non-finiteness

bra 1f

Lmulsf$a$0:

movel a6@(12),d1 | get b again to check for non-finiteness

1: bclr IMM (31),d1 | clear sign bit

cmpl IMM (INFINITY),d1 | and check for a large exponent

bge Lf$inop | if b is +/-INFINITY or NaN return NaN

movel d7,d0 | else return signed zero

PICLEA SYM (_fpCCR),a0 |

movew IMM (0),a0@ |

#ifndef __mcoldfire__

moveml sp@+,d2-d7 |

#else

moveml sp@,d2-d7

| XXX if frame pointer is ever removed, stack pointer must

| be adjusted here.

#endif

unlk a6 |

rts |