mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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
This commit is contained in:
parent
8c462f8ff5
commit
76d83bde4a
5 changed files with 32 additions and 24 deletions
17
dyngen.c
17
dyngen.c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue