In AT&T syntax, parameter name used as a base register of a memory reference makes it drop its offset.
I tried to alter [`x86_64.inc`](https://gitlab.com/freepascal.org/fpc/source/-/blob/f1317e893d1c0b3e7f1584f1205317d547f5f685/rtl/x86_64/x86_64.inc) the way I argued for #40390 and quickly found that this code (`i386` or `x86-64`):
```pascal
{$mode objfpc}
procedure DoubleUint32ToTheLeft(x: pointer); assembler; nostackframe;
asm
movl -4(x), %edx // Becomes "movl (x), %edx"
shl $1, %edx
movl %edx, -4(x) // Becomes "movl %edx, (x)"
end;
var
a: array[0 .. 2] of uint32 = (10, 11, 12);
begin
DoubleUint32ToTheLeft(@a[1]);
writeln('Got: ', a[0], ' ', a[1], ' ', a[2]);
writeln('Expected: 20 11 12');
end.
```
Prints:
```
Got: 10 22 12
Expected: 20 11 12
```
Because the AT&T assembler ignores `-4` offsets in this case. `-4(x,%eax)` and `-4(x,x)` also drop their `-4`s, but `-4(%eax,x)` doesn’t.
@PascalDragon, you did this feature, so it may be easier for you :).
issue