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:
bjorn3
2020-02-26 02:50:04 +01:00
committed by GitHub
parent 0a11736fbf
commit 0a1bb3ba6c
27 changed files with 354 additions and 19 deletions

View File

@@ -204,6 +204,7 @@ impl<'a> Context<'a> {
name: ExternalName::testcase(""),
offset: Imm64::new(0),
colocated: false,
tls: false,
});
}
self.function.global_values[gv] = data;
@@ -1443,12 +1444,14 @@ impl<'a> Parser<'a> {
}
"symbol" => {
let colocated = self.optional(Token::Identifier("colocated"));
let tls = self.optional(Token::Identifier("tls"));
let name = self.parse_external_name()?;
let offset = self.optional_offset_imm64()?;
GlobalValueData::Symbol {
name,
offset,
colocated,
tls,
}
}
other => return err!(self.loc, "Unknown global value kind '{}'", other),