Skip to content

Commit 5d64392

Browse files
authored
Merge pull request #2948 from martin-frbg/issue2947
Expressly enable neon for use with intrinsics if available
2 parents e2f9005 + e8cbf0f commit 5d64392

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

Makefile.arm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,8 @@ ifeq ($(CORE), ARMV6)
1212
CCOMMON_OPT += -mfpu=vfp
1313
FCOMMON_OPT += -mfpu=vfp
1414
endif
15+
16+
ifdef HAVE_NEON
17+
CCOMMON_OPT += -mfpu=neon
18+
FCOMMON_OPT += -mfpu=neon
19+
endif

getarch.c

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,8 +1405,41 @@ int main(int argc, char *argv[]){
14051405

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

1408-
#if defined(__arm__) && !defined(FORCE)
1408+
#if defined(__arm__)
1409+
#if !defined(FORCE)
1410+
fprintf(stderr,"get features!\n");
14091411
get_features();
1412+
#else
1413+
fprintf(stderr,"split archconfig!\n");
1414+
sprintf(buffer, "%s", ARCHCONFIG);
1415+
1416+
p = &buffer[0];
1417+
1418+
while (*p) {
1419+
if ((*p == '-') && (*(p + 1) == 'D')) {
1420+
p += 2;
1421+
if (*p != 'H') {
1422+
while( (*p != ' ') && (*p != '-') && (*p != '\0') && (*p != '\n')) {p++; }
1423+
if (*p == '-') continue;
1424+
}
1425+
while ((*p != ' ') && (*p != '\0')) {
1426+
1427+
if (*p == '=') {
1428+
printf("=");
1429+
p ++;
1430+
while ((*p != ' ') && (*p != '\0')) {
1431+
printf("%c", *p);
1432+
p ++;
1433+
}
1434+
} else {
1435+
printf("%c", *p);
1436+
p ++;
1437+
if ((*p == ' ') || (*p =='\0')) printf("=1\n");
1438+
}
1439+
}
1440+
} else p ++;
1441+
}
1442+
#endif
14101443
#endif
14111444

14121445

0 commit comments

Comments
 (0)