* [PATCH] kvm: testsuite: Save eflags in exec_in_big_real_mode()
@ 2008-09-01 1:46 Mohammed Gamal
2008-09-01 9:56 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Mohammed Gamal @ 2008-09-01 1:46 UTC (permalink / raw)
To: kvm; +Cc: avi, riel
Save eflags in exec_in_big_real_mode(). This is needed to test instructions that
modify the eflags register.
Signed-off-by: Mohammed Gamal <m.gamal005@gmail.com>
---
user/test/x86/realmode.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/user/test/x86/realmode.c b/user/test/x86/realmode.c
index 79df0f5..906be09 100644
--- a/user/test/x86/realmode.c
+++ b/user/test/x86/realmode.c
@@ -82,6 +82,10 @@ static void exec_in_big_real_mode(const struct regs *inregs,
"test_insn: . = . + 16\n\t"
"test_insn_end: \n\t"
+ /* Save EFLAGS in outregs*/
+ "pushfl \n\t"
+ "popl %[save]+36 \n\t"
+
"xchg %%eax, %[save]+0 \n\t"
"xchg %%ebx, %[save]+4 \n\t"
"xchg %%ecx, %[save]+8 \n\t"
--
1.5.4.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kvm: testsuite: Save eflags in exec_in_big_real_mode()
2008-09-01 1:46 [PATCH] kvm: testsuite: Save eflags in exec_in_big_real_mode() Mohammed Gamal
@ 2008-09-01 9:56 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2008-09-01 9:56 UTC (permalink / raw)
To: Mohammed Gamal; +Cc: kvm, riel
Mohammed Gamal wrote:
> Save eflags in exec_in_big_real_mode(). This is needed to test instructions that
> modify the eflags register.
>
>
Applied, thanks.
> @@ -82,6 +82,10 @@ static void exec_in_big_real_mode(const struct regs *inregs,
> "test_insn: . = . + 16\n\t"
> "test_insn_end: \n\t"
>
> + /* Save EFLAGS in outregs*/
> + "pushfl \n\t"
> + "popl %[save]+36 \n\t"
> +
> "xchg %%eax, %[save]+0 \n\t"
> "xchg %%ebx, %[save]+4 \n\t"
> "xchg %%ecx, %[save]+8 \n\t"
>
I moved this after the register restoration, since the test may modify %sp.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-01 9:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-01 1:46 [PATCH] kvm: testsuite: Save eflags in exec_in_big_real_mode() Mohammed Gamal
2008-09-01 9:56 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox