Richard Henderson <richard.hender...@linaro.org> writes: > ARM is more complicated than the others, in that we also > have trampolines for using SA_RESTORER with FDPIC, and > we need to create trampolines for both ARM and Thumb modes. > > Cc: qemu-...@nongnu.org > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > linux-user/arm/target_signal.h | 2 + > linux-user/arm/signal.c | 170 +++++++++++++++++++-------------- > 2 files changed, 100 insertions(+), 72 deletions(-) > > + > + /* ARM sigframe */ > + _Static_assert(SIGFRAME_FDPIC_OFS <= 0xfff); > + __put_user(0xe59d9000 | SIGFRAME_FDPIC_OFS, &tramp[i++]); > + __put_user(0xe8998200, &tramp[i++]);
Erm is this based on your c11 series? > + > + /* Thumb sigframe */ > + _Static_assert(SIGFRAME_FDPIC_OFS <= 0xff << 2); > + _Static_assert((SIGFRAME_FDPIC_OFS & 3) == 0); > + __put_user(0x9a00e9dd | (SIGFRAME_FDPIC_OFS << 14), &tramp[i++]); > + __put_user(0x46c04750, &tramp[i++]); > + > + /* ARM rt_sigframe */ > + _Static_assert(RT_SIGFRAME_FDPIC_OFS <= 0xfff); > + __put_user(0xe59d9000 | RT_SIGFRAME_FDPIC_OFS, &tramp[i++]); > + __put_user(0xe8998200, &tramp[i++]); > + > + /* Thumb rt_sigframe */ > + _Static_assert(RT_SIGFRAME_FDPIC_OFS <= 0xff << 2); > + _Static_assert((RT_SIGFRAME_FDPIC_OFS & 3) == 0); > + __put_user(0x9a00e9dd | (RT_SIGFRAME_FDPIC_OFS << 14), &tramp[i++]); > + __put_user(0x46c04750, &tramp[i++]); > + > + unlock_user(tramp, sigtramp_page, total_size); > +} -- Alex Bennée