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:
@@ -46,6 +46,9 @@ pub enum LibCall {
|
||||
Memset,
|
||||
/// libc.memmove
|
||||
Memmove,
|
||||
|
||||
/// Elf __tls_get_addr
|
||||
ElfTlsGetAddr,
|
||||
}
|
||||
|
||||
impl fmt::Display for LibCall {
|
||||
@@ -71,6 +74,8 @@ impl FromStr for LibCall {
|
||||
"Memcpy" => Ok(Self::Memcpy),
|
||||
"Memset" => Ok(Self::Memset),
|
||||
"Memmove" => Ok(Self::Memmove),
|
||||
|
||||
"ElfTlsGetAddr" => Ok(Self::ElfTlsGetAddr),
|
||||
_ => Err(()),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user