//===-- ARMUnwindOpAsm.cpp - ARM Unwind Opcodes Assembler -------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // This file implements the unwind opcode assembler for ARM exception handling // table. // //===----------------------------------------------------------------------===// #include "ARMUnwindOpAsm.h" #include "llvm/ADT/bit.h" #include "llvm/Support/ARMEHABI.h" #include "llvm/Support/LEB128.h" #include <cassert> usingnamespacellvm; namespace { /// UnwindOpcodeStreamer - The simple wrapper over SmallVector to emit bytes /// with MSB to LSB per uint32_t ordering. For example, the first byte will /// be placed in Vec[3], and the following bytes will be placed in 2, 1, 0, /// 7, 6, 5, 4, 11, 10, 9, 8, and so on. class UnwindOpcodeStreamer { … }; } // end anonymous namespace void UnwindOpcodeAssembler::EmitRegSave(uint32_t RegSave) { … } /// Emit unwind opcodes for .vsave directives void UnwindOpcodeAssembler::EmitVFPRegSave(uint32_t VFPRegSave) { … } /// Emit unwind opcodes to copy address from source register to $sp. void UnwindOpcodeAssembler::EmitSetSP(uint16_t Reg) { … } /// Emit unwind opcodes to add $sp with an offset. void UnwindOpcodeAssembler::EmitSPOffset(int64_t Offset) { … } void UnwindOpcodeAssembler::Finalize(unsigned &PersonalityIndex, SmallVectorImpl<uint8_t> &Result) { … }