mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
[WinEH] Add an EH registration and state insertion pass for 32-bit x86
This pass is responsible for constructing the EH registration object that gets linked into fs:00, which is all it does in this change. In the future, it will also insert stores to update the EH state number. I considered keeping this functionality in WinEHPrepare, but it's pretty separable and X86 specific. It has conceptually very little to do with the task of WinEHPrepare, which is currently outlining. WinEHPrepare is also in theory useful on ARM, but this logic is pretty x86 specific. Reviewers: andrew.w.kaylor, majnemer Differential Revision: http://reviews.llvm.org/D9422 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236339 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,6 +37,7 @@ enum class EncodingType {
|
||||
ARM, /// Windows NT (Windows on ARM)
|
||||
CE, /// Windows CE ARM, PowerPC, SH3, SH4
|
||||
Itanium, /// Windows x64, Windows Itanium (IA-64)
|
||||
X86, /// Windows x86, uses no CFI, just EH tables
|
||||
MIPS = Alpha,
|
||||
};
|
||||
}
|
||||
@@ -506,12 +507,13 @@ public:
|
||||
/// frame information to unwind.
|
||||
bool usesCFIForEH() const {
|
||||
return (ExceptionsType == ExceptionHandling::DwarfCFI ||
|
||||
ExceptionsType == ExceptionHandling::ARM ||
|
||||
ExceptionsType == ExceptionHandling::WinEH);
|
||||
ExceptionsType == ExceptionHandling::ARM || usesWindowsCFI());
|
||||
}
|
||||
|
||||
bool usesWindowsCFI() const {
|
||||
return ExceptionsType == ExceptionHandling::WinEH;
|
||||
return ExceptionsType == ExceptionHandling::WinEH &&
|
||||
(WinEHEncodingType != WinEH::EncodingType::Invalid &&
|
||||
WinEHEncodingType != WinEH::EncodingType::X86);
|
||||
}
|
||||
|
||||
bool doesDwarfUseRelocationsAcrossSections() const {
|
||||
|
||||
Reference in New Issue
Block a user