[llvm-dev] Showcase of the Windows/ARM64/MinGW target
Martin Storsjö via llvm-dev
llvm-dev at lists.llvm.org
Mon May 21 03:53:50 PDT 2018
On Mon, 21 May 2018, Hayden Livingston wrote:
> Ok. How much work was it to enable ARM64 codegen? Is it is
> significantly more work than for Linux targets? Are there any special
> relocations in ARM64 land?
It was surprisingly little work, I'd say. Yes, Windows uses COFF, and
there's a separate set of relocations for each architecture. Probably not
more work than for Linux targets, but just new things to implement.
The initial commits for ARM64 in COFF were done by Mandeep Singh Grang,
and after that, there were a few details to fill in about how the
relocations are supposed to behave. The public documentation only names
them, but luckily link.exe supported those relocations since long ago, so
I was able to use llvm-mc together with link.exe to figure out how e.g.
the IMAGE_REL_ARM64_REL21/IMAGE_REL_ARM64_PAGEOFFSET_12A relocation pairs
are supposed to handle overflow/carry.
Other than relocations, the main bits were varargs handling, hooking up
small flags and bits here and there as you find what's missing, minor
windows/coff specific details like linker directives and dllimport
handling, and slightly larger things such as stack probing and TLS.
// Martin
More information about the llvm-dev
mailing list