tmp-lshift.s:106: Error: selected processor does not support ARM mode `vdup.32 d6,r3'

Dennis Clarke dclarke at
Mon Dec 31 15:30:26 UTC 2018

On 12/30/18 11:45 AM, Jeffrey Walton wrote:
> On Sun, Dec 30, 2018 at 11:12 AM Torbjörn Granlund <tg at> wrote:
>> Jeffrey Walton <noloader at> writes:
>>    I'm working on my BananaPi. It is a Cortex-A7 with ARMv7-a.
>>    Compile results in the following. According to Stallman I believe you
>>    are supposed to add the necessary options to compile the file
>>    independent of CFLAGS, and it should not need to be override-able by
>>    the user because it is required. Also see
>> .
>>     gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I..
>>    -DOPERATION_lshift -I/usr/local/include -DNDEBUG -g2 -O2 -march=native
>>    -fPIC -Wa,--noexecstack tmp-lshift.s -fPIC -DPIC -o .libs/lshift.o
>>    tmp-lshift.s:  gcc -std=gnu99 -c -DHAVE_CONFIG_H -I. -I..
>>    -D__GMP_WITHIN_GMP -I.. -DOPERATION_rshift -I/usr/local/include
>>    -DNDEBUG -g2 -O2 -march=native -fPIC -Wa,--noexecstack tmp-rshift.s
>>    -fPIC -DPIC -o .libs/rshift.o
>>    Assembler messages:
>>    tmp-lshift.s:106: Error: selected processor does not support ARM mode
>>    `vdup.32 d6,r3'
>>    tmp-lshift.s:108: Error: selected processor does not support ARM mode
>>    `vdup.32 d7,r3'
>>    tmp-lshift.s:114: Error: selected processor does not support ARM mode
>>    `vshl.u64 d18,d19,d7'
>>    tmp-lshift.s:120: Error: selected processor does not support ARM mode
>>    `vshl.u64 d4,d19,d6'
>>    ...
>> Are you implicitly saying that you're overriding CFLAGS (at "make" time)
>> and then things fail and that it shouldn't fail?
>> If I guess right, my recommendation is that you don't override CFLAGS in
>> a build-breaking manner.
>> If I guess wrong, please spell our what you do and what you think is
>> wrong in GMP.
> No, I don't override the CFLAGS. I set them like:
>    CFLAGS="-g2 -O3 -DNDEBUG -march=native" ./configure ...
> What is wrong is obvious. The build is broken.

Maybe I am missing something here. I have an arm7 unit here :

arm7$ uname -a
Linux arm7 4.4.132+ #1 SMP Tue Oct 23 18:03:49 CST 2018 armv7l GNU/Linux
arm7$ head /proc/cpuinfo
processor       : 0
model name      : ARMv7 Processor rev 1 (v7l)
BogoMIPS        : 48.00
Features        : half thumb fastmult vfp edsp thumbee neon vfpv3 tls 
vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x0
CPU part        : 0xc0d
CPU revision    : 1


arm7$ cat ver.c

#define _XOPEN_SOURCE 600

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <gmp.h>
#include <mpfr.h>

void mpfr_version_report();

int main (int argc, char *argv[])
     return EXIT_SUCCESS;


arm7$ cat  mpfr_ver.c

#define _XOPEN_SOURCE 600

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <gmp.h>
#include <mpfr.h>

void mpfr_version_report()

     printf("GMP  library version : %d.%d.%d\n",

     printf("MPFR library: %-12s\n", mpfr_get_version ());
     printf("MPFR header : %s (based on %d.%d.%d)\n",

     if (mpfr_buildopt_tls_p()!=0)
         printf("            : compiled as thread safe using TLS\n");

     if (mpfr_buildopt_float128_p()!=0)
         printf("            : __float128 support enabled\n");

     if (mpfr_buildopt_decimal_p()!=0)
         printf("            : decimal float support enabled\n");

     if (mpfr_buildopt_gmpinternals_p()!=0)
         printf("            : compiled with GMP internals\n");

     if (mpfr_buildopt_sharedcache_p()!=0)
         printf("            : threads share cache per MPFR const\n");

     printf("MPFR thresholds file used at compile time : %s\n",
                                       mpfr_buildopt_tune_case ());


arm7$ file ver
ver: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), 
dynamically linked, interpreter /lib/, for GNU/Linux 
3.2.0, BuildID[sha1]=606244578692f7d651c024dc7d7c7eed2deb47c5, not stripped
arm7$ ldd ver (0xbef3e000) => /opt/bw/lib/ (0xb6ef0000) => /opt/bw/lib/ (0xb6e48000) => /lib/arm-linux-gnueabihf/ (0xb6d46000)
         /lib/ (0xb6fa2000)
arm7$ ./ver
GMP  library version : 6.1.2
MPFR library: 4.0.1-p13
MPFR header : 4.0.1-p13 (based on 4.0.1)
             : compiled as thread safe using TLS
MPFR thresholds file used at compile time : src/arm/mparam.h

Both gmp and mpfr compile and test fine on this arm7 unit here.

Download the sources and try a reconfigure with trivial CFLAGS like
  -std=c99 -g -march=armv7-a -O0 and not much else.


More information about the gmp-bugs mailing list