mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 07:09:29 +02:00
* Compiler directives {$...} are allowed in ARM inline assembler. It fixes tb0142.pp and tb0193.pp.
git-svn-id: trunk@5664 -
This commit is contained in:
parent
642e611f88
commit
4092321ae9
@ -189,20 +189,10 @@ unit raatt;
|
||||
while c in [' ',#9] do
|
||||
c:=current_scanner.asmgetchar;
|
||||
{ get token pos }
|
||||
{$ifdef arm}
|
||||
if not (c in [#10,#13,';']) then
|
||||
current_scanner.gettokenpos;
|
||||
{$else arm}
|
||||
if not (c in [#10,#13,'{',';']) then
|
||||
current_scanner.gettokenpos;
|
||||
{$endif arm}
|
||||
|
||||
{ Local Label, Label, Directive, Prefix or Opcode }
|
||||
{$ifdef arm}
|
||||
if firsttoken and not(c in [#10,#13,';']) then
|
||||
{$else arm}
|
||||
if firsttoken and not(c in [#10,#13,'{',';']) then
|
||||
{$endif arm}
|
||||
begin
|
||||
firsttoken:=FALSE;
|
||||
len:=0;
|
||||
@ -610,7 +600,7 @@ unit raatt;
|
||||
c:=current_scanner.asmgetchar;
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
'}' :
|
||||
begin
|
||||
actasmtoken:=AS_RSBRACKET;
|
||||
|
@ -3933,12 +3933,23 @@ exit_label:
|
||||
end;
|
||||
repeat
|
||||
case c of
|
||||
{$ifndef arm}
|
||||
// the { ... } is used in ARM assembler to define register sets, so we can't used
|
||||
// it as comment, either (* ... *), /* ... */ or // ... should be used instead
|
||||
// it as comment, either (* ... *), /* ... */ or // ... should be used instead.
|
||||
// But compiler directives {$...} are allowed in ARM assembler.
|
||||
'{' :
|
||||
skipcomment;
|
||||
begin
|
||||
{$ifdef arm}
|
||||
readchar;
|
||||
dec(inputpointer);
|
||||
if c<>'$' then
|
||||
begin
|
||||
asmgetchar:='{';
|
||||
exit;
|
||||
end
|
||||
else
|
||||
{$endif arm}
|
||||
skipcomment;
|
||||
end;
|
||||
#10,#13 :
|
||||
begin
|
||||
linebreak;
|
||||
|
Loading…
Reference in New Issue
Block a user