1 //===- RISCVCompressedCap.h - CHERI compression helpers --------*- C++ -*--===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_LIB_TARGET_RISCV_COMPRESSEDCAP_H
10 #define LLVM_LIB_TARGET_RISCV_COMPRESSEDCAP_H
11 
12 #include "llvm/MC/MCStreamer.h"
13 #include "llvm/Support/Alignment.h"
14 #include <cstdint>
15 
16 namespace llvm {
17 
18 namespace RISCVCompressedCap {
19 uint64_t getRepresentableLength(uint64_t Length, bool IsRV64);
20 
21 uint64_t getAlignmentMask(uint64_t Length, bool IsRV64);
22 
23 TailPaddingAmount getRequiredTailPadding(uint64_t Size, bool IsRV64);
24 
25 Align getRequiredAlignment(uint64_t Size, bool IsRV64);
26 } // namespace RISCVCompressedCap
27 } // namespace llvm
28 #endif
29