Port-vax archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Does anyone have a netbsd-5 or earlier VAX to hand?



On May 24, 2012, at 3:01 PM, David Brownlee wrote:

> If so, could they run this and check the output?
> 
> Its crashing under NetBSD/current  6.99.7 in
> lib/libm/arch/vax/n_argred.S, and I'm just curious when it
> started being an issue - of if NetBSD/vax has never been
> able to calculate the sin of 1 :)
> 
> 
> /* sintest.c: output sin(1) - crashing on NetBSD/vax current
>  cc -Wall -g -o sintest sintest.c  -lm && ./sintest
> */
> #include <math.h>
> #include <stdio.h>
> 
> int main()
> {
>    double test = sin((double)1);
>    printf("test=%lf\n", test);
>    return 0;
> }

OK.  Crashing on what instruction?  There is no polyd/polyf in libm anymore.

  39:   b1 8f 80 24     cmpw $0x2480,r1
  3d:   51 
  3e:   19 02           blss 42 <__libm_sincos+0x1e>
  40:   7c 51           clrd r1

The polyd gets expanded to:

  42:   70 51 54        movd r1,r4
  45:   3c 07 52        movzwl $0x7,r2
  48:   9e ef b2 ff     movab 0 <__libm_argred>,r3
  4c:   ff ff 53 
                        4a: R_VAX_PC32  .rodata
  4f:   7c 50           clrd r0
  51:   11 03           brb 56 <__libm_sincos+0x32>
  53:   64 54 50        muld2 r4,r0
  56:   60 93 50        addd2 @(r3)+,r0
  59:   f5 52 f7        sobgtr r2,53 <__libm_sincos+0x2f>
  5c:   7c 54           clrd r4



Home | Main Index | Thread Index | Old Index