فهرست منبع

+ support evaluation of recordtype*constant in the intel syntax inline asm.
The recordtype itself is evaluated to 0. This makes e.g.
'test [di+recordtype*5], 1' work. This is TP7 compatible.

git-svn-id: trunk@38200 -

nickysn 7 سال پیش
والد
کامیت
ae6a4030c3
1فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 9 0
      compiler/x86/rax86int.pas

+ 9 - 0
compiler/x86/rax86int.pas

@@ -1135,6 +1135,15 @@ Unit Rax86int;
                           expr:=expr + tempstr;
                         end
                     end
+                   else if (actasmtoken<>AS_DOT) and
+                           assigned(sym) and
+                           (sym.typ=typesym) and
+                           (ttypesym(sym).typedef.typ in [recorddef,objectdef]) then
+                     begin
+                       { just a record type (without being followed by dot)
+                         evaluates to 0. Ugly, but TP7 compatible. }
+                       expr:=expr+'0';
+                     end
                    else
                     begin
                       if (expr='') or (expr[length(expr)] in ['+','-','/','*']) then