For now output using C99's hexadecimal floating-point representation.
This patch also cleans up how machine operands are printed: instead of special-casing per type of machine instruction, the code now handles operands generically.
Paths
| Differential D11914
WebAssembly: print immediates ClosedPublic Authored by jfb on Aug 10 2015, 11:29 AM.
Details Summary For now output using C99's hexadecimal floating-point representation. This patch also cleans up how machine operands are printed: instead of special-casing per type of machine instruction, the code now handles operands generically.
Diff Detail
Event Timelinejfb updated this object. sunfish edited edge metadata. sunfish added inline comments.
This revision is now accepted and ready to land.Aug 10 2015, 2:55 PM Closed by commit rL244520: WebAssembly: print immediates (authored by jfb). · Explain WhyAug 10 2015, 3:37 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 31739 llvm/trunk/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
llvm/trunk/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
llvm/trunk/lib/Target/WebAssembly/WebAssemblyInstrInfo.td
llvm/trunk/test/CodeGen/WebAssembly/immediates.ll
|
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.