Commit f541a481 by Kyrylo Tkachov Committed by Kyrylo Tkachov

aarch64.c (aarch64_print_operand): Handle 'c'.

[gcc/]
2013-10-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* config/aarch64/aarch64.c (aarch64_print_operand): Handle 'c'.

[gcc/testsuite/]
2013-10-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	* gcc.target/aarch64/c-output-template.c: New testcase.
	* gcc.target/aarch64/c-output-template-2.c: Likewise.
	* gcc.target/aarch64/c-output-template-3.c: Likewise.

From-SVN: r203779
parent 51bb310d
2013-10-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_print_operand): Handle 'c'.
2013-10-17 Marcus Shawcroft <marcus.shawcroft@arm.com> 2013-10-17 Marcus Shawcroft <marcus.shawcroft@arm.com>
* config/aarch64/aarch64.c (aarch64_preferred_reload_class): Adjust * config/aarch64/aarch64.c (aarch64_preferred_reload_class): Adjust
......
...@@ -3440,6 +3440,32 @@ aarch64_print_operand (FILE *f, rtx x, char code) ...@@ -3440,6 +3440,32 @@ aarch64_print_operand (FILE *f, rtx x, char code)
{ {
switch (code) switch (code)
{ {
/* An integer or symbol address without a preceding # sign. */
case 'c':
switch (GET_CODE (x))
{
case CONST_INT:
fprintf (f, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
break;
case SYMBOL_REF:
output_addr_const (f, x);
break;
case CONST:
if (GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF)
{
output_addr_const (f, x);
break;
}
/* Fall through. */
default:
output_operand_lossage ("Unsupported operand for code '%c'", code);
}
break;
case 'e': case 'e':
/* Print the sign/zero-extend size as a character 8->b, 16->h, 32->w. */ /* Print the sign/zero-extend size as a character 8->b, 16->h, 32->w. */
{ {
......
2013-10-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/c-output-template.c: New testcase.
* gcc.target/aarch64/c-output-template-2.c: Likewise.
* gcc.target/aarch64/c-output-template-3.c: Likewise.
2013-10-17 Michael Hudson-Doyle <michael.hudson@linaro.org> 2013-10-17 Michael Hudson-Doyle <michael.hudson@linaro.org>
* gcc/testsuite/lib/target-supports.exp * gcc/testsuite/lib/target-supports.exp
......
/* { dg-do compile } */
struct tracepoint {
int dummy;
int state;
};
static struct tracepoint tp;
void
test (void)
{
__asm__ ("@ %c0" : : "i" (&tp));
}
/* { dg-final { scan-assembler "@ tp" } } */
/* { dg-do compile } */
struct tracepoint {
int dummy;
int state;
};
static struct tracepoint tp;
void
test (void)
{
__asm__ ("@ %c0" : : "i" (&tp.state));
}
/* { dg-final { scan-assembler "@ tp\\+4" } } */
/* { dg-do compile } */
void
test (void)
{
__asm__ ("@ %c0" : : "i" (42));
}
/* { dg-final { scan-assembler "@ 42" } } */
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