[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 287/437: ARM: Do not leave early init_jit if /proc is no
From: |
Andy Wingo |
Subject: |
[Guile-commits] 287/437: ARM: Do not leave early init_jit if /proc is not mounted. |
Date: |
Mon, 2 Jul 2018 05:14:38 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 354146b4cab3ac19e48890844963362c2f874399
Author: pcpa <address@hidden>
Date: Tue Apr 22 14:39:10 2014 -0300
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.
---
ChangeLog | 5 +++++
lib/jit_arm.c | 49 ++++++++++++++++++++++++-------------------------
2 files changed, 29 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7170e85..79bdd6f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-22 Paulo Andrade <address@hidden>
+
+ * 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 <address@hidden>
* include/lightning/jit_aarch64.h, include/lightning/jit_arm.h,
diff --git a/lib/jit_arm.c b/lib/jit_arm.c
index 71c1a79..e71feda 100644
--- a/lib/jit_arm.c
+++ b/lib/jit_arm.c
@@ -142,35 +142,34 @@ jit_get_cpu(void)
char *ptr;
char buf[128];
- if ((fp = fopen("/proc/cpuinfo", "r")) == NULL)
- return;
-
- while (fgets(buf, sizeof(buf), fp)) {
- if (strncmp(buf, "CPU architecture:", 17) == 0) {
- jit_cpu.version = strtol(buf + 17, &ptr, 10);
- while (*ptr) {
- if (*ptr == 'T' || *ptr == 't') {
- ++ptr;
- jit_cpu.thumb = 1;
- }
- else if (*ptr == 'E' || *ptr == 'e') {
- jit_cpu.extend = 1;
- ++ptr;
+ if ((fp = fopen("/proc/cpuinfo", "r")) != NULL) {
+ while (fgets(buf, sizeof(buf), fp)) {
+ if (strncmp(buf, "CPU architecture:", 17) == 0) {
+ jit_cpu.version = strtol(buf + 17, &ptr, 10);
+ while (*ptr) {
+ if (*ptr == 'T' || *ptr == 't') {
+ ++ptr;
+ jit_cpu.thumb = 1;
+ }
+ else if (*ptr == 'E' || *ptr == 'e') {
+ jit_cpu.extend = 1;
+ ++ptr;
+ }
+ else
+ ++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;
}
}
- 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;
- }
+ fclose(fp);
}
- fclose(fp);
#endif
#if defined(__ARM_PCS_VFP)
if (!jit_cpu.vfp)
- [Guile-commits] 329/437: cross: Provide the action for the cross compiling case, (continued)
- [Guile-commits] 329/437: cross: Provide the action for the cross compiling case, Andy Wingo, 2018/07/02
- [Guile-commits] 178/437: Update texinfo documentation to match current implementation., Andy Wingo, 2018/07/02
- [Guile-commits] 392/437: Bump library major., Andy Wingo, 2018/07/02
- [Guile-commits] 398/437: ia64: Pass all tests for variadic jit functions, Andy Wingo, 2018/07/02
- [Guile-commits] 397/437: Implement new synthesized IR codes sequences, Andy Wingo, 2018/07/02
- [Guile-commits] 410/437: GNU lightning 2.1.2 release, Andy Wingo, 2018/07/02
- [Guile-commits] 270/437: x86: Use aligned offset for x87 to/from sse move., Andy Wingo, 2018/07/02
- [Guile-commits] 302/437: Add info menu entry for lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 214/437: Remove remaining ia64 port debug code., Andy Wingo, 2018/07/02
- [Guile-commits] 331/437: mips: Do not make t9 available as a generic register, Andy Wingo, 2018/07/02
- [Guile-commits] 287/437: ARM: Do not leave early init_jit if /proc is not mounted.,
Andy Wingo <=
- [Guile-commits] 405/437: Add a second pass to compute live register ranges, Andy Wingo, 2018/07/02
- [Guile-commits] 300/437: Add consistency check on temporaries during a jump, Andy Wingo, 2018/07/02
- [Guile-commits] 276/437: Rewrite jit_regset_scan1 for easier optimization., Andy Wingo, 2018/07/02
- [Guile-commits] 268/437: Sync after regenerating version.texi., Andy Wingo, 2018/07/02
- [Guile-commits] 277/437: x86_64: Correct wrong inline assembly in jit_get_cpu, Andy Wingo, 2018/07/02
- [Guile-commits] 360/437: Correct wrong check in simplify_stxi., Andy Wingo, 2018/07/02
- [Guile-commits] 389/437: alpha: Save correct offset if loading a vararg double., Andy Wingo, 2018/07/02
- [Guile-commits] 380/437: ppc: Add initial jit_va_ calls to ppc, Andy Wingo, 2018/07/02
- [Guile-commits] 239/437: Avoid possible problem if built with gcc 4.8 or newer., Andy Wingo, 2018/07/02
- [Guile-commits] 347/437: S390: Add support for 32 bit., Andy Wingo, 2018/07/02