1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

AppleM1: Support Apple Silicon M1(aarch64).

This commit is contained in:
ChenGH 2022-08-14 19:18:57 +08:00 committed by winlin
parent b787656eea
commit f2fa289fe8
24 changed files with 594 additions and 8 deletions

View file

@ -71,6 +71,9 @@
#if defined(__amd64__) || defined(__x86_64__)
#define JB_SP 12 /* The jmpbuf is int(4B) array, while MD_GET_SP covert to long(8B) pointer, so the JB_SP should be 12 which is 6*sizeof(long)/sizeof(int) */
#define MD_GET_SP(_t) *((long *)&((_t)->context[JB_SP]))
#elif defined(__aarch64__)
/* MUST be SP*2 because context is int array */
#define MD_GET_SP(_t) *((long *)&((_t)->context[13 * 2]))
#else
#error Unknown CPU architecture
#endif