[PATCH] D11914: WebAssembly: print immediates

Dan Gohman via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 15:48:12 PDT 2015


sunfish added inline comments.

================
Comment at: llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:123
@@ +122,3 @@
+        // WebAssembly only has NaNs that are positive, quiet, without payload.
+        FP = CanonicalNaN;
+      // Use C99's hexadecimal floating-point representation.
----------------
WebAssembly does have NaNs that have sign bits and payloads, so the  comment here is incorrect.

Canonicalization here isn't useful since APFloat currently ignores NaN payloads. Could you change this canonicalization code to assert if a NaN is non-canonical? That won't happen in any code we write for a while, and when it does, the assert will fail and remind us that we need to fix this.


Repository:
  rL LLVM

http://reviews.llvm.org/D11914





More information about the llvm-commits mailing list