IBM Support

LI76662: MISSING STORE FOR __D128_TO_SIGNED_BCD

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following demonstrates how the compiler fails to produce a
    store for the __d128_to_signed_BCD() function when using the
    -qdfp option.
    
    ===== COMPILE COMMAND:
    xlC -q64 -O -qarch=pwr7 -qdfp -c load_store_bcd31.C
    
    
    ======= Test case:
    $cat load_store_bcd31.C
    #include <builtins.h>
    
    
    extern "C" void storeBCD(_Decimal128 dfp, unsigned char *cp,
    unsigned
    long long* op)
    {
       __d128_to_signed_BCD (dfp, 1, (unsigned long long *)cp,
    (unsigned
    long long *)(cp+8));
    }
    
    extern "C" void storeBCD_urg(_Decimal128 dfp, unsigned char *cp,
    unsigned long long* op)
    {
       unsigned long long upper;
       unsigned long long lower;
       __d128_to_signed_BCD (dfp, 1, &upper, &lower);
       *((unsigned long long *)cp) = upper;
       *((unsigned long long *)(cp+8)) = lower;
    }
    
    extern "C" _Decimal128 loadBCD(unsigned char *cp)
    {
       return __signed_BCD_to_d128(*(unsigned long long *)cp,
    *(unsigned
    long long *)(cp+8));
    }
    $
    
    
    ===== ACTUAL LISTING:
    
    >>>>> OBJECT SECTION, OPTIMIZATION <<<<<
     GPR's set/used:   ---- ---- ---- ----  ---- ---- ---- ----
     FPR's set/used:   ---- ---- ---- ----  ---- ---- ---- ----
     CCR's set/used:   ---- ----
      VR's set/used:   ---- ---- ---- ----  ---- ---- ---- ----
         | 000000                           PDEF     storeBCD
        0|                                  PROC
    dfp,cp,op,vs2,vs3,gr5,gr6
        9| 000000 bclr     4E800020   1     BA        lr
         |               Tag Table
    
    
    ======= EXPECTED LISTING:
    
    >>>>> OBJECT SECTION, OPTIMIZATION <<<<<
     GPR's set/used:   ---- -u-- ---- ----  ---- ---- ---- ----
     FPR's set/used:   ssuu ---- ---- ----  ---- ---- ---- ----
     CCR's set/used:   ---- ----
      VR's set/used:   ---- ---- ---- ----  ---- ---- ---- ----
         | 000000                           PDEF     storeBCD
        0|                                  PROC
    dfp,cp,op,vs2,vs3,gr5,gr6
        7| 000000 ddedpdq  FC181284   1     CVDFESB
    vs0,vs1=vs2,vs3,1
        7| 000004 stfd     D8250008   1     STFL      (unsigned long
    long;unsigned char)(gr5,8)=vs1
        7| 000008 stfd     D8050000   1     STFL      (unsigned long
    long;unsigned char)(gr5,0)=vs0
        9| 00000C bclr     4E800020   1     BA        lr
         |               Tag Table
    

Local fix

  • n/a
    

Problem summary

  • USERS AFFECTED:
    Users using -qdfp with the __d128_to_signed_BCD function and
    optimization maybe affected by this issue.
    
    PROBLEM DESCRIPTION:
    The compiler is optimizing out a store that is should not be
    removing due to incorrect symbols for the store.
    

Problem conclusion

  • The compiler has now been fixed to avoid removing the stores
    that are needed.
    

Temporary fix

Comments

APAR Information

  • APAR number

    LI76662

  • Reported component name

    XL C/C++ FOR LI

  • Reported component ID

    5724X1400

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2012-02-06

  • Closed date

    2012-02-06

  • Last modified date

    2012-02-06

  • APAR is sysrouted FROM one or more of the following:

    IV10079

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    XL C/C++ FOR LI

  • Fixed component ID

    5724X1400

Applicable component levels

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"B10","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
17 October 2021