Browse Source

Merge pull request #2948 from martin-frbg/issue2947

Expressly enable neon for use with intrinsics if available
tags/v0.3.13^2
Martin Kroeker GitHub 5 years ago
parent
commit
5d643929dd
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 1 deletions
  1. +5
    -0
      Makefile.arm
  2. +34
    -1
      getarch.c

+ 5
- 0
Makefile.arm View File

@@ -12,3 +12,8 @@ ifeq ($(CORE), ARMV6)
CCOMMON_OPT += -mfpu=vfp
FCOMMON_OPT += -mfpu=vfp
endif

ifdef HAVE_NEON
CCOMMON_OPT += -mfpu=neon
FCOMMON_OPT += -mfpu=neon
endif

+ 34
- 1
getarch.c View File

@@ -1405,8 +1405,41 @@ int main(int argc, char *argv[]){

printf("NUM_CORES=%d\n", get_num_cores());

#if defined(__arm__) && !defined(FORCE)
#if defined(__arm__)
#if !defined(FORCE)
fprintf(stderr,"get features!\n");
get_features();
#else
fprintf(stderr,"split archconfig!\n");
sprintf(buffer, "%s", ARCHCONFIG);

p = &buffer[0];

while (*p) {
if ((*p == '-') && (*(p + 1) == 'D')) {
p += 2;
if (*p != 'H') {
while( (*p != ' ') && (*p != '-') && (*p != '\0') && (*p != '\n')) {p++; }
if (*p == '-') continue;
}
while ((*p != ' ') && (*p != '\0')) {

if (*p == '=') {
printf("=");
p ++;
while ((*p != ' ') && (*p != '\0')) {
printf("%c", *p);
p ++;
}
} else {
printf("%c", *p);
p ++;
if ((*p == ' ') || (*p =='\0')) printf("=1\n");
}
}
} else p ++;
}
#endif
#endif




Loading…
Cancel
Save