public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Paul Edwards <mutazilah@gmail.com>
Cc: GCC Development <gcc@gcc.gnu.org>
Subject: Re: gcc 3.2.3 x64 negative indexes
Date: Wed, 7 Feb 2024 16:12:37 +0100	[thread overview]
Message-ID: <ZcOd5TkXnC1jeTs6@tucnak> (raw)
In-Reply-To: <CAMi4NxaOSAhwnNTkbOiC7nz_0GfF72e9uTszs6HNTAhwqh5MMA@mail.gmail.com>

On Wed, Feb 07, 2024 at 11:02:51PM +0800, Paul Edwards via Gcc wrote:
> I am using a slightly modified gcc 3.2.3 for x86_64 and for this code:

Don't, gcc 3.2.3 is not supported for more than 20 years already.

> int fff(char *x)
> {
> return (x[-1]);
> }
> 
> 
> It is generating:
> 
> .globl fff
> fff:
> .LFB2:
>         movl    $4294967295, %eax
>         movsbl  (%rax,%rcx),%eax

That said, I can't reproduce it and get
	movsbl	-1(%rdi),%eax
	ret
from 3.2.3.

	Jakub


  reply	other threads:[~2024-02-07 15:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 15:02 Paul Edwards
2024-02-07 15:12 ` Jakub Jelinek [this message]
2024-02-09 21:34   ` Paul Edwards
2024-02-09 21:38     ` Paul Edwards
2024-02-10 13:41       ` Paul Edwards
2024-02-10 17:42         ` Joe Monk
2024-02-10 19:48         ` Paul Edwards
2024-02-11  0:03         ` Paul Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZcOd5TkXnC1jeTs6@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=mutazilah@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).