H -- print a memory address offset by 8; used for sse high-parts
Y -- print condition for XOP pcom* instruction.
V -- print naked full integer register name without %.
+ v -- print segment override prefix
+ -- print a branch hint as 'cs' or 'ds' prefix
; -- print a semicolon (after prefixes due to bug in older gas).
~ -- print "i" if TARGET_AVX2, "f" otherwise.
- ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode
+ ^ -- print addr32 prefix if Pmode != word_mode
M -- print addr32 prefix for TARGET_X32 with VSIB address.
! -- print NOTRACK prefix for jxx/call/ret instructions if required.
N -- print maskz if it's constant 0 operand.
return;
+ case 'v':
+ if (MEM_P (x))
+ {
+ switch (MEM_ADDR_SPACE (x))
+ {
+ case ADDR_SPACE_GENERIC:
+ break;
+ case ADDR_SPACE_SEG_FS:
+ fputs ("fs ", file);
+ break;
+ case ADDR_SPACE_SEG_GS:
+ fputs ("gs ", file);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ }
+ else
+ output_operand_lossage ("operand is not a memory reference, "
+ "invalid operand code 'v'");
+ return;
+
case '*':
if (ASSEMBLER_DIALECT == ASM_ATT)
putc ('*', file);
;; H -- print a memory address offset by 8; used for sse high-parts
;; K -- print HLE lock prefix
;; Y -- print condition for XOP pcom* instruction.
+;; v -- print segment override prefix
;; + -- print a branch hint as 'cs' or 'ds' prefix
;; ; -- print a semicolon (after prefixes due to bug in older gas).
;; ~ -- print "i" if TARGET_AVX2, "f" otherwise.
-;; ^ -- print addr32 prefix if TARGET_64BIT and Pmode != word_mode
+;; ^ -- print addr32 prefix if Pmode != word_mode
;; ! -- print NOTRACK prefix for jxx/call/ret instructions if required.
(define_c_enum "unspec" [
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "movsq\t{%1, %0|%0, %1}";
+ return "%^%v1movsq";
}
[(set_attr "type" "str")
(set_attr "memory" "both")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "movs{l|d}\t{%1, %0|%0, %1}";
+ return "%^%v1movs{l|d}";
}
[(set_attr "type" "str")
(set_attr "memory" "both")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "movsw\t{%1, %0|%0, %1}";
+ return "%^%v1movsw";
}
[(set_attr "type" "str")
(set_attr "memory" "both")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "movsb\t{%1, %0|%0, %1}";
+ return "%^%v1movsb";
}
[(set_attr "type" "str")
(set_attr "memory" "both")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "rep{%;} movsq\t{%1, %0|%0, %1}";
+ return "%^%v1rep{%;} movsq";
}
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "rep{%;} movs{l|d}\t{%1, %0|%0, %1}";
+ return "%^%v1rep{%;} movs{l|d}";
}
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
operands[0] = SET_DEST (exp);
operands[1] = SET_SRC (exp);
- return "rep{%;} movsb\t{%1, %0|%0, %1}";
+ return "%^%v1rep{%;} movsb";
}
[(set_attr "type" "str")
(set_attr "prefix_rep" "1")
-/* { dg-do compile } */
-/* { dg-options "-O2 -mno-sse -mtune=generic -masm=att" } */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -mno-sse -mtune=generic -save-temps" } */
typedef unsigned long uword __attribute__ ((mode (word)));
__seg_gs struct a m;
void bar (struct a *dst) { *dst = m; }
-/* { dg-final { scan-assembler "rep\[; \t\]+movs(l|q)\[ \t\]+%gs:" { target { ! x32 } } } } */
-/* { dg-final { scan-assembler-not "rep\[; \t\]+movs(l|q)\[ \t\]+%gs:" { target x32 } } } */
+/* { dg-final { scan-assembler "gs\[ \t\]+rep\[; \t\]+movs(l|q)" { target { ! x32 } } } } */
+/* { dg-final { scan-assembler-not "gs\[ \t\]+rep\[; \t\]+movs(l|q)" { target x32 } } } */