Refactor unwind; add FDE support. (#1320)

* Refactor unwind

* add FDE support

* use sink directly in emit functions

* pref off all unwinding generation with feature
This commit is contained in:
Yury Delendik
2020-01-13 10:32:55 -06:00
committed by GitHub
parent 6080eeb544
commit bd88155483
14 changed files with 1002 additions and 57 deletions

View File

@@ -63,7 +63,6 @@ use crate::settings::SetResult;
use crate::timing;
use alloc::borrow::Cow;
use alloc::boxed::Box;
use alloc::vec::Vec;
use core::fmt;
use target_lexicon::{triple, Architecture, PointerWidth, Triple};
use thiserror::Error;
@@ -382,7 +381,12 @@ pub trait TargetIsa: fmt::Display + Send + Sync {
/// Emit unwind information for the given function.
///
/// Only some calling conventions (e.g. Windows fastcall) will have unwind information.
fn emit_unwind_info(&self, _func: &ir::Function, _mem: &mut Vec<u8>) {
fn emit_unwind_info(
&self,
_func: &ir::Function,
_kind: binemit::FrameUnwindKind,
_sink: &mut dyn binemit::FrameUnwindSink,
) {
// No-op by default
}
}