mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-10 13:38:42 +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.pp svneol=native#text/pascal
|
||||||
tests/test/tudots.prog.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/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/tunaligned1.pp svneol=native#text/plain
|
||||||
tests/test/tunistr1.pp svneol=native#text/plain
|
tests/test/tunistr1.pp svneol=native#text/plain
|
||||||
tests/test/tunistr2.pp svneol=native#text/plain
|
tests/test/tunistr2.pp svneol=native#text/plain
|
||||||
|
@ -275,7 +275,9 @@ Unit Rax86int;
|
|||||||
begin
|
begin
|
||||||
firsttoken:=FALSE;
|
firsttoken:=FALSE;
|
||||||
len:=0;
|
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
|
begin
|
||||||
{ if there is an at_sign, then this must absolutely be a label }
|
{ if there is an at_sign, then this must absolutely be a label }
|
||||||
if c = '@' then
|
if c = '@' then
|
||||||
@ -328,7 +330,7 @@ Unit Rax86int;
|
|||||||
begin
|
begin
|
||||||
actasmpattern:=c;
|
actasmpattern:=c;
|
||||||
c:=current_scanner.asmgetchar;
|
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
|
begin
|
||||||
actasmpattern:=actasmpattern + c;
|
actasmpattern:=actasmpattern + c;
|
||||||
c:=current_scanner.asmgetchar;
|
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