Don't use %rcx directly with CoffTlsGetAddr (#5278)

Avoid naming %rcx as written by the CoffTlsGetAddr pseudo-instruction in the x64 backend, and instead emit a fixed-def constraint for a fresh VReg and %rcx.
This commit is contained in:
Trevor Elliott
2022-11-16 11:32:09 -08:00
committed by GitHub
parent 5a006674c3
commit 4780bd5902
4 changed files with 31 additions and 7 deletions

View File

@@ -4966,6 +4966,7 @@ fn test_x64_emit() {
Inst::CoffTlsGetAddr {
symbol: ExternalName::User(UserExternalNameRef::new(0)),
dst: WritableGpr::from_writable_reg(w_rax).unwrap(),
tmp: WritableGpr::from_writable_reg(w_rcx).unwrap(),
},
"8B050000000065488B0C2558000000488B04C1488D8000000000",
"%rax = coff_tls_get_addr User(userextname0)",