aboutsummaryrefslogtreecommitdiff
path: root/src/system.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2012-05-28 18:57:06 -0400
committerKevin O'Connor <kevin@koconnor.net>2012-05-30 21:05:29 -0400
commit41966dac84ab7918ec57421a2122eaca0bfcff05 (patch)
tree35d08513c47bac99ba77548a7bbf6832da3b61be /src/system.c
parent8ab4a7de12a2fc776822c82cc4233a37b35c40f3 (diff)
downloadseabios-hppa-41966dac84ab7918ec57421a2122eaca0bfcff05.zip
seabios-hppa-41966dac84ab7918ec57421a2122eaca0bfcff05.tar.gz
seabios-hppa-41966dac84ab7918ec57421a2122eaca0bfcff05.tar.bz2
Make sure to set dependency to segment registers in inline asm.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/system.c')
-rw-r--r--src/system.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/system.c b/src/system.c
index 898c3cc..6658e22 100644
--- a/src/system.c
+++ b/src/system.c
@@ -162,8 +162,8 @@ handle_1587(struct bregs *regs)
// Restore %ds (from %ss)
" movw %%ss, %%ax\n"
" movw %%ax, %%ds\n"
- : "+c"(count), "+S"(si)
- : : "eax", "di", "cc"); // XXX - also clobbers %es
+ : "+c"(count), "+S"(si), "+m" (__segment_ES)
+ : : "eax", "di", "cc");
set_a20(prev_a20_enable);
@@ -222,7 +222,7 @@ handle_1589(struct bregs *regs)
" movw %%ax, %%ds\n"
" movw %%ax, %%ss\n"
:
- : "S"(gdt_far)
+ : "S"(gdt_far), "m" (__segment_ES)
: "eax", "cc");
}