LLVM 20.0.0git
MCWin64EH.h
Go to the documentation of this file.
1//===- MCWin64EH.h - Machine Code Win64 EH support --------------*- 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// This file contains declarations to support the Win64 Exception Handling
10// scheme in MC.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_MC_MCWIN64EH_H
15#define LLVM_MC_MCWIN64EH_H
16
17#include "llvm/MC/MCWinEH.h"
19
20namespace llvm {
21class MCStreamer;
22class MCSymbol;
23
24namespace Win64EH {
28 }
29 static WinEH::Instruction Alloc(MCSymbol *L, unsigned Size) {
31 -1, Size);
32 }
34 return WinEH::Instruction(UOP_PushMachFrame, L, -1, Code ? 1 : 0);
35 }
37 unsigned Offset) {
38 return WinEH::Instruction(Offset > 512 * 1024 - 8 ? UOP_SaveNonVolBig
40 L, Reg, Offset);
41 }
43 unsigned Offset) {
44 return WinEH::Instruction(Offset > 512 * 1024 - 8 ? UOP_SaveXMM128Big
46 L, Reg, Offset);
47 }
48 static WinEH::Instruction SetFPReg(MCSymbol *L, unsigned Reg, unsigned Off) {
49 return WinEH::Instruction(UOP_SetFPReg, L, Reg, Off);
50 }
51};
52
54public:
55 void Emit(MCStreamer &Streamer) const override;
56 void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI,
57 bool HandlerData) const override;
58};
59
61public:
62 void Emit(MCStreamer &Streamer) const override;
63 void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI,
64 bool HandlerData) const override;
65};
66
68public:
69 void Emit(MCStreamer &Streamer) const override;
70 void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI,
71 bool HandlerData) const override;
72};
73}
74} // end namespace llvm
75
76#endif
uint64_t Size
unsigned Reg
Streaming machine code generation interface.
Definition: MCStreamer.h:213
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Definition: MCSymbol.h:41
void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI, bool HandlerData) const override
Definition: MCWin64EH.cpp:2566
void Emit(MCStreamer &Streamer) const override
This emits the unwind info sections (.pdata and .xdata in PE/COFF).
Definition: MCWin64EH.cpp:2541
void Emit(MCStreamer &Streamer) const override
This emits the unwind info sections (.pdata and .xdata in PE/COFF).
Definition: MCWin64EH.cpp:2586
void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI, bool HandlerData) const override
Definition: MCWin64EH.cpp:2611
void Emit(MCStreamer &Streamer) const override
This emits the unwind info sections (.pdata and .xdata in PE/COFF).
Definition: MCWin64EH.cpp:237
void EmitUnwindInfo(MCStreamer &Streamer, WinEH::FrameInfo *FI, bool HandlerData) const override
Definition: MCWin64EH.cpp:253
@ UOP_SaveNonVolBig
Definition: Win64EH.h:35
@ UOP_SaveNonVol
Definition: Win64EH.h:34
@ UOP_AllocLarge
Definition: Win64EH.h:31
@ UOP_SetFPReg
Definition: Win64EH.h:33
@ UOP_SaveXMM128
Definition: Win64EH.h:38
@ UOP_AllocSmall
Definition: Win64EH.h:32
@ UOP_SaveXMM128Big
Definition: Win64EH.h:39
@ UOP_PushNonVol
Definition: Win64EH.h:30
@ UOP_PushMachFrame
Definition: Win64EH.h:40
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:480
static WinEH::Instruction SaveXMM(MCSymbol *L, unsigned Reg, unsigned Offset)
Definition: MCWin64EH.h:42
static WinEH::Instruction PushNonVol(MCSymbol *L, unsigned Reg)
Definition: MCWin64EH.h:26
static WinEH::Instruction PushMachFrame(MCSymbol *L, bool Code)
Definition: MCWin64EH.h:33
static WinEH::Instruction SaveNonVol(MCSymbol *L, unsigned Reg, unsigned Offset)
Definition: MCWin64EH.h:36
static WinEH::Instruction Alloc(MCSymbol *L, unsigned Size)
Definition: MCWin64EH.h:29
static WinEH::Instruction SetFPReg(MCSymbol *L, unsigned Reg, unsigned Off)
Definition: MCWin64EH.h:48