Commit 4ff3a642 authored by Ben Gamari's avatar Ben Gamari Committed by Simon Marlow
Browse files

Fix register clobber list in StgRun for ARM



The ARM implementation of StgRun does not claim that it clobbers r7-r12. As a
result, the compiler will sometimes put the returned RegTable in one of these
registers, resulting in an invalid RegTable to be returned. Hilarity ensues.
Signed-off-by: default avatarBen Gamari <bgamari.foss@gmail.com>
parent 50c07f74
...@@ -672,7 +672,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { ...@@ -672,7 +672,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) {
"ldmfd sp!, {r4-r10, fp, ip, lr}\n\t" "ldmfd sp!, {r4-r10, fp, ip, lr}\n\t"
: "=r" (r) : "=r" (r)
: "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES) : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
: : "%r4", "%r5", "%r6", "%r8", "%r9", "%r10", "%fp", "%ip", "%lr"
); );
return r; return r;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment