Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
11 Views

error: unrecognized modifier character q in substitution directive


Hi everyone,


Got error while building MPIR library (mpir.org) using Intel C++ Compiler for Windows.


Used stuff:
- Windows 10,
- Visual Studio 2015 Update 1 with integrated Intel Parallel Studio XE 2016 Update 1,
- MPIR-2.7.2 sources (http://mpir.org/mpir-2.7.2.zip).


For x86 builds using Intel C++ Compiler got:
================================================================
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(109): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(109): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(109): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(178): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(178): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(178): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(168): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(168): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(168): warning #1202: illegal character e in asm operand constraint
C:\libMPIR-2.7.2\src\mpn\sb_divappr_q.c(109): catastrophic error: unrecognized modifier character q in substitution directive
compilation aborted for sb_divappr_q.c (code 4)
================================================================

File 'sb_divappr_q.c' contains on line 109 (where catastrophic error occurred) code:
================================================================
          sub_333(cy2, cy, n1, 0, cy, n1, 0, 0, cy1);
================================================================

which implementation contained in file C:\libMPIR-2.7.2\src\mpn\x86\longlong_inc.h:
================================================================
#if defined (__GNUC__) || defined(__INTEL_COMPILER)
#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  __asm__ ("addl %5,%k1\n\tadcl %3,%k0"                    \
       : "=r" (sh), "=&r" (sl)                    \
       : "0"  ((USItype)(ah)), "g" ((USItype)(bh)),            \
         "%1" ((USItype)(al)), "g" ((USItype)(bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  __asm__ ("subl %5,%k1\n\tsbbl %3,%k0"                    \
       : "=r" (sh), "=&r" (sl)                    \
       : "0" ((USItype)(ah)), "g" ((USItype)(bh)),            \
         "1" ((USItype)(al)), "g" ((USItype)(bl)))
#define add_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
  __asm__ ("addl %8,%q2\n\tadcl %6,%q1\n\tadcl %4,%q0"     \
       : "=r" (sh), "=r" (sm), "=&r" (sl)                  \
       : "0"  ((USItype)(ah)), "rme" ((USItype)(bh)),  \
         "1"  ((USItype)(am)), "rme" ((USItype)(bm)),  \
         "2"  ((USItype)(al)), "rme" ((USItype)(bl)))  
#define sub_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
  __asm__ ("subl %8,%q2\n\tsbbl %6,%q1\n\tsbbl %4,%q0"     \
       : "=r" (sh), "=r" (sm), "=&r" (sl)                  \
       : "0"  ((USItype)(ah)), "rme" ((USItype)(bh)),  \
         "1"  ((USItype)(am)), "rme" ((USItype)(bm)),  \
         "2"  ((USItype)(al)), "rme" ((USItype)(bl)))  
#define umul_ppmm(w1, w0, u, v) \
  __asm__ ("mull %3"                            \
       : "=a" (w0), "=d" (w1)                    \
       : "%0" ((USItype)(u)), "rm" ((USItype)(v)))
#define udiv_qrnnd(q, r, n1, n0, dx) /* d renamed to dx avoiding "=d" */\
  __asm__ ("divl %4"             /* stringification in K&R C */    \
       : "=a" (q), "=d" (r)                        \
       : "0" ((USItype)(n0)), "1" ((USItype)(n1)), "rm" ((USItype)(dx)))
================================================================

Wherein build error doesn't occur if block of asm code above is skipped (by changing string 'defined(__INTEL_COMPILER)' to '(defined(__INTEL_COMPILER) && ! defined(_WIN32))').


Remarks:
- error inherent for x86 Platform builds only (for which was used Intel C++ Compiler running on *IA-32*),
- Intel team interested in "experience with this diagnostic message" (https://software.intel.com/en-us/articles/cdiag13235),
- Intel team periodically identifies and fixes such errors (e.g. DPD200359139 at https://software.intel.com/en-us/articles/intel-composer-xe-2015-compilers-fixes-list),
- error was experienced by other 'MPIR+Intel Compiler' users too (https://groups.google.com/forum/#!msg/mpir-devel/cse8HDLiNSo/pukCmM3jEwAJ , https://github.com/wbhart/mpir/issues/154),
- I'm not sure, what doing 'q' modifier (which tells the assembler to use 64 bits) in x86 code. But I'm sure that MinGW-W64 (i686) build precisely this code to produce x86 binaries; same should be for GCC x86 on Linux. If Intel C++ Compiler for Windows support gas format assembly and (at least partially) compliant to GCC, why it unable to build this code?


If it turns out that this is an Intel C++ Compiler error, which Intel Developers interested to fix, I'll add description, how to reproduce it.

 

Regards,
Alexander

 

0 Kudos
0 Replies