瀏覽代碼

* do not use 16 Bit mul helper on avr, the code generator generates
muls and adds. For simple cases this might be cause longer code than a call to a well crafted assembler helper
but inlining the muls/adds makes register allocation more flexible

git-svn-id: trunk@30739 -

florian 10 年之前
父節點
當前提交
cfa68be55b
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      compiler/nadd.pas

+ 2 - 1
compiler/nadd.pas

@@ -3145,7 +3145,8 @@ implementation
              else
                begin
 {$ifdef cpuneedsmulhelper}
-                 if (nodetype=muln) and not(torddef(resultdef).ordtype in [u8bit,s8bit{$ifdef cpu16bitalu},u16bit,s16bit{$endif}]) then
+                 if (nodetype=muln) and not(torddef(resultdef).ordtype in [u8bit,s8bit
+                   {$if defined(cpu16bitalu) or defined(avr)},u16bit,s16bit{$endif}]) then
                    begin
                      result := nil;