Re: [fpc-devel] Optimisation and thread safety

2021-11-13 Thread J. Gareth Moreton via fpc-devel
I figured that if you read from memory, and then write to memory, it's not safe to read from the same memory block again because the write address could be equal to (or overlap) the read memory and it's impossible to rule that out if different registers are used. It might be okay if the

Re: [fpc-devel] Optimisation and thread safety

2021-11-13 Thread Florian Klämpfl via fpc-devel
> Am 13.11.2021 um 00:55 schrieb J. Gareth Moreton via fpc-devel > : > > Hi everyone, > > I have a question when it comes to optimising memory reads and writes. What > are the rules for FPC when it comes to writing to memory and then reading > from it later within a single subroutine? For

Re: [fpc-devel] Optimisation and thread safety

2021-11-13 Thread Michael Van Canneyt via fpc-devel
On Fri, 12 Nov 2021, J. Gareth Moreton via fpc-devel wrote: Hi everyone, I have a question when it comes to optimising memory reads and writes.  What are the rules for FPC when it comes to writing to memory and then reading from it later within a single subroutine? For example, say I had

[fpc-devel] Optimisation and thread safety

2021-11-12 Thread J. Gareth Moreton via fpc-devel
Hi everyone, I have a question when it comes to optimising memory reads and writes.  What are the rules for FPC when it comes to writing to memory and then reading from it later within a single subroutine? For example, say I had this pair of commands:     movq    %rdx,-584(%rbp)     movl