asmmode gas doesn't accept segment overrides.
Original Reporter info from Mantis: ludob
-
Reporter name: Ludo Brands
Original Reporter info from Mantis: ludob
- Reporter name: Ludo Brands
Description:
On x64 a mov %gs:0,%rax raises a "Error: Invalid reference syntax" although this perfectly valid syntax. The compiler translates intel mode mov rax,gs:[0] actually in mov %gs:0,%rax for the external assembler. Similarly on x86 mov %fs:0,%eax isn't working either. BTW these are the instructions used to access the windows Thread Information Block structure.
Steps to reproduce:
On x64:
program testasm;
begin
{$asmmode intel}
asm
mov rax,gs:[0]
end;
{$asmmode gas}
asm
mov %gs:0,%rax
end;
end.
Mantis conversion info:
- Mantis ID: 20035
- Build: svn 18259
- Platform: x86 x64
- Version: 2.7.1
- Fixed in version: 3.0.0
- Fixed in revision: 18861 (#7e537161)