Fixes are available
XL C/C++ for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 8 (March 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 12 (May 2015 PTF) for 12.1
XL C/C++ for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 15 (April 2016 Update) for 12.1
XL C for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 16 (July 2016 Update) for 12.1
XL C/C++ for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 17 (November 2016 Update) for 12.1
XL C for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 18 (February 2017 Update) for 12.1
XL C for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C/C++ for AIX Fix Pack 19 (August 2017 Update) for 12.1
XL C for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C/C++ for AIX Fix Pack 20 (March 2018 Update) for 12.1
XL C for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C/C++ for AIX Fix Pack 6 (December 2013 PTF) for 12.1
XL C for AIX Fix Pack 7 (January 2014 PTF) for 12.1
XL C for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 9 (July 2014 PTF) for 12.1
XL C for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C/C++ for AIX Fix Pack 10 (October 2014 PTF) for 12.1
XL C for AIX Fix Pack 11 (February 2015 PTF) for 12.1
XL C for AIX Fix Pack 13 (August 2015 Update) for 12.1
XL C for AIX Fix Pack 14 (December 2015 Update) for 12.1
XL C/C++ for AIX Fix Pack 21 (January 2019 Update) for 12.1
XL C for AIX Fix Pack 21 (January 2019 Update) for 12.1
APAR status
Closed as program error.
Error description
When using the dis-assembler, the cmpb instruction is not shown in the .s output file for the corresponding source code: ======Testcase: $ cat test.C #include <string.h> #include <builtins.h> #include <stdio.h> #define Uint64 unsigned long long #define Uint32 unsigned int #define Uint unsigned long long #define UintPtr intptr_t extern "C" size_t strlen_org(const char *s) { return strlen(s); } extern "C" size_t strlen_pwr6(const char *s) { UintPtr offset = ((UintPtr)s) & 7; Uint64 *alignedPtr = (Uint64 *)(s-offset); Uint64 a = *alignedPtr; Uint64 mask = -1; mask <<= offset*8; a |= ~mask; Uint64 cmpb = __cmpb(a,0); while (cmpb == 0) { alignedPtr++; a = *alignedPtr; cmpb = __cmpb(a,0); if (cmpb != 0) break; alignedPtr++; a = *alignedPtr; cmpb = __cmpb(a,0); } size_t res = (size_t)((const char *)alignedPtr - s); res += __cntlz8(cmpb)/8; return res; } int main(int argc, char *argv[]) { size_t s; char dest[1024*1024]; memset(dest, 'x', sizeof(dest)); dest[sizeof(dest)-1] = '\0'; switch(argv[1][0]) { case 'a' : for (int i=0; i < 10000; i++) s = strlen_org(dest); break; case 'c' : for (int i=0; i < 10000; i++) s = strlen_pwr6(dest); break; } printf("%ull\n", s); return s; } $ ===== COMPILE COMMAND: xlC -q64 -O2 strlen.C -qlist -qarch=pwr7 /usr/vac/exe/dis a.out ===== ACTUAL OUTPUT: When analyzing the .s file, the cmpb instruction is missing: .strlen_pwr6: # 0x00000001000007a0 (H.155. NO_SYMBOL+0x040) rlwinm r4,r3,0,29,31 addi r0,r0,-1 addi r5,r0,0 subf r4,r4,r3 rlwinm r6,r3,3,26,28 ld r7,0(r4) sld r0,r0,r6 orc r0,r7,r0 .long 0x7ca003f8 # "|\240\003\370" .long 0x2c200000 # ", \0\0" .long 0x40820048 # "@\202\0H" .long 0x60000000 # "`\0\0\0" ===== EXPECTED OUTPUT: The cmpb instruction needs to be there.
Local fix
Use the -qlist option instead of -s
Problem summary
USERS AFFECTED: Users who want to read assembly files that include any one of the cmpb, frsqrtes, frsqrtes and wait mnemonics are affected by this issue. PROBLEM DESCRIPTION: The disassembler (ie dis) cannot figure out cmpb, frsqrtes, frsqrtes and wait mnemonic instructions.
Problem conclusion
The disassembler has been taught to handle the above mnemonics.
Temporary fix
Comments
APAR Information
APAR number
IV49970
Reported component name
XL C/C++ FOR AI
Reported component ID
5725C7200
Reported release
C10
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2013-09-25
Closed date
2013-12-13
Last modified date
2013-12-13
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XL C FOR AIX
Fixed component ID
5725C7100
Applicable component levels
Document Information
Modified date:
01 October 2021