This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] WebAssembly disassembler support
- From: Alan Modra <amodra at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 10 Apr 2017 05:30:54 -0000
- Subject: [binutils-gdb] WebAssembly disassembler support
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=aa808707033a46ee063263f4bc1bd06449851621
commit aa808707033a46ee063263f4bc1bd06449851621
Author: Pip Cet <pipcet@gmail.com>
Date: Mon Apr 10 00:10:28 2017 +0000
WebAssembly disassembler support
* wasm32-dis.c (print_insn_wasm32): Avoid DECIMAL_DIG, specify
appropriate floating-point precision directly.
Diff:
---
opcodes/ChangeLog | 5 +++++
opcodes/wasm32-dis.c | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 73a0071..1e8763e 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,8 @@
+2017-04-09 Pip Cet <pipcet@gmail.com>
+
+ * wasm32-dis.c (print_insn_wasm32): Avoid DECIMAL_DIG, specify
+ appropriate floating-point precision directly.
+
2017-04-07 Alan Modra <amodra@gmail.com>
* ppc-opc.c (powerpc_opcodes <mviwsplt, mvidsplt, lvexbx, lvepxl,
diff --git a/opcodes/wasm32-dis.c b/opcodes/wasm32-dis.c
index 80e4ffe..179a440 100644
--- a/opcodes/wasm32-dis.c
+++ b/opcodes/wasm32-dis.c
@@ -23,7 +23,6 @@
#include "opintl.h"
#include "safe-ctype.h"
#include "floatformat.h"
-#include <float.h>
#include "libiberty.h"
#include "elf-bfd.h"
#include "elf/internal.h"
@@ -405,7 +404,7 @@ print_insn_wasm32 (bfd_vma pc, struct disassemble_info *info)
if (ret < 0)
return -1;
len += ret;
- prin (stream, " %.*g", DECIMAL_DIG, fconstant);
+ prin (stream, " %.9g", fconstant);
break;
case wasm_constant_f64:
@@ -413,7 +412,7 @@ print_insn_wasm32 (bfd_vma pc, struct disassemble_info *info)
if (ret < 0)
return -1;
len += ret;
- prin (stream, " %.*g", DECIMAL_DIG, fconstant);
+ prin (stream, " %.17g", fconstant);
break;
case wasm_call: