Add TLS support for ELF and MachO (#1174)
* Add TLS support * Add binemit and legalize tests * Spill all caller-saved registers when necessary
This commit is contained in:
@@ -72,6 +72,7 @@ where
|
||||
name: &str,
|
||||
linkage: Linkage,
|
||||
writable: bool,
|
||||
tls: bool,
|
||||
align: Option<u8>,
|
||||
);
|
||||
|
||||
@@ -107,6 +108,7 @@ where
|
||||
id: DataId,
|
||||
name: &str,
|
||||
writable: bool,
|
||||
tls: bool,
|
||||
align: Option<u8>,
|
||||
data_ctx: &DataContext,
|
||||
namespace: &ModuleNamespace<Self>,
|
||||
@@ -188,5 +190,7 @@ pub fn default_libcall_names() -> Box<dyn Fn(ir::LibCall) -> String> {
|
||||
ir::LibCall::Memcpy => "memcpy".to_owned(),
|
||||
ir::LibCall::Memset => "memset".to_owned(),
|
||||
ir::LibCall::Memmove => "memmove".to_owned(),
|
||||
|
||||
ir::LibCall::ElfTlsGetAddr => "__tls_get_addr".to_owned(),
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user