From: Blue Swirl <blauwirbel@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [5113] Add correct stack bias if a 64 bit stack is used
Date: Sat, 30 Aug 2008 09:20:22 +0000 [thread overview]
Message-ID: <E1KZMd4-0001WB-90@cvs.savannah.gnu.org> (raw)
Revision: 5113
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5113
Author: blueswir1
Date: 2008-08-30 09:20:21 +0000 (Sat, 30 Aug 2008)
Log Message:
-----------
Add correct stack bias if a 64 bit stack is used
Modified Paths:
--------------
trunk/linux-user/main.c
Modified: trunk/linux-user/main.c
===================================================================
--- trunk/linux-user/main.c 2008-08-29 23:01:41 UTC (rev 5112)
+++ trunk/linux-user/main.c 2008-08-30 09:20:21 UTC (rev 5113)
@@ -758,6 +758,7 @@
#endif
#ifdef TARGET_SPARC
+#define SPARC64_STACK_BIAS 2047
//#define DEBUG_WIN
@@ -780,6 +781,10 @@
abi_ulong sp_ptr;
sp_ptr = env->regbase[get_reg_index(env, cwp1, 6)];
+#ifdef TARGET_SPARC64
+ if (sp_ptr & 3)
+ sp_ptr += SPARC64_STACK_BIAS;
+#endif
#if defined(DEBUG_WIN)
printf("win_overflow: sp_ptr=0x" TARGET_ABI_FMT_lx " save_cwp=%d\n",
sp_ptr, cwp1);
@@ -822,6 +827,10 @@
/* restore the invalid window */
cwp1 = cpu_cwp_inc(env, env->cwp + 1);
sp_ptr = env->regbase[get_reg_index(env, cwp1, 6)];
+#ifdef TARGET_SPARC64
+ if (sp_ptr & 3)
+ sp_ptr += SPARC64_STACK_BIAS;
+#endif
#if defined(DEBUG_WIN)
printf("win_underflow: sp_ptr=0x" TARGET_ABI_FMT_lx " load_cwp=%d\n",
sp_ptr, cwp1);
reply other threads:[~2008-08-30 9:20 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=E1KZMd4-0001WB-90@cvs.savannah.gnu.org \
--to=blauwirbel@gmail.com \
--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).