Properly set ix86_gen_xxx function pointers
authorH.J. Lu <hongjiu.lu@intel.com>
Mon, 12 Mar 2012 15:56:26 +0000 (15:56 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Mon, 12 Mar 2012 15:56:26 +0000 (08:56 -0700)
2012-03-12  H.J. Lu  <hongjiu.lu@intel.com>

* config/i386/i386.c (ix86_option_override_internal): Properly
set ix86_gen_leave and ix86_gen_monitor.  Check Pmode == DImode,
instead of TARGET_64BIT, to set ix86_gen_add3, ix86_gen_sub3,
ix86_gen_one_cmpl2, ix86_gen_andsp,
ix86_gen_allocate_stack_worker, ix86_gen_adjust_stack_and_probe
and ix86_gen_probe_stack_range.

* config/i386/sse.md (sse3_monitor64): Renamed to ...
(sse3_monitor64_<mode>): This.

From-SVN: r185247

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/config/i386/sse.md

index f3119994aa58e0670a4ab86059b834adb779c308..730e18c74ba21cfa2e8d66bdaf394e6449d46758 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/i386/i386.c (ix86_option_override_internal): Properly
+       set ix86_gen_leave and ix86_gen_monitor.  Check Pmode == DImode,
+       instead of TARGET_64BIT, to set ix86_gen_add3, ix86_gen_sub3,
+       ix86_gen_one_cmpl2, ix86_gen_andsp,
+       ix86_gen_allocate_stack_worker, ix86_gen_adjust_stack_and_probe
+       and ix86_gen_probe_stack_range.
+
+       * config/i386/sse.md (sse3_monitor64): Renamed to ...
+       (sse3_monitor64_<mode>): This.
+
 2012-03-12  Tristan Gingold  <gingold@adacore.com>
 
        * config/ia64/ia64.c (ia64_function_arg_1): Move code around.
index 6744f89a82176dd26b1a2951c2ee061654426987..d85dc253c215ff102ee1815f738f6f0ba56b17b9 100644 (file)
@@ -3753,11 +3753,23 @@ ix86_option_override_internal (bool main_args_p)
   if (TARGET_64BIT)
     {
       ix86_gen_leave = gen_leave_rex64;
+      if (Pmode == DImode)
+       ix86_gen_monitor = gen_sse3_monitor64_di;
+      else
+       ix86_gen_monitor = gen_sse3_monitor64_si;
+    }
+  else
+    {
+      ix86_gen_leave = gen_leave;
+      ix86_gen_monitor = gen_sse3_monitor;
+    }
+
+  if (Pmode == DImode)
+    {
       ix86_gen_add3 = gen_adddi3;
       ix86_gen_sub3 = gen_subdi3;
       ix86_gen_sub3_carry = gen_subdi3_carry;
       ix86_gen_one_cmpl2 = gen_one_cmpldi2;
-      ix86_gen_monitor = gen_sse3_monitor64;
       ix86_gen_andsp = gen_anddi3;
       ix86_gen_allocate_stack_worker = gen_allocate_stack_worker_probe_di;
       ix86_gen_adjust_stack_and_probe = gen_adjust_stack_and_probedi;
@@ -3765,12 +3777,10 @@ ix86_option_override_internal (bool main_args_p)
     }
   else
     {
-      ix86_gen_leave = gen_leave;
       ix86_gen_add3 = gen_addsi3;
       ix86_gen_sub3 = gen_subsi3;
       ix86_gen_sub3_carry = gen_subsi3_carry;
       ix86_gen_one_cmpl2 = gen_one_cmplsi2;
-      ix86_gen_monitor = gen_sse3_monitor;
       ix86_gen_andsp = gen_andsi3;
       ix86_gen_allocate_stack_worker = gen_allocate_stack_worker_probe_si;
       ix86_gen_adjust_stack_and_probe = gen_adjust_stack_and_probesi;
index 4afc4b3e249d62e2d86b16495211e71d1fec0d2f..f5935f1b4874d99e70979ac36d890ffb2ab4b46c 100644 (file)
   "monitor\t%0, %1, %2"
   [(set_attr "length" "3")])
 
-(define_insn "sse3_monitor64"
-  [(unspec_volatile [(match_operand:DI 0 "register_operand" "a")
+(define_insn "sse3_monitor64_<mode>"
+  [(unspec_volatile [(match_operand:P 0 "register_operand" "a")
                     (match_operand:SI 1 "register_operand" "c")
                     (match_operand:SI 2 "register_operand" "d")]
                    UNSPECV_MONITOR)]