aboutsummaryrefslogtreecommitdiff
path: root/opcodes/wasm32-dis.c
diff options
context:
space:
mode:
authorPip Cet <pipcet@gmail.com>2017-04-10 00:10:28 +0000
committerAlan Modra <amodra@gmail.com>2017-04-10 13:51:45 +0930
commitaa808707033a46ee063263f4bc1bd06449851621 (patch)
tree8154fba6f8255f96b43af9c03edd558934cede7c /opcodes/wasm32-dis.c
parent8473b4472dce9ce87aaad35ff8e975e1487f914e (diff)
downloadgdb-aa808707033a46ee063263f4bc1bd06449851621.zip
gdb-aa808707033a46ee063263f4bc1bd06449851621.tar.gz
gdb-aa808707033a46ee063263f4bc1bd06449851621.tar.bz2
WebAssembly disassembler support
* wasm32-dis.c (print_insn_wasm32): Avoid DECIMAL_DIG, specify appropriate floating-point precision directly.
Diffstat (limited to 'opcodes/wasm32-dis.c')
-rw-r--r--opcodes/wasm32-dis.c5
1 files changed, 2 insertions, 3 deletions
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: