Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit ce433f80 authored by Chris Metcalf's avatar Chris Metcalf
Browse files

tile: avoid undefined behavior with regs[TREG_TP] etc



Recent compilers warn about accesses to arrays past the end,
which is supported for pt_regs and sigcontext with the
intended alias past the end of regs[] to sp, tp, and lr
using TREG_SP, TREG_TP, and TREG_LR.

Make the intended usage explict by providing an anonymous
union of regs[56] on the one hand, and a short __regs[53]
on the other followed by the sp, tp, and lr fields, so the
aliasing is done explicitly and is visible to the compiler.

Reviewed-by: default avatarJeff Epler <jepler@unpythonic.net>
Signed-off-by: default avatarChris Metcalf <cmetcalf@ezchip.com>
parent a5c1cb63
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment