mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 13:38:45 +02:00
+ for TP7 compatibility, allow the '&', '$' and '?' characters in the x86 intel
syntax inline asm reader git-svn-id: trunk@38167 -
This commit is contained in:
parent
1709fa61a4
commit
391f85f828
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13641,6 +13641,7 @@ tests/test/tudots.dot.prog.pp svneol=native#text/pascal
|
||||
tests/test/tudots.pp svneol=native#text/pascal
|
||||
tests/test/tudots.prog.pp svneol=native#text/pascal
|
||||
tests/test/tudots.test.pp svneol=native#text/pascal
|
||||
tests/test/tuglylabels1.pp svneol=native#text/plain
|
||||
tests/test/tunaligned1.pp svneol=native#text/plain
|
||||
tests/test/tunistr1.pp svneol=native#text/plain
|
||||
tests/test/tunistr2.pp svneol=native#text/plain
|
||||
|
@ -275,7 +275,9 @@ Unit Rax86int;
|
||||
begin
|
||||
firsttoken:=FALSE;
|
||||
len:=0;
|
||||
while c in ['A'..'Z','a'..'z','0'..'9','_','@'] do
|
||||
while (c in ['A'..'Z','a'..'z','0'..'9','_','@']) or
|
||||
{ TP7 also allows $&? characters in local labels }
|
||||
(forcelabel and (c in ['$','&','?'])) do
|
||||
begin
|
||||
{ if there is an at_sign, then this must absolutely be a label }
|
||||
if c = '@' then
|
||||
@ -328,7 +330,7 @@ Unit Rax86int;
|
||||
begin
|
||||
actasmpattern:=c;
|
||||
c:=current_scanner.asmgetchar;
|
||||
while c in ['A'..'Z','a'..'z','0'..'9','_','@'] do
|
||||
while c in ['A'..'Z','a'..'z','0'..'9','_','@','$','&','?'] do
|
||||
begin
|
||||
actasmpattern:=actasmpattern + c;
|
||||
c:=current_scanner.asmgetchar;
|
||||
|
23
tests/test/tuglylabels1.pp
Normal file
23
tests/test/tuglylabels1.pp
Normal file
@ -0,0 +1,23 @@
|
||||
{ %NORUN }
|
||||
{ %CPU=i8086,i386,x86_64 }
|
||||
program tuglylabels1;
|
||||
|
||||
{ This test is TP7 compatible }
|
||||
|
||||
{$ifdef FPC}
|
||||
{$asmmode intel}
|
||||
{$endif FPC}
|
||||
|
||||
{ allowed characters in a local label:
|
||||
@$&_?abcdefghijklmnopqrstuvwxyz0123456789 }
|
||||
|
||||
begin
|
||||
asm
|
||||
@:
|
||||
jmp @
|
||||
@@:
|
||||
jmp @@
|
||||
@$&_?@9:
|
||||
jmp @$&_?@9
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user