aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386')
-rw-r--r--gcc/config/i386/i386.c27
-rw-r--r--gcc/config/i386/i386.md20
-rw-r--r--gcc/config/i386/sol2.h2
3 files changed, 39 insertions, 10 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 2d06499..17a10c8 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5640,6 +5640,8 @@ print_reg (x, code, file)
C -- print opcode suffix for set/cmov insn.
c -- like C, but print reversed condition
F,f -- likewise, but for floating-point.
+ O -- if CMOV_SUN_AS_SYNTAX, expand to "w.", "l." or "q.", otherwise
+ nothing
R -- print the prefix for register names.
z -- print the opcode suffix for the size of the current operand.
* -- print a star (in certain assembler syntax)
@@ -5837,10 +5839,31 @@ print_operand (file, x, code)
break;
}
return;
+ case 'O':
+#ifdef CMOV_SUN_AS_SYNTAX
+ if (ASSEMBLER_DIALECT == ASM_ATT)
+ {
+ switch (GET_MODE (x))
+ {
+ case HImode: putc ('w', file); break;
+ case SImode:
+ case SFmode: putc ('l', file); break;
+ case DImode:
+ case DFmode: putc ('q', file); break;
+ default: abort ();
+ }
+ putc ('.', file);
+ }
+#endif
+ return;
case 'C':
put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 0, 0, file);
return;
case 'F':
+#ifdef CMOV_SUN_AS_SYNTAX
+ if (ASSEMBLER_DIALECT == ASM_ATT)
+ putc ('.', file);
+#endif
put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 0, 1, file);
return;
@@ -5856,6 +5879,10 @@ print_operand (file, x, code)
put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 1, 0, file);
return;
case 'f':
+#ifdef CMOV_SUN_AS_SYNTAX
+ if (ASSEMBLER_DIALECT == ASM_ATT)
+ putc ('.', file);
+#endif
put_condition_code (GET_CODE (x), GET_MODE (XEXP (x, 0)), 1, 1, file);
return;
case '+':
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 41d8649..079dfc0 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -15896,8 +15896,8 @@
"TARGET_64BIT && TARGET_CMOVE
&& (GET_CODE (operands[2]) != MEM || GET_CODE (operands[3]) != MEM)"
"@
- cmov%C1\t{%2, %0|%0, %2}
- cmov%c1\t{%3, %0|%0, %3}"
+ cmov%O2%C1\t{%2, %0|%0, %2}
+ cmov%O2%c1\t{%3, %0|%0, %3}"
[(set_attr "type" "icmov")
(set_attr "mode" "DI")])
@@ -15938,8 +15938,8 @@
"TARGET_CMOVE
&& (GET_CODE (operands[2]) != MEM || GET_CODE (operands[3]) != MEM)"
"@
- cmov%C1\t{%2, %0|%0, %2}
- cmov%c1\t{%3, %0|%0, %3}"
+ cmov%O2%C1\t{%2, %0|%0, %2}
+ cmov%O2%c1\t{%3, %0|%0, %3}"
[(set_attr "type" "icmov")
(set_attr "mode" "SI")])
@@ -15960,8 +15960,8 @@
"TARGET_CMOVE
&& (GET_CODE (operands[2]) != MEM || GET_CODE (operands[3]) != MEM)"
"@
- cmov%C1\t{%2, %0|%0, %2}
- cmov%c1\t{%3, %0|%0, %3}"
+ cmov%O2%C1\t{%2, %0|%0, %2}
+ cmov%O2%c1\t{%3, %0|%0, %3}"
[(set_attr "type" "icmov")
(set_attr "mode" "HI")])
@@ -15984,8 +15984,8 @@
"@
fcmov%F1\t{%2, %0|%0, %2}
fcmov%f1\t{%3, %0|%0, %3}
- cmov%C1\t{%2, %0|%0, %2}
- cmov%c1\t{%3, %0|%0, %3}"
+ cmov%O2%C1\t{%2, %0|%0, %2}
+ cmov%O2%c1\t{%3, %0|%0, %3}"
[(set_attr "type" "fcmov,fcmov,icmov,icmov")
(set_attr "mode" "SF,SF,SI,SI")])
@@ -16024,8 +16024,8 @@
"@
fcmov%F1\t{%2, %0|%0, %2}
fcmov%f1\t{%3, %0|%0, %3}
- cmov%C1\t{%2, %0|%0, %2}
- cmov%c1\t{%3, %0|%0, %3}"
+ cmov%O2%C1\t{%2, %0|%0, %2}
+ cmov%O2%c1\t{%3, %0|%0, %3}"
[(set_attr "type" "fcmov,fcmov,icmov,icmov")
(set_attr "mode" "DF")])
diff --git a/gcc/config/i386/sol2.h b/gcc/config/i386/sol2.h
index 6fb2eb5..79c9ea8 100644
--- a/gcc/config/i386/sol2.h
+++ b/gcc/config/i386/sol2.h
@@ -39,6 +39,8 @@ Boston, MA 02111-1307, USA. */
#define ASM_SPEC \
"%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s"
+#define CMOV_SUN_AS_SYNTAX 1
+
#else /* GAS_REJECTS_MINUS_S */
/* Same as above, except for -s, unsupported by GNU as. */