aboutsummaryrefslogtreecommitdiff
path: root/backend/include/rcc/Target/RISCV/RISCVTarget.h
blob: 948e22dad3dd8150cab614a5e7d049113072b697 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// SPDX-License-Identifier: GPL-3.0-or-later

#ifndef RCC_TARGET_RISCV_RISCVTARGET_H
#define RCC_TARGET_RISCV_RISCVTARGET_H

#include "rcc/CodeGen/TargetMIRTextInfo.h"
#include "rcc/CodeGen/TargetRegisterInfo.h"
#include "rcc/Support/Error.h"
#include "rcc/Target/RISCV/RISCVRegisters.h"

#include <cstdint>
#include <memory>

namespace rcc::riscv {

[[nodiscard]] Expected<PhysicalRegister> physicalRegister(PhysicalRegisterID ID);
[[nodiscard]] Expected<TargetRegisterInfo> createRegisterInfo();
[[nodiscard]] Expected<TargetMIRTextInfo> createMIRTextInfo();
[[nodiscard]] std::shared_ptr<const RegisterMask> createCallPreservedMask();

} // namespace rcc::riscv

#endif // RCC_TARGET_RISCV_RISCVTARGET_H