diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 21:22:10 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 21:22:10 +0000 |
commit | 76d83bde4a804e02bd944ecad648999be2f34ab7 (patch) | |
tree | ef459babd38974d85f1edfab46197a5573ca31dd /dyngen.c | |
parent | 8c462f8ff580e346b0e02373e2ed47903b119c13 (diff) |
Fixes for s/390 host support, by Bastian Blank.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3693 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'dyngen.c')
-rw-r--r-- | dyngen.c | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1495,8 +1495,8 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, p = (void *)(p_end - 2); if (p == p_start) error("empty code for %s", name); - if (get16((uint16_t *)p) != 0x07fe && get16((uint16_t *)p) != 0x07f4) - error("br %%r14 expected at the end of %s", name); + if ((get16((uint16_t *)p) & 0xfff0) != 0x07f0) + error("br expected at the end of %s", name); copy_size = p - p_start; } #elif defined(HOST_ALPHA) @@ -2120,6 +2120,19 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, fprintf(outfile, " *(uint8_t *)(gen_code_ptr + %d) = %s + %d;\n", reloc_offset, relname, addend); break; + case R_390_PC32DBL: + if (ELF32_ST_TYPE(symtab[ELFW(R_SYM)(rel->r_info)].st_info) == STT_SECTION) { + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) += " + "((long)&%s - (long)gen_code_ptr) >> 1;\n", + reloc_offset, name); + } + else + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "(%s + %d - ((uint32_t)gen_code_ptr + %d)) >> 1;\n", + reloc_offset, relname, addend, reloc_offset); + break; default: error("unsupported s390 relocation (%d)", type); } |