Re: gcc 3.2.3 x64 negative indexes

2024-02-07 Thread Jakub Jelinek via Gcc
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 >

gcc 3.2.3 x64 negative indexes

2024-02-07 Thread Paul Edwards via Gcc
Hi. I am using a slightly modified gcc 3.2.3 for x86_64 and for this code: int fff(char *x) { return (x[-1]); } It is generating: .globl fff fff: .LFB2: movl$4294967295, %eax movsbl (%rax,%rcx),%eax ret My understanding is that that move of -1 into eax does NOT s