Skip to contentSkip to conversation

kvm: testsuite: Save eflags in exec_in_big_real_mode()

PATCH Applied Mohammed Gamal 2 participants 2 messages Sep 1, 2008 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: testsuite: Save eflags in exec_in_big_real_mode()

Save eflags in exec_in_big_real_mode(). This is needed to test instructions that modify the eflags register.

---
 user/test/x86/realmode.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
user/test/x86/realmode.c +4 -0
index 79df0f5..906be09 100644
@@ -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"
Signature · 1 line
1.5.4.3
Applied
#1 lore raw
Quoted 4 lines · Mohammed Gamal

Save eflags in exec_in_big_real_mode(). This is needed to test instructions that modify the eflags register.

Applied, thanks.

user/test/x86/realmode.c static void exec_in_big_real_mode(const struct regs *inregs, · line 91

Quoted 12 lines
user/test/x86/realmode.c +4 -0
@@ -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.

Signature · 1 line
error compiling committee.c: too many arguments to function