This is an archive of the discontinued LLVM Phabricator instance.

[AArch64InstPrinter] Print TargetAddress as an uint64_t
ClosedPublic

Authored by holio0 on Nov 2 2022, 8:35 AM.

Details

Summary

Outputs readable addresses by printed 'TargetAddress' as an uint64_t
value.

bl -0x37efd56628 => bl 0xffffffc8102a99d8

Diff Detail

Event Timeline

holio0 created this revision.Nov 2 2022, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 8:35 AM
holio0 requested review of this revision.Nov 2 2022, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 2 2022, 8:35 AM
holio0 updated this revision to Diff 473597.Nov 7 2022, 1:47 AM

[AArch64InstPrinter] Print TargetAddress as an uint64_t

Outputs readable addresses by printed 'TargetAddress' as an uint64_t
value.

bl -0x37efd56628 => bl 0xffffffc8102a99d8

Differential Revision: https://reviews.llvm.org/D137260

holio0 updated this revision to Diff 473600.Nov 7 2022, 1:55 AM

Fix coding style

dmgreen added a subscriber: dmgreen.Nov 7 2022, 2:20 AM

Seems reasonable, and matches what other architectures do. Can you add a test case?

holio0 added a comment.Nov 7 2022, 2:37 AM

Seems reasonable, and matches what other architectures do. Can you add a test case?

No problem, I will study it.

holio0 updated this revision to Diff 473736.Nov 7 2022, 10:22 AM

Add a test case

holio0 updated this revision to Diff 473868.Nov 7 2022, 9:03 PM

Remove an unused variable

dmgreen accepted this revision.Nov 8 2022, 2:10 AM

Thanks. I was expecting a test using objdump or llc, but the new test looks good. It may be possible to replace StringStream, but otherwise LGTM.

llvm/unittests/Target/AArch64/AArch64InstPrinterTest.cpp
36

Could this use raw_string_ostream?

This revision is now accepted and ready to land.Nov 8 2022, 2:10 AM
holio0 updated this revision to Diff 474032.Nov 8 2022, 9:40 AM

Replace StringStream with raw_string_ostream

holio0 marked an inline comment as done.Nov 8 2022, 9:42 AM