File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ typedef uintptr_t gc_helper_regs_t[6];
39
39
typedef uintptr_t gc_helper_regs_t [4 ];
40
40
#elif defined(__thumb2__ ) || defined(__thumb__ ) || defined(__arm__ )
41
41
typedef uintptr_t gc_helper_regs_t [10 ];
42
+ #elif defined(__aarch64__ )
43
+ typedef uintptr_t gc_helper_regs_t [11 ]; // x19-x29
42
44
#endif
43
45
44
46
#endif
Original file line number Diff line number Diff line change @@ -123,6 +123,33 @@ STATIC void gc_helper_get_regs(gc_helper_regs_t arr) {
123
123
arr [9 ] = r13 ;
124
124
}
125
125
126
+ #elif defined(__aarch64__ )
127
+
128
+ STATIC void gc_helper_get_regs (gc_helper_regs_t arr ) {
129
+ const register long x19 asm ("x19" );
130
+ const register long x20 asm ("x20" );
131
+ const register long x21 asm ("x21" );
132
+ const register long x22 asm ("x22" );
133
+ const register long x23 asm ("x23" );
134
+ const register long x24 asm ("x24" );
135
+ const register long x25 asm ("x25" );
136
+ const register long x26 asm ("x26" );
137
+ const register long x27 asm ("x27" );
138
+ const register long x28 asm ("x28" );
139
+ const register long x29 asm ("x29" );
140
+ arr [0 ] = x19 ;
141
+ arr [1 ] = x20 ;
142
+ arr [2 ] = x21 ;
143
+ arr [3 ] = x22 ;
144
+ arr [4 ] = x23 ;
145
+ arr [5 ] = x24 ;
146
+ arr [6 ] = x25 ;
147
+ arr [7 ] = x26 ;
148
+ arr [8 ] = x27 ;
149
+ arr [9 ] = x28 ;
150
+ arr [10 ] = x29 ;
151
+ }
152
+
126
153
#else
127
154
128
155
#error "Architecture not supported for gc_helper_get_regs. Set MICROPY_GCREGS_SETJMP to use the fallback implementation."
You can’t perform that action at this time.
0 commit comments