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 31704 lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp
lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
lib/Target/WebAssembly/WebAssemblyInstrInfo.td
test/CodeGen/WebAssembly/immediates.ll
|
It looks like APFloat's NaN printing doesn't include the significand (the "(n-char-sequence)"). I don't want to bikeshed on the format here, but we'll need to do *something* to preserve all the information in any case. Can you add asserts, or perhaps just highly-visible comments, indicating that we're missing functionality here?