[clang] [llvm] [AArch64] Support for 9.5-A PAuthLR (PR #75947)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 19 08:39:24 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 1f88e62db40950d48ee83ea31281689c54016709 a480e82f56d3dfc7cf8dc5a63ca8bf56abd29a1b -- clang/test/Driver/aarch64-pauth-lr.c clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/AArch64.cpp clang/lib/Basic/Targets/ARM.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/CodeGen/Targets/AArch64.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/test/CodeGen/aarch64-branch-protection-attr.c clang/test/Driver/aarch64-v95a.c clang/test/Preprocessor/aarch64-target-features.c llvm/include/llvm/TargetParser/AArch64TargetParser.h llvm/include/llvm/TargetParser/ARMTargetParserCommon.h llvm/lib/Target/AArch64/AArch64InstrInfo.cpp llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h llvm/lib/Target/AArch64/AArch64PointerAuth.cpp llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp llvm/lib/TargetParser/ARMTargetParserCommon.cpp llvm/unittests/TargetParser/TargetParserTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp b/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
index c0a486a8c7..334149a6bf 100644
--- a/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
+++ b/llvm/lib/Target/AArch64/AArch64PointerAuth.cpp
@@ -173,8 +173,7 @@ void AArch64PointerAuth::authenticateLR(
.setMIFlag(MachineInstr::FrameDestroy);
} else {
BuildPACM(*Subtarget, MBB, TI, DL, MachineInstr::FrameDestroy, PACSym);
- BuildMI(MBB, TI, DL,
- TII->get(UseBKey ? AArch64::RETAB : AArch64::RETAA))
+ BuildMI(MBB, TI, DL, TII->get(UseBKey ? AArch64::RETAB : AArch64::RETAA))
.copyImplicitOps(*MBBI)
.setMIFlag(MachineInstr::FrameDestroy);
}
diff --git a/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp b/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
index 423d5cf4d7..c8cebaa599 100644
--- a/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
+++ b/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp
@@ -900,7 +900,7 @@ static DecodeStatus DecodePCRelLabel16(MCInst &Inst, unsigned Imm,
return Fail;
ImmVal = -ImmVal;
if (!Decoder->tryAddingSymbolicOperand(Inst, (ImmVal << 2), Addr,
- /*IsBranch=*/ false, 0, 0, 4))
+ /*IsBranch=*/false, 0, 0, 4))
Inst.addOperand(MCOperand::createImm(ImmVal));
return Success;
}
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
index c34c8c186b..3640773e74 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp
@@ -320,7 +320,7 @@ static uint64_t adjustFixupValue(const MCFixup &Fixup, const MCValue &Target,
SignedValue = -SignedValue;
Value = static_cast<uint64_t>(SignedValue);
// Check valid 18-bit unsigned range.
- if (SignedValue < 0 || SignedValue > ((1<<18)-1))
+ if (SignedValue < 0 || SignedValue > ((1 << 18) - 1))
Ctx.reportError(Fixup.getLoc(), "fixup value out of range");
// Low two bits are not encoded (4-byte alignment assumed).
if (Value & 0b11)
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
index 8054c00727..c3e12b6d80 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp
@@ -335,9 +335,10 @@ uint32_t AArch64MCCodeEmitter::getCondBranchTargetOpValue(
/// getPAuthPCRelOpValue - Return the encoded value for a pointer
/// authentication pc-relative operand.
-uint32_t AArch64MCCodeEmitter::getPAuthPCRelOpValue(
- const MCInst &MI, unsigned OpIdx, SmallVectorImpl<MCFixup> &Fixups,
- const MCSubtargetInfo &STI) const {
+uint32_t
+AArch64MCCodeEmitter::getPAuthPCRelOpValue(const MCInst &MI, unsigned OpIdx,
+ SmallVectorImpl<MCFixup> &Fixups,
+ const MCSubtargetInfo &STI) const {
const MCOperand &MO = MI.getOperand(OpIdx);
// If the destination is an immediate, invert sign as it's a negative value
``````````
</details>
https://github.com/llvm/llvm-project/pull/75947
More information about the llvm-commits
mailing list