File tree Expand file tree Collapse file tree 4 files changed +35
-7
lines changed
Expand file tree Collapse file tree 4 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 1+ PLATFORM_ARM64_ASM_SRC = $(wildcard platform/arm64/* .asm)
2+ PLATFORM_ASM_SRC += $(PLATFORM_ARM64_ASM_SRC )
3+
4+ PLATFORM_ARM64_ASM_OBJ = $(PLATFORM_ARM64_ASM_SRC:platform/%.asm=obj/%.o )
5+ PLATFORM_ASM_OBJ += $(PLATFORM_ARM64_ASM_OBJ )
6+
7+ # Add the objects to expected variables.
8+ LIBSDRT_PLATFORM_OBJ += $(PLATFORM_ARM64_ASM_OBJ )
9+ LIBSDMD_PLATFORM_OBJ += $(PLATFORM_ARM64_ASM_OBJ )
Original file line number Diff line number Diff line change 1+ . global ___sd_gc_push_registers
2+
3+ . section __TEXT , __text
4+
5+ ___sd_gc_push_registers:
6+ ; Standard call ABI. x29 is the frame pointer and x30 the link register.
7+ sub sp , sp , # 96
8+ stp x29 , x30 , [ sp , # 80 ]
9+ add x29 , sp , # 80
10+ ; Registers x19-28 are callee saved.
11+ stp x19 , x20 , [ sp , # 0 ]
12+ stp x21 , x22 , [ sp , # 16 ]
13+ stp x23 , x24 , [ sp , # 32 ]
14+ stp x25 , x26 , [ sp , # 48 ]
15+ stp x27 , x28 , [ sp , # 64 ]
16+ ; This method is passed a delegate. x0 contains the context as a first argument
17+ ; and x1, the second argument is the function pointer. x0 do not need any special
18+ ; threatement as it is also the first argument when calling the delegate.
19+ blr x1
20+ ; Restore the frame pointer and link register and return.
21+ ldp x29 , x30 , [ sp , # 80 ]
22+ add sp , sp , # 96
23+ ret
Original file line number Diff line number Diff line change 1818
1919ifeq ($(ARCH ) ,x86_64)
2020 include platform/x64/x64.mak
21+ else ifeq ($(ARCH),arm64)
22+ include platform/arm64/arm64.mak
2123endif
2224
2325# FIXME: depfiles.
Original file line number Diff line number Diff line change @@ -2,13 +2,7 @@ module d.gc.stack;
22
33import d.gc.types;
44
5- version (OSX ) {
6- // For some reason OSX's symbol get a _ prepended.
7- extern (C ) void _sd_gc_push_registers(void delegate ());
8- alias __sd_gc_push_registers = _sd_gc_push_registers;
9- } else {
10- extern (C ) void __sd_gc_push_registers(void delegate ());
11- }
5+ extern (C ) void __sd_gc_push_registers(void delegate ());
126
137@property
148void * SkipScanStack () {
You can’t perform that action at this time.
0 commit comments