https://bugs.winehq.org/show_bug.cgi?id=38719
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|64-bit ARM Windows |64-bit ARM Windows |applications from Windows |applications from Windows |SDK for Windows 10 crash |SDK for Windows 10 crash |when accessing TEB/PEB |when accessing TEB/PEB |members (AArch64 platform |members (AArch64 platform |specific register X18 used |specific register X18 must |for TEB?) |be reserved for TEB)
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
I've refined the summary in case it's referred to in mailing lists (distros, libc).
Example 'ld-linux-aarch64.so.1' (which is 'ld-2.19-2014.08-1-git.so'), taken from my Linaro aarch64-linux-gnu 4.9 cross toolchain (Linux x86_64 host)
Following X18 references:
--- snip --- 0000000000006790 _dl_rtld_di_serinfo::add_path MOV X19, X18 0000000000007E94 _dl_rtld_di_serinfo MOV X18, X21 0000000000007EB8 _dl_rtld_di_serinfo MOV X18, X21 0000000000007F44 _dl_rtld_di_serinfo MOV X18, X21 0000000000007F94 _dl_rtld_di_serinfo MOV X18, X21 0000000000007FA4 _dl_rtld_di_serinfo MOV X18, X21 0000000000008048 do_lookup_x::check_match LDR W2, [X18,#0x3C] 000000000000806C do_lookup_x::check_match LDR X0, [X18,#0x28] 0000000000008070 do_lookup_x::check_match OV X20, X18 0000000000008080 do_lookup_x::check_match LDR X2, [X18,#0x20] 0000000000008084 do_lookup_x::check_match LDR X1, [X18,#0x18] 000000000000853C do_lookup_x MOV X18, X23 00000000000086B0 do_lookup_x MOV X18, X23 0000000000015168 _dl_tlsdesc_dynamic STP X17, X18, [SP,#0xA0+var_40] 0000000000015210 _dl_tlsdesc_dynamic LDP X17, X18, [SP,#0xA0+var_40] 0000000000015240 _dl_tlsdesc_resolve_rela STP X17, X18, [SP,#0xA0+var_10] 00000000000152F8 _dl_tlsdesc_resolve_rela LDP X17, X18, [SP,#0xA0+var_10] 0000000000015330 _dl_tlsdesc_resolve_hold STP X17, X18, [SP,#0xB0+var_10] 00000000000153EC _dl_tlsdesc_resolve_hold LDP X17, X18, [SP,#0xB0+var_10] --- snip ---
No special treatment, it's really used as general purpose register.
The _dl_tlsdesc* X18 references result from NSAVEXREGPAIRS macro usage:
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/aarch64/dl-tlsdesc....
Regards