sse.md (sse3_mwait): Swap the operand constriants.
authorVenkataramanan Kumar <venkataramanan.kumar@amd.com>
Fri, 5 Jun 2015 06:38:32 +0000 (06:38 +0000)
committerVenkataramanan Kumar <vekumar@gcc.gnu.org>
Fri, 5 Jun 2015 06:38:32 +0000 (06:38 +0000)
2015-06-05  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

        * config/i386/sse.md (sse3_mwait): Swap the operand constriants.

From-SVN: r224146

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

index a052bd3cf9c21efb2bb5dcafba94b8fe56ac1505..5eb2f40239e69007ac18208d998a7ec738fa41ab 100644 (file)
@@ -1,3 +1,7 @@
+2015-06-05  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>
+
+       * config/i386/sse.md (sse3_mwait): Swap the operand constriants.
+
 2015-06-04  DJ Delorie  <dj@redhat.com>
 
        * config/msp430/msp430.md (movsi_s): New.  Special case for
index e44ba9a6d366444bc598642530f33d69f9bbfe17..4ef51d668034a6ed6c5a5ac6c4a9cf1d9ac70f31 100644 (file)
    (set_attr "atom_sse_attr" "fence")
    (set_attr "memory" "unknown")])
 
-
+;; As per AMD and Intel ISA manuals, the first operand is extensions
+;; and it goes to %ecx. The second operand received is hints and it goes
+;; to %eax.
 (define_insn "sse3_mwait"
-  [(unspec_volatile [(match_operand:SI 0 "register_operand" "a")
-                    (match_operand:SI 1 "register_operand" "c")]
+  [(unspec_volatile [(match_operand:SI 0 "register_operand" "c")
+                    (match_operand:SI 1 "register_operand" "a")]
                    UNSPECV_MWAIT)]
   "TARGET_SSE3"
 ;; 64bit version is "mwait %rax,%rcx". But only lower 32bits are used.