delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2016/02/17/06:22:56

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=20120113;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
bh=CAYxkNinVrWtJ9ohvQKp+2KSg6fYPnPwcq7MIGNkVc4=;
b=odedjiZbnoijheFSSlJmJQkKOrEIRLkrIeslVYEh56hD5pgku/M++edLI+749N1HOR
w2JgbGWugWjM1UIIxJDXuriNe58uO9JIkGHDKMFjlR8ekcJLSE9Djh1S2lcZWR92I7JS
W/vNeFFuwpMnpfDKhZKAuMWWIqg4dEydBhOgyhiuyJKAt7i5eJDezQDIsid0zW9lgh1Z
XMh0y8ixtWxK9KmYXpyi5iYQWaJVzRgm8sDCtl49/uXb580D2cyTamllTnCaYzBO43jj
CL9hhbkkzYll/J6uKwsAWuBak+MMeFqDY2BcSPrquE06XIwNeyhLolAw1xm3ey34ffel
A9TQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-gm-message-state:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type;
bh=CAYxkNinVrWtJ9ohvQKp+2KSg6fYPnPwcq7MIGNkVc4=;
b=Pm1SRH261+EG5LRW4lgnjxur7boOGX0tgiBFiTnakKAaaz9ijb1L3MlUjwiIR1KKeL
g3AjshKsJfM/+e7pZ4izbBTlEI+4BG4x/eJmNyNTElD0xVr+3zL0ukx1jrz5P/jbnOmg
F7VfEmi5CHTOgIvqzSFrSVQoEtcoaZrmlXSXyosIjWtq5boRUv3HJ3LHRtbHiRNMjMqs
HysdbQHIXdyGZ3GWaizha1rv+QJ3x6dEvuYhR4PYfvkUnQl1rrP/nBtoQKM2vZ1M6eS8
yHQyqnwBuH4BiMuq4SJs/rD3YLOp8w0746WN/7Eclj7gPrfDxKc53NQCd13084lt7PZQ
LHvA==
X-Gm-Message-State: AG10YOQnt19eNXgn194ukJbQE8cG7bHGV3NmJnGczHhH1CXkSxBdNDcjuHjluYzkahIJ8l6fQv3L+iH7J0tp4A==
MIME-Version: 1.0
X-Received: by 10.107.6.35 with SMTP id 35mr3181866iog.140.1455706690595; Wed,
17 Feb 2016 02:58:10 -0800 (PST)
In-Reply-To: <CAA2C=vBj5AqHQ1a23YzqzV2LLn22-m9AB65bh6v_Uq2Nzk0CSw@mail.gmail.com>
References: <201601312013 DOT u0VKDC4O017569 AT delorie DOT com>
<n8norb$gck$1 AT usenet DOT news DOT interia DOT pl>
<56AF7CFB DOT 8010507 AT iki DOT fi>
<n8obct$m4c$1 AT usenet DOT news DOT interia DOT pl>
<83twlsyya8 DOT fsf AT gnu DOT org>
<56B03232 DOT 8040802 AT iki DOT fi>
<n8skjg$bf4$1 AT usenet DOT news DOT interia DOT pl>
<n9siu0$hu6$1 AT usenet DOT news DOT interia DOT pl>
<7c07fdd8-c7f5-4cba-b83d-42407a6717f7 AT googlegroups DOT com>
<CAA2C=vAujKzSw-dfU8OyZZnvjGY_rRWEuDSVTgaou4DLn1dV-A AT mail DOT gmail DOT com>
<4b2f2149-2994-4ff0-bda2-8051f1a27097 AT googlegroups DOT com>
<CAA2C=vBj5AqHQ1a23YzqzV2LLn22-m9AB65bh6v_Uq2Nzk0CSw AT mail DOT gmail DOT com>
Date: Wed, 17 Feb 2016 12:58:10 +0200
Message-ID: <CAA2C=vCK7HN5hqT10_LBCdET9R_=dMbH1uYPELU4CJs80==CLw@mail.gmail.com>
Subject: Re: ANNOUNCE: Update of DJGPP port of gcc-5.3.0
From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
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

On 2/17/16, Ozkan Sezer <sezeroz AT gmail DOT com> wrote:
> On 2/17/16, rugxulo AT gmail DOT com [via djgpp AT delorie DOT com] <djgpp AT delorie DOT com>
> wrote:
>> Hi again,
>>
>> On Monday, February 15, 2016 at 8:11:49 PM UTC-6, Ozkan Sezer
>> (sezeroz AT spam DOT no) [via djgpp AT spam DOT no] wrote:
>>>
>>> AFAICS, it is from quake's d_copy.s assembler source.
>>
>> The actual file should've been named d_copy.S (capital S) since it
>> uses the preprocessor (to #include three *.h files and #define
>> stuff). The file makefile.linux seems to use "-x assembler-with-cpp"
>> to guarantee this.
>>
>> The actual line (137) is this:
>>
>> "	rep/movsl	(%esi),(%edi)"
>>
>> ... which is really this: "<tab>rep/movsl<tab>(%esi),(%edi)"
>>
>> But even more curious is that the file has copious line comments
>> starting with "//". So if I had to guess, it's that GAS is (now)
>> confusing the rest of the instruction as a comment.
>>
>> A quick diff (on objdump output) shows this:
>>
>> -   dd: f3 a5       rep movs DWORD PTR es:[edi],DWORD PTR ds:[esi]
>> -   df: 01 c6       add    esi,eax
>> -   e1: 01 d7       add    edi,edx
>> -   e3: 4d          dec    ebp
>> +   dd: f3 01 c6    repz add esi,eax
>> +   e0: 01 d7       add    edi,edx
>> +   e2: 4d          dec    ebp
>>
>> Notice that the "a5" is completely omitted, thus causing it to
>> combine with the next instruction?
>>
>> Hmmm, no, "gcc -E -c" still shows "rep/movsl (%esi),(%edi)".
>>
>> Checking /dev/env/DJDIR/share/info/as.info ...
>>
>> 9.15 80386 Dependent Features
>> 9.15.3.2 Special Characters
>>
>> "
>>    If the `--divide' command line option has not been specified then
>> the `/' character appearing anywhere on a line also introduces a line
>> comment.
>> "
>>
>> But 2.25.1's as.info says the same. So if this differs from 2.25.1,
>> maybe they finally "fixed" it to do what the doc says.
>>
>> (A quick check of 2.19 info doc seems to imply similar, but it also
>> almost seems to imply that '/' would only be a valid comment at the
>> beginning of a line.)
>>
>
> The changelogs don't report such behavior change, do they?
> This _should_ be reported to binutils bugzilla.
>

Interesting thing is, I can not reproduce the issue on linux:
I compiled the pristine binutils-2.26 source on my x86_64-linux
(fedora 20), installed to ~/b226.

I then ran first normally:
$ gcc -m32 -x assembler-with-cpp -v -c d_copy.s
... which reports:
COLLECT_GCC_OPTIONS='-m32' '-v' '-c' '-mtune=generic' '-march=i686'
 as -v --32 -o d_copy.o /tmp/ccEPaWUM.s
GNU assembler version 2.23.2 (x86_64-redhat-linux) using BFD version
version 2.23.2

And a second time with the PATH pointing to new binutils, like:
$ PATH=~/b226/bin:$PATH gcc -m32 -x assembler-with-cpp -v -c d_copy.s
... which reports:
COLLECT_GCC_OPTIONS='-m32' '-v' '-c' '-mtune=generic' '-march=i686'
 as -v --32 -o d_copy.o /tmp/ccPMZpRd.s
GNU assembler version 2.26 (x86_64-pc-linux-gnu) using BFD version
(GNU Binutils) 2.26.20160125

Then I ran objdump -d on the two generated *.o files and they are identical:
  dd:	f3 a5                	rep movsl %ds:(%esi),%es:(%edi)

Is this specific to djgpp (or to djgpp port of binutils) ?

--
O.S.

- Raw text -


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