delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2017/03/28/12:47:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=1ybNhwV6ZS8XkT/uiOnbaG0NGsLKTWk1JAg8ku+JHc8=;
b=TBHWb596GnVfHzCKLp7XQrk7OB7CLas7V7k60gFQLVnMo0AIR1+EEIQrvFmwDzH2AV
5gd1igDCVETInHz4RB4K7FOZXbfVAzyrde0q1bgB5Ob1vJ2AD6+ZuYlcYLZSgEZ0oBE6
UYqmvF3r6FRokVZkQ1cHthluvLtf1JzDIw4rLypmymclBHi+RXoYsH/7q1Y1SSjO4k8F
gmKtF6nEMymkzf9nIrRyZ1KACn0FU+z508sG5cXBsEoJIcC1i300hGH5htKWbEcirdMB
3dIBAuqQj01JC+JW8t6EPVmYbZzcRSsjvHNe5eIvGXFt/KslddgCTZu0fzZcf1UFBzbB
KO+Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=1ybNhwV6ZS8XkT/uiOnbaG0NGsLKTWk1JAg8ku+JHc8=;
b=mMorVMdCyTIHZG5hOu1S66cVmvbtGLKVDSuFU5qI8epPEISw5vr81AdA9NdYW/14DB
dOtjS6/QnAq73bnYREIQLUAVcWW26pdoOqihswukQCyDZRP2fecMoJfcr81K6QU6VAF9
l1Xx1hMA7jDycceucdbKfKB6jhXxb8mgkGmGJR+2WuuhivPVmHPezBWTK/NNS7QP8mzq
yBbFsG76oU9oJQDi8W77XBxEmZMcvphSbnOJB8leT9fU/h5DOef3BU/bl+JYg/MbaxsX
7E1xQc80bQvizcoodGG8adbikds/SxT/fzp0GrNEIyRHjVgnVnPpaLSngHHdTB+xBh5i
WYJw==
X-Gm-Message-State: AFeK/H0VkTIo4DjPXUkhhJZUggvoXivjV8UV69geCy8vh25s1WEpEt/8XvHODPHNcENNXCWVHUK/xbD1a3gBzQ==
X-Received: by 10.25.89.135 with SMTP id n129mr11282180lfb.180.1490719627631;
Tue, 28 Mar 2017 09:47:07 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <83r31h769s.fsf@gnu.org>
References: <ec865326-58ac-4534-a150-01a09c4e2798 AT googlegroups DOT com> <83r31h769s DOT fsf AT gnu DOT org>
From: "J.W. Jagersma (jwjagersma AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Date: Tue, 28 Mar 2017 18:47:06 +0200
Message-ID: <CAPLG5jZx4v-0QV+6F5xLALeQHGGiz2RUzkF3eOcYX7Y2MkiJGQ@mail.gmail.com>
Subject: Re: using fs/gs segment registers in djgpp?
To: djgpp AT delorie DOT com
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Thanks. So as long as I avoid using those headers, gs/fs are safe to
use? (can't use them anyway since I'm on -masm=intel)
The farptrgs.h header mentions movedata(), dosmemget() and dosmemput()
all use gs, but I don't see any of that in the disassembly. Really the
only functions that appear to use the extra segment registers are
dos_alloc_ok() and start(), and those only access fs.

On 28 March 2017 at 17:47, Eli Zaretskii (eliz AT gnu DOT org) [via
djgpp AT delorie DOT com] <djgpp AT delorie DOT com> wrote:
>> Date: Tue, 28 Mar 2017 08:19:11 -0700 (PDT)
>> From: "jwjagersma AT gmail DOT com [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
>>
>> I was wondering if gcc/djgpp ever uses the fs and gs registers. From disassembling a djgpp-compiled exe, I found some references to fs (no idea what's stored there though) but gs appears unused.
>
> Both are used, although FS is used more frequently.  See
> <sys/farptr.h> and <libc/farptrgs.h>; the latter is specifically for
> code internal to the library.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019