diff options
author | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-10 21:31:43 +0000 |
---|---|---|
committer | ths <ths@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-02-10 21:31:43 +0000 |
commit | b80029cad1dad2caaaae61de334488a6847a087e (patch) | |
tree | b9074de46b5418e326ee2866ba57d4bb02c720d2 /dyngen.c | |
parent | 43024c6a2b939ec865af3b96a4840a3db804141d (diff) | |
download | qemu-b80029cad1dad2caaaae61de334488a6847a087e.zip qemu-b80029cad1dad2caaaae61de334488a6847a087e.tar.gz qemu-b80029cad1dad2caaaae61de334488a6847a087e.tar.bz2 |
Support for more SPARC relocations, by Martin Bochnig.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2407 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'dyngen.c')
-rw-r--r-- | dyngen.c | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -2349,6 +2349,33 @@ void gen_code(const char *name, host_ulong offset, host_ulong size, reloc_offset, reloc_offset, name, addend, reloc_offset); break; + case R_SPARC_HH22: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | (((%s + %d) >> 42) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; + + case R_SPARC_LM22: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | (((%s + %d) >> 10) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; + + case R_SPARC_HM10: + fprintf(outfile, + " *(uint32_t *)(gen_code_ptr + %d) = " + "((*(uint32_t *)(gen_code_ptr + %d)) " + " & ~0x00000000) " + " | ((((%s + %d) >> 32 & 0x3ff)) & 0x00000000);\n", + reloc_offset, reloc_offset, name, addend); + break; + default: error("unsupported sparc64 relocation (%d) for symbol %s", type, name); } |