[PATCH] D144012: [SPARC][MC] Fix encoding of backwards BPr branches
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 18 16:03:00 PDT 2023
jrtc27 added inline comments.
================
Comment at: llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp:50
+ unsigned d16lo = (Value >> 2) & 0x3fff;
+ return (d16hi << 20) | d16lo;
+ }
----------------
This looks good now
================
Comment at: llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp:167
+ // name offset bits flags
+ {"fixup_sparc_call30", 2, 30, MCFixupKindInfo::FKF_IsPCRel},
+ {"fixup_sparc_br22", 10, 22, MCFixupKindInfo::FKF_IsPCRel},
----------------
Could you please commit this reformatting separately? Combining significant reformatting with functional changes isn't great.
================
Comment at: llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp:353
+ // Shift the value into position.
+ if (Endian == support::little)
----------------
This seems unrelated?
================
Comment at: llvm/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h:15
namespace llvm {
namespace Sparc {
+ enum Fixups {
----------------
If you're going to reformat this, deindent the namespace too to match every other target, and commit it all separately from the functional change.
================
Comment at: llvm/test/MC/Sparc/sparc64-bpr-offset.s:3
+
+ !! SPARCv9/SPARC64 BPr branches have different offset encoding for the others,
+ !! make sure that our offset bits don't trample on other fields.
----------------
for should be from or to
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144012/new/
https://reviews.llvm.org/D144012
More information about the llvm-commits
mailing list