mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-23 12:00:21 +02:00
ARM: Do not leave early init_jit if /proc is not mounted.
* lib/jit_arm.c: Do not get confused with default settings if /proc is not mounted on Linux specific code path.
This commit is contained in:
parent
abf1b6e678
commit
354146b4ca
2 changed files with 29 additions and 25 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-04-22 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
|
* lib/jit_arm.c: Do not get confused with default settings
|
||||||
|
if /proc is not mounted on Linux specific code path.
|
||||||
|
|
||||||
2014-04-09 Paulo Andrade <pcpa@gnu.org>
|
2014-04-09 Paulo Andrade <pcpa@gnu.org>
|
||||||
|
|
||||||
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
|
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
|
||||||
|
|
|
@ -142,35 +142,34 @@ jit_get_cpu(void)
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
|
||||||
if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
|
if ((fp = fopen("/proc/cpuinfo", "r")) != NULL) {
|
||||||
return;
|
while (fgets(buf, sizeof(buf), fp)) {
|
||||||
|
if (strncmp(buf, "CPU architecture:", 17) == 0) {
|
||||||
while (fgets(buf, sizeof(buf), fp)) {
|
jit_cpu.version = strtol(buf + 17, &ptr, 10);
|
||||||
if (strncmp(buf, "CPU architecture:", 17) == 0) {
|
while (*ptr) {
|
||||||
jit_cpu.version = strtol(buf + 17, &ptr, 10);
|
if (*ptr == 'T' || *ptr == 't') {
|
||||||
while (*ptr) {
|
++ptr;
|
||||||
if (*ptr == 'T' || *ptr == 't') {
|
jit_cpu.thumb = 1;
|
||||||
++ptr;
|
}
|
||||||
|
else if (*ptr == 'E' || *ptr == 'e') {
|
||||||
|
jit_cpu.extend = 1;
|
||||||
|
++ptr;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
++ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strncmp(buf, "Features\t:", 10) == 0) {
|
||||||
|
if ((ptr = strstr(buf + 10, "vfpv")))
|
||||||
|
jit_cpu.vfp = strtol(ptr + 4, NULL, 0);
|
||||||
|
if ((ptr = strstr(buf + 10, "neon")))
|
||||||
|
jit_cpu.neon = 1;
|
||||||
|
if ((ptr = strstr(buf + 10, "thumb")))
|
||||||
jit_cpu.thumb = 1;
|
jit_cpu.thumb = 1;
|
||||||
}
|
|
||||||
else if (*ptr == 'E' || *ptr == 'e') {
|
|
||||||
jit_cpu.extend = 1;
|
|
||||||
++ptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
++ptr;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (strncmp(buf, "Features\t:", 10) == 0) {
|
fclose(fp);
|
||||||
if ((ptr = strstr(buf + 10, "vfpv")))
|
|
||||||
jit_cpu.vfp = strtol(ptr + 4, NULL, 0);
|
|
||||||
if ((ptr = strstr(buf + 10, "neon")))
|
|
||||||
jit_cpu.neon = 1;
|
|
||||||
if ((ptr = strstr(buf + 10, "thumb")))
|
|
||||||
jit_cpu.thumb = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fclose(fp);
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(__ARM_PCS_VFP)
|
#if defined(__ARM_PCS_VFP)
|
||||||
if (!jit_cpu.vfp)
|
if (!jit_cpu.vfp)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue