From: Ben Taylor <sol10x86@cox.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] SPARC ops
Date: Fri, 2 Feb 2007 15:26:24 -0500 [thread overview]
Message-ID: <1900000.1170447984838.JavaMail.root@eastrmwml07.mgt.cox.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 101 bytes --]
This patch coded by Martin Bochnig (mb1x@gmx.com) adds
support for a couple of Sparc V9 operations.
[-- Attachment #2: sparc-ops.diff --]
[-- Type: text/x-patch, Size: 1981 bytes --]
diff -ruN qemu-ORIG/dyngen.c qemu/dyngen.c
--- qemu-ORIG/dyngen.c 2006-12-21 11:49:27.000000000 -0500
+++ qemu/dyngen.c 2007-02-02 15:06:56.019613000 -0500
@@ -2349,6 +2349,33 @@
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);
}
diff -ruN qemu-ORIG/elf.h qemu/elf.h
--- qemu-ORIG/elf.h 2006-07-30 15:16:29.000000000 -0400
+++ qemu/elf.h 2007-02-02 15:06:56.085548000 -0500
@@ -328,6 +328,9 @@
#define R_SPARC_11 31
#define R_SPARC_64 32
#define R_SPARC_OLO10 33
+#define R_SPARC_HH22 34
+#define R_SPARC_HM10 35
+#define R_SPARC_LM22 36
#define R_SPARC_WDISP16 40
#define R_SPARC_WDISP19 41
#define R_SPARC_7 43
reply other threads:[~2007-02-02 20:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1900000.1170447984838.JavaMail.root@eastrmwml07.mgt.cox.net \
--to=sol10x86@cox.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).