mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 19:10:18 +02:00
* don't parse "flags" as a register name in the Intel assembler reader
(mantis #29040) git-svn-id: trunk@32368 -
This commit is contained in:
parent
8e9256a93c
commit
fd0c2f36e5
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -14841,6 +14841,7 @@ tests/webtbs/tw28934.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2897.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2899.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2904.pp svneol=native#text/plain
|
||||
tests/webtbs/tw29040.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2908.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2911.pp svneol=native#text/plain
|
||||
tests/webtbs/tw2912.pp svneol=native#text/plain
|
||||
|
@ -228,6 +228,9 @@ Unit Rax86int;
|
||||
begin
|
||||
is_register:=false;
|
||||
actasmregister:=masm_regnum_search(lower(s));
|
||||
{ don't acceps "flags" as register name in an instruction }
|
||||
if actasmregister=NR_FLAGS then
|
||||
actasmregister:=NR_NO;
|
||||
if (actasmregister=NR_NO) and
|
||||
(current_procinfo.procdef.proccalloption=pocall_register) and
|
||||
(po_assembler in current_procinfo.procdef.procoptions) then
|
||||
|
37
tests/webtbs/tw29040.pp
Normal file
37
tests/webtbs/tw29040.pp
Normal file
@ -0,0 +1,37 @@
|
||||
{ %cpu=i386 }
|
||||
{ %norun }
|
||||
|
||||
program asm_test004;
|
||||
{$APPTYPE CONSOLE}
|
||||
{$OPTIMIZATION SIZE}
|
||||
{$OPTIMIZATION STACKFRAME}
|
||||
{$OPTIMIZATION REGVAR}
|
||||
{$CODEALIGN VARMIN=1}
|
||||
{$CODEALIGN VARMAX=1}
|
||||
{$CODEALIGN CONSTMIN=1}
|
||||
{$CODEALIGN CONSTMAX=1}
|
||||
{$mode delphi}
|
||||
{$asmmode intel}
|
||||
|
||||
|
||||
|
||||
const
|
||||
wmoven = 1;
|
||||
// eax edx ecx stack
|
||||
procedure test1(a , b , c, flags :longint); register; //__ pbby in ver 3.0.0 the "flags" is reserved word _ with ver 2.6.4 no compilation error
|
||||
var
|
||||
f :boolean;
|
||||
asm
|
||||
mov a,0
|
||||
mov b,0
|
||||
mov c,0
|
||||
test [flags] , wmoven
|
||||
setnz f
|
||||
end;
|
||||
|
||||
var
|
||||
i :cardinal;
|
||||
|
||||
begin
|
||||
test1(i,i,i,i);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user