Browse Source

* treat registers (and identifiers of register parameter) as normal identifiers when parsing record fields in intel assembler, resolves #19555

git-svn-id: trunk@18268 -
florian 14 years ago
parent
commit
860d753055
3 changed files with 16 additions and 1 deletions
  1. 1 0
      .gitattributes
  2. 1 1
      compiler/x86/rax86int.pas
  3. 14 0
      tests/webtbs/tw19555.pp

+ 1 - 0
.gitattributes

@@ -11720,6 +11720,7 @@ tests/webtbs/tw1938.pp svneol=native#text/plain
 tests/webtbs/tw1948.pp svneol=native#text/plain
 tests/webtbs/tw1950.pp svneol=native#text/plain
 tests/webtbs/tw19548.pp svneol=native#text/pascal
+tests/webtbs/tw19555.pp svneol=native#text/pascal
 tests/webtbs/tw1964.pp svneol=native#text/plain
 tests/webtbs/tw19700.pp svneol=native#text/plain
 tests/webtbs/tw19851a.pp svneol=native#text/pascal

+ 1 - 1
compiler/x86/rax86int.pas

@@ -729,7 +729,7 @@ Unit Rax86int;
         while (actasmtoken=AS_DOT) do
          begin
            Consume(AS_DOT);
-           if actasmtoken in [AS_BYTE,AS_ID,AS_WORD,AS_DWORD,AS_QWORD] then
+           if actasmtoken in [AS_BYTE,AS_ID,AS_WORD,AS_DWORD,AS_QWORD,AS_REGISTER] then
              begin
                s:=s+'.'+actasmpattern;
                consume(actasmtoken);

+ 14 - 0
tests/webtbs/tw19555.pp

@@ -0,0 +1,14 @@
+{ %cpu=i386 }
+{$mode delphi}
+type
+  TCRCDef = record
+    polynomial : longint;
+  end;
+{$asmmode intel}
+function CRCSetup(var CRCDef: TCRCDef; Polynomial, Bits, InitVector,
+  FinalVector: Cardinal; Inverse: LongBool): Boolean; register;assembler;
+asm // initialize CRCDef according to the parameters, calculate the lookup table
+       MOV [EAX].TCRCDef.Polynomial,EDX
+end;
+begin
+end.