* 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:
yury 2006-12-21 20:48:18 +00:00
parent 642e611f88
commit 4092321ae9
2 changed files with 15 additions and 14 deletions

View File

@ -189,20 +189,10 @@ unit raatt;
while c in [' ',#9] do while c in [' ',#9] do
c:=current_scanner.asmgetchar; c:=current_scanner.asmgetchar;
{ get token pos } { get token pos }
{$ifdef arm}
if not (c in [#10,#13,';']) then
current_scanner.gettokenpos;
{$else arm}
if not (c in [#10,#13,'{',';']) then if not (c in [#10,#13,'{',';']) then
current_scanner.gettokenpos; current_scanner.gettokenpos;
{$endif arm}
{ Local Label, Label, Directive, Prefix or Opcode } { 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 if firsttoken and not(c in [#10,#13,'{',';']) then
{$endif arm}
begin begin
firsttoken:=FALSE; firsttoken:=FALSE;
len:=0; len:=0;

View File

@ -3933,12 +3933,23 @@ exit_label:
end; end;
repeat repeat
case c of case c of
{$ifndef arm}
// the { ... } is used in ARM assembler to define register sets, so we can't used // 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} {$endif arm}
skipcomment;
end;
#10,#13 : #10,#13 :
begin begin
linebreak; linebreak;