[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 195/437: Minor updates when testing on a prototype, quad
From: |
Andy Wingo |
Subject: |
[Guile-commits] 195/437: Minor updates when testing on a prototype, quadcore Loongson mips. |
Date: |
Mon, 2 Jul 2018 05:14:16 -0400 (EDT) |
wingo pushed a commit to branch lightning
in repository guile.
commit 5d60ba7b05018cffc1de9330687d77870173747e
Author: pcpa <address@hidden>
Date: Wed Mar 6 16:57:43 2013 -0300
Minor updates when testing on a prototype, quadcore Loongson mips.
* check/float.tst: Comment out the int to negative infinity
test in mips for the moment because not all Loongson agrees
on the result.
* lib/jit_disasm.c: Add a test instead of an assertion
when loading symbols for disassembly due to a failure with
a simple binutils build in Debian mipsel64.
---
ChangeLog | 10 ++++++
check/float.tst | 3 ++
lib/jit_disasm.c | 97 ++++++++++++++++++++++++++++----------------------------
3 files changed, 62 insertions(+), 48 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 87519db..5d076e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2013-03-06 Paulo Andrade <address@hidden>
+ * check/float.tst: Comment out the int to negative infinity
+ test in mips for the moment because not all Loongson agrees
+ on the result.
+
+ * lib/jit_disasm.c: Add a test instead of an assertion
+ when loading symbols for disassembly due to a failure with
+ a simple binutils build in Debian mipsel64.
+
+2013-03-06 Paulo Andrade <address@hidden>
+
* include/lightning/jit_private.h, lib/jit_arm-cpu.c,
lib/jit_arm.c, lib/jit_disasm.c, lib/jit_mips-cpu.c,
lib/jit_mips.c, lib/jit_note.c, lib/jit_ppc-cpu.c,
diff --git a/check/float.tst b/check/float.tst
index cc447ca..9c8d039 100644
--- a/check/float.tst
+++ b/check/float.tst
@@ -325,7 +325,10 @@ W##f##r0##f0##l:
f2w(__LINE__, 0, 0)
f2w(__LINE__, 1, 1)
+ /* not all loongson agree on it */
+#if !__mips__
f2w(__LINE__, wninf, $nInf)
+#endif
f2w(__LINE__, wpinf, $pInf)
f2w(__LINE__, wnan, $NaN)
diff --git a/lib/jit_disasm.c b/lib/jit_disasm.c
index 52c071d..5f21a19 100644
--- a/lib/jit_disasm.c
+++ b/lib/jit_disasm.c
@@ -96,59 +96,60 @@ jit_init_debug(void)
long sym_storage;
long dyn_storage;
- sym_storage = bfd_get_symtab_upper_bound(disasm_bfd);
- assert(sym_storage >= 0);
+ if ((sym_storage = bfd_get_symtab_upper_bound(disasm_bfd)) >= 0) {
- if (bfd_get_file_flags(disasm_bfd) & DYNAMIC) {
- dyn_storage = bfd_get_dynamic_symtab_upper_bound(disasm_bfd);
- assert(dyn_storage >= 0);
- }
- else
- dyn_storage = 0;
+ if (bfd_get_file_flags(disasm_bfd) & DYNAMIC) {
+ dyn_storage = bfd_get_dynamic_symtab_upper_bound(disasm_bfd);
+ assert(dyn_storage >= 0);
+ }
+ else
+ dyn_storage = 0;
- disasm_symbols = malloc(sym_storage + dyn_storage);
- sym_count = bfd_canonicalize_symtab(disasm_bfd, disasm_symbols);
- assert(sym_count >= 0);
- if (dyn_storage) {
- dyn_count = bfd_canonicalize_dynamic_symtab(disasm_bfd,
- disasm_symbols +
- sym_count);
- assert(dyn_count >= 0);
- }
- else
- dyn_count = 0;
- disasm_num_symbols = sym_count + dyn_count;
+ disasm_symbols = malloc(sym_storage + dyn_storage);
+ sym_count = bfd_canonicalize_symtab(disasm_bfd, disasm_symbols);
+ assert(sym_count >= 0);
+ if (dyn_storage) {
+ dyn_count = bfd_canonicalize_dynamic_symtab(disasm_bfd,
+ disasm_symbols +
+ sym_count);
+ assert(dyn_count >= 0);
+ }
+ else
+ dyn_count = 0;
+ disasm_num_symbols = sym_count + dyn_count;
- disasm_num_synthetic = bfd_get_synthetic_symtab(disasm_bfd,
- sym_count,
- disasm_symbols,
- dyn_count,
- disasm_symbols +
- sym_count,
- &disasm_synthetic);
- if (disasm_num_synthetic > 0) {
- disasm_symbols = realloc(disasm_symbols,
- sym_storage + dyn_storage +
- disasm_num_synthetic * sizeof(asymbol *));
- for (offset = 0; offset < disasm_num_synthetic; offset++)
- disasm_symbols[disasm_num_symbols++] =
- disasm_synthetic + offset;
- }
+ disasm_num_synthetic = bfd_get_synthetic_symtab(disasm_bfd,
+ sym_count,
+ disasm_symbols,
+ dyn_count,
+ disasm_symbols +
+ sym_count,
+ &disasm_synthetic);
+ if (disasm_num_synthetic > 0) {
+ disasm_symbols = realloc(disasm_symbols,
+ sym_storage + dyn_storage +
+ disasm_num_synthetic *
+ sizeof(asymbol *));
+ for (offset = 0; offset < disasm_num_synthetic; offset++)
+ disasm_symbols[disasm_num_symbols++] =
+ disasm_synthetic + offset;
+ }
- /* remove symbols not useful for disassemble */
- in = out = disasm_symbols;
- for (offset = 0; offset < disasm_num_symbols; offset++) {
- symbol = *in++;
- if (symbol->name &&
- symbol->name[0] != '\0' &&
- !(symbol->flags & (BSF_DEBUGGING | BSF_SECTION_SYM)) &&
- !bfd_is_und_section(symbol->section) &&
- !bfd_is_com_section(symbol->section))
- *out++ = symbol;
+ /* remove symbols not useful for disassemble */
+ in = out = disasm_symbols;
+ for (offset = 0; offset < disasm_num_symbols; offset++) {
+ symbol = *in++;
+ if (symbol->name &&
+ symbol->name[0] != '\0' &&
+ !(symbol->flags & (BSF_DEBUGGING | BSF_SECTION_SYM)) &&
+ !bfd_is_und_section(symbol->section) &&
+ !bfd_is_com_section(symbol->section))
+ *out++ = symbol;
+ }
+ disasm_num_symbols = out - disasm_symbols;
+ qsort(disasm_symbols, disasm_num_symbols,
+ sizeof(asymbol *), disasm_compare_symbols);
}
- disasm_num_symbols = out - disasm_symbols;
- qsort(disasm_symbols, disasm_num_symbols,
- sizeof(asymbol *), disasm_compare_symbols);
}
#endif
}
- [Guile-commits] 171/437: Add the new ccall test case to test interleaved C and jit function calls, (continued)
- [Guile-commits] 171/437: Add the new ccall test case to test interleaved C and jit function calls, Andy Wingo, 2018/07/02
- [Guile-commits] 51/437: switch to GPLv3, Andy Wingo, 2018/07/02
- [Guile-commits] 160/437: Correct bogus logic caused by wrong optimizations., Andy Wingo, 2018/07/02
- [Guile-commits] 05/437: use autoheader like every other package in this world, Andy Wingo, 2018/07/02
- [Guile-commits] 341/437: Add missing float rsbi strings, Andy Wingo, 2018/07/02
- [Guile-commits] 296/437: ALPHA: Implement lightning Alpha port., Andy Wingo, 2018/07/02
- [Guile-commits] 207/437: Correct race condition if register is written more than once, Andy Wingo, 2018/07/02
- [Guile-commits] 394/437: Move multiply defined macro to a single header file., Andy Wingo, 2018/07/02
- [Guile-commits] 366/437: Correct inconsistency with jit_regno_patch, Andy Wingo, 2018/07/02
- [Guile-commits] 421/437: Remove documentation from embedded GNU lightning, Andy Wingo, 2018/07/02
- [Guile-commits] 195/437: Minor updates when testing on a prototype, quadcore Loongson mips.,
Andy Wingo <=
- [Guile-commits] 332/437: Add test case to check possible issues with 2 contexts, Andy Wingo, 2018/07/02
- [Guile-commits] 189/437: Pass all but the (not yet implemented) qmul and qdiv tests in sparc, Andy Wingo, 2018/07/02
- [Guile-commits] 217/437: Adjust lightning to work on ppc AIX., Andy Wingo, 2018/07/02
- [Guile-commits] 223/437: Build and pass all tests on big endian Irix mips using the n32 abi., Andy Wingo, 2018/07/02
- [Guile-commits] 205/437: Properly split instruction groups for predicate registers., Andy Wingo, 2018/07/02
- [Guile-commits] 391/437: aarch64: Correct va_list offsets and double load., Andy Wingo, 2018/07/02
- [Guile-commits] 304/437: Correct typo in documentation., Andy Wingo, 2018/07/02
- [Guile-commits] 409/437: Correct binutils version detection, Andy Wingo, 2018/07/02
- [Guile-commits] 310/437: Allow jit_jmpi on an immediate constant address., Andy Wingo, 2018/07/02
- [Guile-commits] 264/437: ARM: Do not use ldrt/strt by default, Andy Wingo, 2018/07/02