Re: gcc 3.2.3 x64 negative indexes

2024-02-10 Thread Paul Edwards via Gcc
Problem solved. I didn't have this: #define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int") because I wasn't including x86_64.h. This is the first time I have attempted to go to 64-bit pointers so I wasn't aware this even existed. So here it is doing Win64 ABI: D:\devel\gcc\gc

Re: gcc 3.2.3 x64 negative indexes

2024-02-10 Thread Paul Edwards via Gcc
(replying to Joe Monk) > It appears that this is not an issue that this version of GCC is > architected to be able to solve. > The first 64-bit PC processor, the AMD opteron series, was launched on > April 22, 2003. > GCC 3.2.3 was released on April 25, 2003. Jakub has already shown correct x64

Re: gcc 3.2.3 x64 negative indexes

2024-02-10 Thread Joe Monk via Gcc
It appears that this is not an issue that this version of GCC is architected to be able to solve. The first 64-bit PC processor, the AMD opteron series, was launched on April 22, 2003. GCC 3.2.3 was released on April 25, 2003. "*Opteron* is AMD

Re: gcc 3.2.3 x64 negative indexes

2024-02-10 Thread Paul Edwards via Gcc
I have it down to a deliberate conversion from signed to unsigned: temp.txt: bbb piss ccc 32 32 temp.txt: bbb piss ccc2 0 1 temp.txt: bbb piss ddd -2 temp.txt: bbb - in convert temp.txt: bbb - converting to integer temp.txt: bbb y stage1 temp.txt: bbb y stage2 temp.txt: bbb y outprec thing, inprec

Re: gcc 3.2.3 x64 negative indexes

2024-02-09 Thread Paul Edwards via Gcc
Oh - I switched to -2 to make debugging easier: D:\devel\gcc\gcc>type foo.c int foo(char *in) { return in[-2]; } D:\devel\gcc\gcc> Note that my flavor of gcc 3.2.3 can be found in gcc-stage*.zip in custom.zip at http://pdos.org On Sat, 10 Feb 2024 at 05:34, Paul Edwards wrote: > On Wed, 7

Re: gcc 3.2.3 x64 negative indexes

2024-02-09 Thread Paul Edwards via Gcc
On Wed, 7 Feb 2024 at 23:12, Jakub Jelinek wrote: 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. And the i370 target hasn't been s

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 >