From 908a116cfce4550c5d4bb031fc05d5110565eec9 Mon Sep 17 00:00:00 2001 From: Tomas Hajny Date: Thu, 9 Aug 2007 18:51:15 +0000 Subject: [PATCH] * preserve gs in far_strlen git-svn-id: trunk@8256 - --- rtl/go32v2/sysos.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rtl/go32v2/sysos.inc b/rtl/go32v2/sysos.inc index f17aa2c656..3ae07f2d4c 100644 --- a/rtl/go32v2/sysos.inc +++ b/rtl/go32v2/sysos.inc @@ -38,6 +38,7 @@ function far_strlen(selector : word;linear_address : longint) : longint;assemble asm movl linear_address,%edx movl %edx,%ecx + pushl %gs movw selector,%gs .Larg19: movb %gs:(%edx),%al @@ -46,6 +47,7 @@ asm incl %edx jmp .Larg19 .Larg20: + popl %gs movl %edx,%eax subl %ecx,%eax end;