* 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
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;

View File

@ -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;