Changeset 117


Ignore:
Timestamp:
Aug 15, 2006, 11:22:16 AM (19 years ago)
Author:
dmik
Message:

Tools: Fixed double number handling routines: applying word0 and word1 macros to cached double variables could screw up the GCC optimizer (resulting into SIGFPEs in the release build); |volatile| is now used to prevent caching.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/tools/qlocale.cpp

    r8 r117  
    42954295{
    42964296    Long L;
    4297     double a;
     4297    volatile double a;
    42984298
    42994299    L = (word0(x) & Exp_mask) - (P-1)*Exp_msk1;
     
    43284328    ULong *xa, *xa0, w, y, z;
    43294329    int k;
    4330     double d;
     4330    volatile double d;
    43314331#ifdef VAX
    43324332    ULong d0, d1;
     
    43884388}
    43894389
    4390 static Bigint *d2b(double d, int *e, int *bits)
     4390static Bigint *d2b(volatile double d, int *e, int *bits)
    43914391{
    43924392    Bigint *b;
     
    45134513static double ratio(Bigint *a, Bigint *b)
    45144514{
    4515     double da, db;
     4515    volatile double da, db;
    45164516    int k, ka, kb;
    45174517
     
    45874587        e, e1, esign, i, j, k, nd, nd0, nf, nz, nz0, sign;
    45884588    CONST char *s, *s0, *s1;
    4589     double aadj, aadj1, adj, rv, rv0;
     4589    double aadj, aadj1, adj, rv0;
     4590    volatile double rv;
    45904591    Long L;
    45914592    ULong y, z;
     
    53155316    Bigint *b, *b1, *delta, *mhi, *S;
    53165317    Bigint *mlo = NULL; /* pacify gcc */
    5317     volatile double d2;
    5318     double ds, eps;
     5318    volatile double d2, eps;
     5319    double ds;
    53195320    char *s, *s0;
    53205321
Note: See TracChangeset for help on using the changeset viewer.