//===- MSP430.cpp ---------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // The MSP430 is a 16-bit microcontroller RISC architecture. The instruction set // has only 27 core instructions orthogonally augmented with a variety // of addressing modes for source and destination operands. Entire address space // of MSP430 is 64KB (the extended MSP430X architecture is not considered here). // A typical MSP430 MCU has several kilobytes of RAM and ROM, plenty // of peripherals and is generally optimized for a low power consumption. // //===----------------------------------------------------------------------===// #include "Symbols.h" #include "Target.h" #include "lld/Common/ErrorHandler.h" #include "llvm/BinaryFormat/ELF.h" #include "llvm/Support/Endian.h" usingnamespacellvm; usingnamespacellvm::object; usingnamespacellvm::support::endian; usingnamespacellvm::ELF; usingnamespacelld; usingnamespacelld::elf; namespace { class MSP430 final : public TargetInfo { … }; } // namespace MSP430::MSP430(Ctx &ctx) : … { … } RelExpr MSP430::getRelExpr(RelType type, const Symbol &s, const uint8_t *loc) const { … } void MSP430::relocate(uint8_t *loc, const Relocation &rel, uint64_t val) const { … } TargetInfo *elf::getMSP430TargetInfo(Ctx &ctx) { … }