IBM Support

Compiling source that uses POWER7 inline ASM instructions encounters an "Unrecognized opcode" error from the Linux assembler

Troubleshooting


Problem

Attempts to compile a source that uses POWER7 inline ASM instructions using XLC C/C++ for Linux v12.1 results in "Unrecognized opcode" error from the assembler.

Symptom

Inline assembly statements that contain POWER7 instructions encounter an "Unrecognized opcode" assembler error during compilation, and the compilation does not finish.

Failing Inline ASM Example
> cat t.C
double test(const unsigned char * const in)
{
   double d;
   __asm__("lfiwzx %0, 0, %1" : "=f"(d) : "r"(in) : );
   return d;
}
> xlC -q64 -qarch=pwr7 t.C
t$1.s: Assembler messages:
t$1.s:64: Error: Unrecognized opcode: `lfiwzx'
    1500-067: (S) asm statement generates errors in assembler output.
>

[{"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Compiler","Platform":[{"code":"PF016","label":"Linux"}],"Version":"12.1","Edition":"","Line of Business":{"code":"LOB73","label":"Power TPS"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

Modified date:
08 August 2018

UID

swg21659724