8 Commits (9206f48bce61478c6fb845a0e30d7dd68930175e)

Author SHA1 Message Date
Hugo Melder dc031d2741
Windows on ARM64: Support Visual Studio ABI sret mechanism for non-trivial data types (#289)
* Add objc_msgSend_stret2

* Guard and Export objc_msgSend_stret2

* Remove architecture hackery in CMake

* Add objc_msgSend test for WoA64

* Add doc comment for objc_msgSend_stret2
2 years ago
Hugo Melder 5cf2b7350e
AArch64 objc_msgSend: Fix argument corruption due to invalid stack pointer offset (#266)
* Fix argument corruption due to invalid sp offset

* Bump runtime version
2 years ago
Hugo Melder ab23f14fd7
Initial Windows on ARM (AArch64) Support (#249)
* Conditionally include ntdll.dll

* Use text relocation instead of GOT

* Use FlushInstructionCache instead of clear_cache for arm64

* Load address in two stages (adrp, add)

* objc_msgSend.aarch64.S add comments

* Add seh directives

* Move .seh_proc into slow sloop section

* Comment out cfi directives

* Substitute raw .seh directives with macros

* Add documentation of SEH annotations

* Detect CPU Architecture with preprocessor

* Cleanup CMakeLists.txt

Co-authored-by: David Chisnall <davidchisnall@users.noreply.github.com>

* Remove line in objc_msgSend.aarch64.S

Co-authored-by: David Chisnall <davidchisnall@users.noreply.github.com>

* Change Test CMakeList to use ARCHITECTURE var

* Use existing clear cache macro

* Change _WIN64 to _WIN32 and reorder labels

* Remove macro and replace _WIN64 with _WIN32

* Remove argument from non-win32 macro

---------

Co-authored-by: David Chisnall <davidchisnall@users.noreply.github.com>
2 years ago
David Chisnall b1964451e1 Fix the AArch64 small object class lookup.
This was generating a relocation that didn't do the right thing and
didn't raise linker errors.  Now it is using GOT-relative addressing.

In combination with the last two commits, this now makes all of the
objc_msgSend tests pass on AArch64.

Fixes #105
6 years ago
David Chisnall c1a3d8f470 Fix stack resetting for objc_msgSend on ARM.
If we called into C to find the IMP (e.g. for forwarding), we were then
reloading all of the arguments but failing to adjust the stack pointer
by the correct amount, leaving it around 192 bytes offset from its
correct location.  This, unsurprisingly, led to crashing and other
exciting behaviour.
6 years ago
David Chisnall 60a657fbc6 Fix CFA calculation in AArch64 objc_msgSend.
Prior to this, throwing an exception from a +initialize method would
leave the stack pointer 16 bytes offset from its correct location.
6 years ago
David Chisnall c7c193e4c7 Use the correct compare instruction. 10 years ago
David Chisnall b952a21abe Add objc_msgSend for AArch64.
An interesting feature of the AArch64 ABI simplifies this code relative to other platforms.  AArch64 reserves an extra register (x8) for the address of struct returns, giving the
10 years ago