Skip to content

Commit

Permalink
Try and restore compilation on ARM32
Browse files Browse the repository at this point in the history
It seems like __arm32__ is not a predefined macro on gcc
Maybe __arm__ is also defined in case of __aarch64__ I did not check.
But in this case we must first check for __aarch64__, then for __arm__
  • Loading branch information
nicolas-cellier-aka-nice committed Feb 1, 2020
1 parent c855035 commit bd898a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platforms/Cross/vm/sqCogStackAlignment.h
Expand Up @@ -92,7 +92,7 @@
# define setsp(spval) __asm volatile ("mov sp, %0" : : "r"(spval))

# endif
# elif defined(__arm32__) || defined(ARM32)
# elif defined(__arm__) || defined(__arm32__) || defined(ARM32)
/* http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0041c/Cegbidie.html
* ARM DUI 0041C Page 9-7
*/
Expand Down
6 changes: 3 additions & 3 deletions platforms/unix/vm/sqUnixMain.c
Expand Up @@ -942,12 +942,12 @@ reportStackState(char *msg, char *date, int printAll, ucontext_t *uap)
# elif __sun__ && __i386__
void *fp = (void *)(uap ? uap->uc_mcontext.gregs[REG_FP] : 0);
void *sp = (void *)(uap ? uap->uc_mcontext.gregs[REG_SP] : 0);
# elif defined(__arm32__) || defined(ARM32)
void *fp = (void *)(uap ? uap->uc_mcontext.arm_fp : 0);
void *sp = (void *)(uap ? uap->uc_mcontext.arm_sp : 0);
# elif defined(__arm64__) || defined(__aarch64__) || defined(ARM64)
void *fp = (void *)(uap ? uap->uc_mcontext.regs[29] : 0);
void *sp = (void *)(uap ? uap->uc_mcontext.sp : 0);
# elif defined(__arm__) || defined(__arm32__) || defined(ARM32)
void *fp = (void *)(uap ? uap->uc_mcontext.arm_fp : 0);
void *sp = (void *)(uap ? uap->uc_mcontext.arm_sp : 0);
# else
# error need to implement extracting pc from a ucontext_t on this system
# endif
Expand Down

0 comments on commit bd898a7

Please sign in to comment.