Skip to content

Commit

Permalink
Fix armv7l compilation (#30253)
Browse files Browse the repository at this point in the history
* src/task.c: Use `bx` instead of `br` instruction on armv7l

* Fix typo and incorrect initialization within `jl_getauxval` on armv7l.
  • Loading branch information
staticfloat authored Dec 9, 2018
1 parent a0bc8fd commit d7c3926
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/processor_arm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ static inline unsigned long jl_getauxval(unsigned long type)
{
// First, try resolving getauxval in libc
auto libc = jl_dlopen(nullptr, JL_RTLD_LOCAL);
static (unsigned long (*)(unsigned long) getauxval_p;
if (jl_dlsym(libc, "getauxval", &getauxval_p, 0) {
static unsigned long (*getauxval_p)(unsigned long) = NULL;
if (getauxval_p == NULL && jl_dlsym(libc, "getauxval", (void **)&getauxval_p, 0)) {
return getauxval_p(type);
}

Expand Down
4 changes: 3 additions & 1 deletion src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,9 @@ static void jl_start_fiber(jl_ucontext_t *lastt, jl_ucontext_t *t)
asm(" mov sp, %0;\n"
" mov lr, #0;\n" // Clear link register (lr) and frame pointer
" mov fp, #0;\n" // (fp) to terminate unwinder.
" br %1;\n" // call `fn` with fake stack frame
" bx %1;\n" // call `fn` with fake stack frame. While `bx` can change
// the processor mode to thumb, this will never happen
// because all our addresses are word-aligned.
" udf #0" // abort
: : "r" (stk), "r"(fn) : "memory" );
#else
Expand Down

2 comments on commit d7c3926

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan

Please sign in to comment.