[llvm-dev] Why is there no EmitInt64 in AsmPrinter?

via llvm-dev llvm-dev at lists.llvm.org
Tue Mar 20 11:49:39 PDT 2018


DWARF already needs to emit 64-bit values, being the type-unit hashes.  How is that being done?  (If it's going directly to the streamer, then we're already assuming all assemblers are okay with what the streamer does, and adding an AsmPrinter helper seems very reasonable.)
--paulr

From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of James Henderson via llvm-dev
Sent: Friday, March 09, 2018 7:44 AM
To: llvm-dev
Subject: [llvm-dev] Why is there no EmitInt64 in AsmPrinter?

Hi all,
The AsmPrinter class supports functions like EmitInt8, EmitInt16, and EmitInt32 for writing a 1/2/4 byte directive to the assembly. Each of these calls the MCStreamer::EmitIntValue method with the corresponding size. For some reason, there is no EmitInt64, and I was wondering if there was a fundamental reason why? The EmitIntValue function appears to support 8-byte inputs.
I dug into this a bit more and found a commit way back in 2010 (r100296) that removed the "EmitInt64" equivalent, with no explanation (presumably it was unused).
I'd find this function quite helpful - I'm currently working on extending the DwarfGenerator unit-test helper class to support debug line, and I'd like to be able to write 8 byte values (e.g. to reflect DWARF64 lengths). I could trivially reinstate the function, but if there's a good reason not to, it would be good to know before I go to the effort of creating a review for it.
Thanks for any help.
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180320/70ea6587/attachment-0001.html>


More information about the llvm-dev mailing list