added blank lines
[libfirm] / ir / be / ia32 / ia32_spec.pl
index bd59ba5..102e41c 100644 (file)
@@ -439,7 +439,7 @@ $comment_string = "/*";
   "irn_flags" => "R",
   "comment"   => "represents an integer constant",
   "cmp_attr"  => "  return ia32_compare_immop_attr(attr_a, attr_b);\n",
-  "reg_req"   => { "out" => [ "gp" ] },
+  "reg_req"   => { "in" => [ "none" ], "out" => [ "gp" ] },
 },
 
 "Cdq" => {
@@ -501,7 +501,18 @@ $comment_string = "/*";
 "Push" => {
   "comment"   => "push a gp register on the stack",
   "reg_req"   => { "in" => [ "esp", "gp", "none" ], "out" => [ "esp" ] },
-  "emit"      => '. push %S2 /* Push(%A2) */',
+  "emit"      => '
+if (get_ia32_id_cnst(n)) {
+       if (get_ia32_immop_type(n) == ia32_ImmConst) {
+. push %C /* Push(%A2) */
+       } else {
+. push OFFSET FLAT:%C /* Push(%A2) */
+       }
+}
+else {
+. push %S2 /* Push(%A2) */
+}
+',
   "outs"      => [ "stack", "M" ],
 },
 
@@ -635,7 +646,7 @@ $comment_string = "/*";
   "irn_flags" => "R",
   "comment"   => "represents a SSE constant",
   "cmp_attr"  => "  return ia32_compare_immop_attr(attr_a, attr_b);\n",
-  "reg_req"   => { "out" => [ "xmm" ] },
+  "reg_req"   => { "in" => [ "none" ], "out" => [ "xmm" ] },
   "emit"      => '. mov%M %D1, %C /* Load fConst into register */',
 },
 
@@ -878,7 +889,7 @@ $comment_string = "/*";
   "irn_flags" => "R",
   "comment"   => "represents a virtual floating point constant",
   "cmp_attr"  => "  return ia32_compare_immop_attr(attr_a, attr_b);\n",
-  "reg_req"   => { "out" => [ "vfp" ] },
+  "reg_req"   => { "in" => [ "none" ], "out" => [ "vfp" ] },
 },
 
 # other