Changeset 14039


Ignore:
Timestamp:
Jul 24, 2010, 11:38:08 PM (9 years ago)
Author:
gb
Message:

Need to clear FPSCR status before calling into math lib on ARM.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/arm/level-1/l1-numbers.lisp

    r13373 r14039  
    513513  (declare (double-float b e result))
    514514  (with-stack-double-floats ((temp))
     515    #+arm-target (%set-fpscr-status 0)
    515516    (%setf-double-float temp (#_pow b e))
    516517    (%df-check-exception-2 'expt b e (%ffi-exception-status))
     
    521522  (declare (single-float b e result))
    522523  (target::with-stack-short-floats ((temp))
     524    #+arm-target (%set-fpscr-status 0)
    523525    (%setf-short-float temp (#_powf b e))
    524526    (%sf-check-exception-2 'expt b e (%ffi-exception-status))
     
    543545  (declare (double-float n result))
    544546  (with-stack-double-floats ((temp))
     547    #+arm-target (%set-fpscr-status 0)
    545548    (%setf-double-float TEMP (#_sin n))
    546549    (%df-check-exception-1 'sin n (%ffi-exception-status))
     
    551554  (declare (single-float n result))
    552555  (target::with-stack-short-floats ((temp))
     556    #+arm-target (%set-fpscr-status 0)
    553557    (%setf-short-float TEMP (#_sinf n))
    554558    (%sf-check-exception-1 'sin n (%ffi-exception-status))
     
    565569  (declare (double-float n result))
    566570  (with-stack-double-floats ((temp))
     571    #+arm-target (%set-fpscr-status 0)
    567572    (%setf-double-float TEMP (#_cos n))
    568573    (%df-check-exception-1 'cos n (%ffi-exception-status))
     
    573578  (declare (single-float n result))
    574579  (target::with-stack-short-floats ((temp))
     580    #+arm-target (%set-fpscr-status 0)
    575581    (%setf-short-float TEMP (#_cosf n))
    576582    (%sf-check-exception-1 'cos n (%ffi-exception-status))
     
    587593  (declare (double-float n result))
    588594  (with-stack-double-floats ((temp))
     595    #+arm-target (%set-fpscr-status 0)
    589596    (%setf-double-float TEMP (#_acos n))
    590597    (%df-check-exception-1 'acos n (%ffi-exception-status))
     
    595602  (declare (single-float n result))
    596603  (target::with-stack-short-floats ((temp))
     604    #+arm-target (%set-fpscr-status 0)
    597605    (%setf-short-float TEMP (#_acosf n))
    598606    (%sf-check-exception-1 'acos n (%ffi-exception-status))
     
    609617  (declare (double-float n result))
    610618  (with-stack-double-floats ((temp))
     619    #+arm-target (%set-fpscr-status 0)
    611620    (%setf-double-float TEMP (#_asin n))
    612621    (%df-check-exception-1 'asin n (%ffi-exception-status))
     
    617626  (declare (single-float n result))
    618627  (target::with-stack-short-floats ((temp))
     628    #+arm-target (%set-fpscr-status 0)
    619629    (%setf-short-float TEMP (#_asinf n))
    620630    (%sf-check-exception-1 'asin n (%ffi-exception-status))
     
    631641  (declare (double-float n result))
    632642  (with-stack-double-floats ((temp))
     643    #+arm-target (%set-fpscr-status 0)
    633644    (%setf-double-float TEMP (#_cosh n))
    634645    (%df-check-exception-1 'cosh n (%ffi-exception-status))
     
    639650  (declare (single-float n result))
    640651  (target::with-stack-short-floats ((temp))
     652    #+arm-target (%set-fpscr-status 0)
    641653    (%setf-short-float TEMP (external-call "coshf" :single-float n :single-float))
    642654    (%sf-check-exception-1 'cosh n (%ffi-exception-status))
     
    653665  (declare (double-float n result))
    654666  (with-stack-double-floats ((temp))
     667    #+arm-target (%set-fpscr-status 0)
    655668    (%setf-double-float TEMP (#_log n))
    656669    (%df-check-exception-1 'log n (%ffi-exception-status))
     
    661674  (declare (single-float n result))
    662675  (target::with-stack-short-floats ((temp))
     676    #+arm-target (%set-fpscr-status 0)
    663677    (%setf-short-float TEMP (#_logf n))
    664678    (%sf-check-exception-1 'log n (%ffi-exception-status))
     
    674688  (declare (double-float n result))
    675689  (with-stack-double-floats ((temp))
     690    #+arm-target (%set-fpscr-status 0)
    676691    (%setf-double-float TEMP (#_tan n))
    677692    (%df-check-exception-1 'tan n (%ffi-exception-status))
     
    682697  (declare (single-float n result))
    683698  (target::with-stack-short-floats ((temp))
     699    #+arm-target (%set-fpscr-status 0)
    684700    (%setf-short-float TEMP (#_tanf n))
    685701    (%sf-check-exception-1 'tan n (%ffi-exception-status))
     
    696712  (declare (double-float n result))
    697713  (with-stack-double-floats ((temp))
     714    #+arm-target (%set-fpscr-status 0)
    698715    (%setf-double-float TEMP (#_atan n))
    699716    (%df-check-exception-1 'atan n (%ffi-exception-status))
     
    705722  (declare (single-float n result))
    706723  (target::with-stack-short-floats ((temp))
     724    #+arm-target (%set-fpscr-status 0)
    707725    (%setf-short-float TEMP (#_atanf n))
    708726    (%sf-check-exception-1 'atan n (%ffi-exception-status))
     
    719737  (declare (double-float x y result))
    720738  (with-stack-double-floats ((temp))
     739    #+arm-target (%set-fpscr-status 0)
    721740    (%setf-double-float TEMP (#_atan2 x y))
    722741    (%df-check-exception-2 'atan2 x y (%ffi-exception-status))
     
    727746  (declare (single-float x y result))
    728747  (target::with-stack-short-floats ((temp))
     748    #+arm-target (%set-fpscr-status 0)
    729749    (%setf-short-float TEMP (#_atan2f x y))
    730750    (%sf-check-exception-2 'atan2 x y (%ffi-exception-status))
     
    741761  (declare (double-float n result))
    742762  (with-stack-double-floats ((temp))
     763    #+arm-target (%set-fpscr-status 0)
    743764    (%setf-double-float TEMP (#_exp n))
    744765    (%df-check-exception-1 'exp n (%ffi-exception-status))
     
    749770  (declare (single-float n result))
    750771  (target::with-stack-short-floats ((temp))
     772    #+arm-target (%set-fpscr-status 0)
    751773    (%setf-short-float TEMP (#_expf n))
    752774    (%sf-check-exception-1 'exp n (%ffi-exception-status))
     
    771793  (declare (double-float n result))
    772794  (with-stack-double-floats ((temp))
     795    #+arm-target (%set-fpscr-status 0)
    773796    (%setf-double-float TEMP (#_sinh n))
    774797    (%df-check-exception-1 'sinh n (%ffi-exception-status))
     
    779802  (declare (single-float n result))
    780803  (target::with-stack-short-floats ((temp))
     804    #+arm-target (%set-fpscr-status 0)
    781805    (%setf-short-float TEMP (external-call "sinhf" :single-float n :single-float))
    782806    (%sf-check-exception-1 'sinh n (%ffi-exception-status))
     
    793817  (declare (double-float n result))
    794818  (with-stack-double-floats ((temp))
     819    #+arm-target (%set-fpscr-status 0)
    795820    (%setf-double-float TEMP (#_tanh n))
    796821    (%df-check-exception-1 'tanh n (%ffi-exception-status))
     
    801826  (declare (single-float n result))
    802827  (target::with-stack-short-floats ((temp))
     828    #+arm-target (%set-fpscr-status 0)
    803829    (%setf-short-float TEMP (external-call "tanhf" :single-float n :single-float))
    804830    (%sf-check-exception-1 'tanh n (%ffi-exception-status))
     
    825851  (declare (single-float n result))
    826852  (target::with-stack-short-floats ((temp))
     853    #+arm-target (%set-fpscr-status 0)
    827854    (%setf-short-float TEMP (external-call "asinhf" :float n :float))
    828855    (%sf-check-exception-1 'asinh n (%ffi-exception-status))
     
    841868  (declare (double-float n result))
    842869  (with-stack-double-floats ((temp))
     870    #+arm-target (%set-fpscr-status 0)
    843871    (%setf-double-float TEMP (#_asinh n))
    844872    (%df-check-exception-1 'asinh n (%ffi-exception-status))
     
    850878  (declare (single-float n result))
    851879  (target::with-stack-short-floats ((temp))
     880    #+arm-target (%set-fpscr-status 0)
    852881    (%setf-short-float TEMP (#_asinhf n))
    853882    (%sf-check-exception-1 'asinh n (%ffi-exception-status))
     
    875904  (declare (single-float n result))
    876905  (target::with-stack-short-floats ((temp))
     906    #+arm-target (%set-fpscr-status 0)
    877907    (%setf-short-float TEMP (external-call "acoshf" :float n :float))
    878908    (%sf-check-exception-1 'acosh n (%ffi-exception-status))
     
    893923  (declare (double-float n result))
    894924  (with-stack-double-floats ((temp))
     925    #+arm-target (%set-fpscr-status 0)
    895926    (%setf-double-float TEMP (#_acosh n))
    896927    (%df-check-exception-1 'acosh n (%ffi-exception-status))
     
    901932  (declare (single-float n result))
    902933  (target::with-stack-short-floats ((temp))
     934    #+arm-target (%set-fpscr-status 0)
    903935    (%setf-short-float TEMP (#_acoshf n))
    904936    (%sf-check-exception-1 'acosh n (%ffi-exception-status))
     
    926958  (declare (single-float n result))
    927959  (target::with-stack-short-floats ((temp))
     960    #+arm-target (%set-fpscr-status 0)
    928961    (%setf-short-float TEMP (external-call "atanhf" :float n :float))
    929962    (%sf-check-exception-1 'atanh n (%ffi-exception-status))
     
    944977  (declare (double-float n result))
    945978  (with-stack-double-floats ((temp))
     979    #+arm-target (%set-fpscr-status 0)
    946980    (%setf-double-float TEMP (#_atanh n))
    947981    (%df-check-exception-1 'atanh n (%ffi-exception-status))
     
    952986  (declare (single-float n result))
    953987  (target::with-stack-short-floats ((temp))
     988    #+arm-target (%set-fpscr-status 0)
    954989    (%setf-short-float TEMP (#_atanhf n))
    955990    (%sf-check-exception-1 'atanh n (%ffi-exception-status))
Note: See TracChangeset for help on using the changeset viewer.