diff options
author | Stefan Schulze Frielinghaus <stefansf@linux.ibm.com> | 2019-10-08 12:32:15 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-22 02:39:03 -0400 |
commit | fd8b666acfee5524a2d7c8b845a3782f6a89bec7 (patch) | |
tree | 4ce0d732ef341bcffa721f6d25f2cf4dcd476fd8 /rts/Libdw.c | |
parent | aa31ceaf7568802590f73a740ffbc8b800096342 (diff) | |
download | haskell-fd8b666acfee5524a2d7c8b845a3782f6a89bec7.tar.gz |
Implement s390x LLVM backend.
This patch adds support for the s390x architecture for the LLVM code
generator. The patch includes a register mapping of STG registers onto
s390x machine registers which enables a registerised build.
Diffstat (limited to 'rts/Libdw.c')
-rw-r--r-- | rts/Libdw.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/rts/Libdw.c b/rts/Libdw.c index 33a40a1f37..d45d9d0e5d 100644 --- a/rts/Libdw.c +++ b/rts/Libdw.c @@ -330,6 +330,35 @@ static bool set_initial_registers(Dwfl_Thread *thread, ); return dwfl_thread_state_registers(thread, 0, 9, regs); } +#elif defined(s390x_HOST_ARCH) +static bool set_initial_registers(Dwfl_Thread *thread, + void *arg STG_UNUSED) { + Dwarf_Word regs[32]; + __asm__ ("stmg %%r0,%%r15,0(%0)\n\t" + "std %%f0, 128(0,%0)\n\t" + "std %%f2, 136(0,%0)\n\t" + "std %%f4, 144(0,%0)\n\t" + "std %%f6, 152(0,%0)\n\t" + "std %%f1, 160(0,%0)\n\t" + "std %%f3, 168(0,%0)\n\t" + "std %%f5, 176(0,%0)\n\t" + "std %%f7, 184(0,%0)\n\t" + "std %%f8, 192(0,%0)\n\t" + "std %%f10, 200(0,%0)\n\t" + "std %%f12, 208(0,%0)\n\t" + "std %%f14, 216(0,%0)\n\t" + "std %%f9, 224(0,%0)\n\t" + "std %%f11, 232(0,%0)\n\t" + "std %%f13, 240(0,%0)\n\t" + "std %%f15, 248(0,%0)\n\t" + "larl %%r0,0\n\t" + "stg %%r0, 112(0,%0)\n\t" + : /* no output */ + :"r" (®s[0]) /* input */ + :"%r0" /* clobbered */ + ); + return dwfl_thread_state_registers(thread, 0, 32, regs); +} #else # error "Please implement set_initial_registers() for your arch" #endif |