fixed Const to Reg move
authorChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 21 Mar 2006 11:02:30 +0000 (11:02 +0000)
committerChristian Würdig <chriswue@ipd.info.uni-karlsruhe.de>
Tue, 21 Mar 2006 11:02:30 +0000 (11:02 +0000)
ir/be/ia32/ia32_spec.pl

index 9470d93..06afda9 100644 (file)
@@ -370,7 +370,12 @@ $comment_string = "/*";
 4.   sub %D1, %D1 /* optimized mov 0 to register */
   }
   else {
-4.   mov %D1, %C /* Mov Const into register */
+    if (get_ia32_sc(n)) {
+6.    lea %D1, %C /* Load address of SymConst into register */
+    }
+       else {
+6.    mov %D1, %C /* Mov Const into register */
+       }
   }
 ',
 },