Commit d1e74401 by Uros Bizjak Committed by Uros Bizjak

i386.md (iptrsize): New mode attribute.

	* config/i386/i386.md (iptrsize): New mode attribute.
	(tp_seg): Ditto.
	(*load_tp_<mode>): Macroize insn from *load_tp_{si,di} using P
	mode iterator.
	(*add_tp_<mode>): Ditto from *add_tp_{si,di}.
	(stack_protect_set_<mode>): Ditto from stack_protect_set_{si,di}.
	(stack_protect_test_<mode>): Ditto from stack_protect_test_{si,di}.
	(stack_tls_protect_set_<mode>): Ditto from
	stack_tls_protect_set_{si,di}.  Use %@ to output segment register
	of thread base pointer load.
	(stack_tls_protect_test_<mode>): Ditto from
	stack_tls_protect_test_{si,di}.  Use %@ to output segment register
	of thread base pointer load.
	(stack_protect_set): Rewrite using indirect functions.
	(stack_protect_test): Ditto.
	* config/i386/i386.c (ix86_print_operand_punct_valid): Add '@'.
	(ix86_print_operand): Handle '@'.

From-SVN: r163900
parent 195a95c4
2010-09-06 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (iptrsize): New mode attribute.
(tp_seg): Ditto.
(*load_tp_<mode>): Macroize insn from *load_tp_{si,di} using P
mode iterator.
(*add_tp_<mode>): Ditto from *add_tp_{si,di}.
(stack_protect_set_<mode>): Ditto from stack_protect_set_{si,di}.
(stack_protect_test_<mode>): Ditto from stack_protect_test_{si,di}.
(stack_tls_protect_set_<mode>): Ditto from
stack_tls_protect_set_{si,di}. Use %@ to output segment register
of thread base pointer load.
(stack_tls_protect_test_<mode>): Ditto from
stack_tls_protect_test_{si,di}. Use %@ to output segment register
of thread base pointer load.
(stack_protect_set): Rewrite using indirect functions.
(stack_protect_test): Ditto.
* config/i386/i386.c (ix86_print_operand_punct_valid): Add '@'.
(ix86_print_operand): Handle '@'.
2010-09-05 Giuseppe Scrivano <gscrivano@gnu.org>
* tree-tailcall.c (process_assignment): Handle NEGATE_EXPR and
......
......@@ -12404,6 +12404,7 @@ get_some_local_dynamic_name (void)
Y -- print condition for XOP pcom* instruction.
+ -- print a branch hint as 'cs' or 'ds' prefix
; -- print a semicolon (after prefixes due to bug in older gas).
@ -- print a segment register of thread base pointer load
*/
void
......@@ -12882,6 +12883,19 @@ ix86_print_operand (FILE *file, rtx x, int code)
#endif
return;
case '@':
if (ASSEMBLER_DIALECT == ASM_ATT)
putc ('%', file);
/* The kernel uses a different segment register for performance
reasons; a system call would not have to trash the userspace
segment register, which would be expensive. */
if (TARGET_64BIT && ix86_cmodel != CM_KERNEL)
fputs ("fs", file);
else
fputs ("gs", file);
return;
default:
output_operand_lossage ("invalid operand code '%c'", code);
}
......@@ -13012,7 +13026,8 @@ ix86_print_operand (FILE *file, rtx x, int code)
static bool
ix86_print_operand_punct_valid_p (unsigned char code)
{
return (code == '*' || code == '+' || code == '&' || code == ';');
return (code == '@' || code == '*' || code == '+'
|| code == '&' || code == ';');
}
/* Print a memory operand whose address is ADDR. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment