@@ -26,7 +26,7 @@ static void print_serial(const char *buf)
{
unsigned long len = strlen(buf);
- asm volatile ("cld; addr32/rep/outsb" : "+S"(buf), "+c"(len) : "d"(0xf1));
+ asm volatile ("addr32/rep/outsb" : "+S"(buf), "+c"(len) : "d"(0xf1));
}
static void exit(int code)
@@ -109,6 +109,8 @@ static void exec_in_big_real_mode(struct insn_desc *insn)
"pushfl \n\t"
"popl %[save]+36 \n\t"
+ /* Restore DF for the harness code */
+ "cld\n\t"
"xor %[tmp], %[tmp] \n\t"
"mov %[tmp], %%gs \n\t"
: [tmp]"=&r"(tmp), [save]"+m"(save)
Some tests fail if DF=1. Restore it directly after executing the test, do not do it "magically" in print_serial. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> --- x86/realmode.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)