Skip to content

Commit cf8cc86

Browse files
committed
arm64 runtime: macro pair for objects
1 parent 0c718d3 commit cf8cc86

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

runtime/arm64.S

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,15 @@ name:
9696
#define END_FUNCTION(name) \
9797
.size name, .-name
9898

99+
#define OBJECT(name) \
100+
.data; \
101+
.align 3; \
102+
.globl name; \
103+
.type name, %object; \
104+
name:
105+
#define END_OBJECT(name) \
106+
.size name, .-name
107+
99108
/* Allocation functions and GC interface */
100109
.globl caml_system__code_begin
101110
caml_system__code_begin:
@@ -460,17 +469,13 @@ caml_system__code_end:
460469

461470
/* GC roots for callback */
462471

463-
.data
464-
.align 3
465-
.globl caml_system__frametable
466-
caml_system__frametable:
472+
OBJECT(caml_system__frametable)
467473
.quad 1 /* one descriptor */
468474
.quad .Lcaml_retaddr /* return address into callback */
469475
.short -1 /* negative frame size => use callback link */
470476
.short 0 /* no roots */
471477
.align 3
472-
.type caml_system__frametable, %object
473-
.size caml_system__frametable, .-caml_system__frametable
478+
END_OBJECT(caml_system__frametable)
474479

475480
/* Mark stack as non-executable */
476481
.section .note.GNU-stack,"",%progbits

0 commit comments

Comments
 (0)