aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/e820func.c
diff options
context:
space:
mode:
authorhpa <hpa>2001-12-17 02:08:56 +0000
committerhpa <hpa>2001-12-17 02:08:56 +0000
commiteaed19412ec5964fd31ae7a0b365c81fa0321c52 (patch)
tree4c6cf677e1d41379fdd2e59fe3f96482c06e18ed /memdisk/e820func.c
parent9d0869d27f663580d408e76cb2ea210714dea553 (diff)
downloadsyslinux.git-eaed19412ec5964fd31ae7a0b365c81fa0321c52.tar.gz
syslinux.git-eaed19412ec5964fd31ae7a0b365c81fa0321c52.tar.xz
syslinux.git-eaed19412ec5964fd31ae7a0b365c81fa0321c52.zip
Clean up gcc version dependencies, mostly related to asm() statements.
Diffstat (limited to 'memdisk/e820func.c')
-rw-r--r--memdisk/e820func.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/memdisk/e820func.c b/memdisk/e820func.c
index 3087d33e..57ab0fca 100644
--- a/memdisk/e820func.c
+++ b/memdisk/e820func.c
@@ -28,10 +28,14 @@ int nranges;
void e820map_init(void)
{
+ struct e820range *rp = ranges;
+ unsigned int rdw = sizeof(ranges) >> 2;
nranges = 1;
- asm volatile("cld ; rep ; stosl %0,%%es:(%1)"
- :: "a" (0), "D" (ranges), "c" (sizeof(ranges) >> 2)
- : "edi", "ecx");
+
+ asm volatile("cld ; rep ; stosl %2,%%es:(%0)"
+ : "+D" (rp), "+c" (rdw)
+ : "a" (0)
+ : "memory");
ranges[1].type = -1;
}