public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AARCH64]Adjust address with offset assembler format
@ 2014-02-12 16:10 Renlin Li
  2014-02-24  9:45 ` [PING][PATCH][AARCH64]Adjust " Renlin Li
  2014-02-27 12:38 ` [PATCH][AARCH64]Adjust " Marcus Shawcroft
  0 siblings, 2 replies; 3+ messages in thread
From: Renlin Li @ 2014-02-12 16:10 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus Shawcroft, Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

Hi all,

This is a simple patch which adds a space between base register and 
offset during the address asm translation, making the output assembler 
code format consistent for aarch64 target.

Is it Okay for stage-1?

Kind regards,
Renlin Li


gcc/ChangeLog:

2014-02-12  Renlin Li  <Renlin.Li@arm.com>

     * config/aarch64/aarch64.c (aarch64_print_operand_address): Adjust 
the output asm format
     by adding a space  between base register and offset.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: offset.diff --]
[-- Type: text/x-patch; name=offset.diff, Size: 3631 bytes --]

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d3c5cbc..50ecdd8 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -3830,34 +3830,34 @@ aarch64_print_operand_address (FILE *f, rtx x)
 	if (addr.offset == const0_rtx)
 	  asm_fprintf (f, "[%s]", reg_names [REGNO (addr.base)]);
 	else
-	  asm_fprintf (f, "[%s,%wd]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, %wd]", reg_names [REGNO (addr.base)],
 		       INTVAL (addr.offset));
 	return;
 
       case ADDRESS_REG_REG:
 	if (addr.shift == 0)
-	  asm_fprintf (f, "[%s,%s]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, %s]", reg_names [REGNO (addr.base)],
 		       reg_names [REGNO (addr.offset)]);
 	else
-	  asm_fprintf (f, "[%s,%s,lsl %u]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, %s, lsl %u]", reg_names [REGNO (addr.base)],
 		       reg_names [REGNO (addr.offset)], addr.shift);
 	return;
 
       case ADDRESS_REG_UXTW:
 	if (addr.shift == 0)
-	  asm_fprintf (f, "[%s,w%d,uxtw]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, w%d, uxtw]", reg_names [REGNO (addr.base)],
 		       REGNO (addr.offset) - R0_REGNUM);
 	else
-	  asm_fprintf (f, "[%s,w%d,uxtw %u]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, w%d, uxtw %u]", reg_names [REGNO (addr.base)],
 		       REGNO (addr.offset) - R0_REGNUM, addr.shift);
 	return;
 
       case ADDRESS_REG_SXTW:
 	if (addr.shift == 0)
-	  asm_fprintf (f, "[%s,w%d,sxtw]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, w%d, sxtw]", reg_names [REGNO (addr.base)],
 		       REGNO (addr.offset) - R0_REGNUM);
 	else
-	  asm_fprintf (f, "[%s,w%d,sxtw %u]", reg_names [REGNO (addr.base)],
+	  asm_fprintf (f, "[%s, w%d, sxtw %u]", reg_names [REGNO (addr.base)],
 		       REGNO (addr.offset) - R0_REGNUM, addr.shift);
 	return;
 
@@ -3865,27 +3865,27 @@ aarch64_print_operand_address (FILE *f, rtx x)
 	switch (GET_CODE (x))
 	  {
 	  case PRE_INC:
-	    asm_fprintf (f, "[%s,%d]!", reg_names [REGNO (addr.base)], 
+	    asm_fprintf (f, "[%s, %d]!", reg_names [REGNO (addr.base)], 
 			 GET_MODE_SIZE (aarch64_memory_reference_mode));
 	    return;
 	  case POST_INC:
-	    asm_fprintf (f, "[%s],%d", reg_names [REGNO (addr.base)],
+	    asm_fprintf (f, "[%s], %d", reg_names [REGNO (addr.base)],
 			 GET_MODE_SIZE (aarch64_memory_reference_mode));
 	    return;
 	  case PRE_DEC:
-	    asm_fprintf (f, "[%s,-%d]!", reg_names [REGNO (addr.base)],
+	    asm_fprintf (f, "[%s, -%d]!", reg_names [REGNO (addr.base)],
 			 GET_MODE_SIZE (aarch64_memory_reference_mode));
 	    return;
 	  case POST_DEC:
-	    asm_fprintf (f, "[%s],-%d", reg_names [REGNO (addr.base)],
+	    asm_fprintf (f, "[%s], -%d", reg_names [REGNO (addr.base)],
 			 GET_MODE_SIZE (aarch64_memory_reference_mode));
 	    return;
 	  case PRE_MODIFY:
-	    asm_fprintf (f, "[%s,%wd]!", reg_names [REGNO (addr.base)],
+	    asm_fprintf (f, "[%s, %wd]!", reg_names [REGNO (addr.base)],
 			 INTVAL (addr.offset));
 	    return;
 	  case POST_MODIFY:
-	    asm_fprintf (f, "[%s],%wd", reg_names [REGNO (addr.base)],
+	    asm_fprintf (f, "[%s], %wd", reg_names [REGNO (addr.base)],
 			 INTVAL (addr.offset));
 	    return;
 	  default:
@@ -3894,7 +3894,7 @@ aarch64_print_operand_address (FILE *f, rtx x)
 	break;
 
       case ADDRESS_LO_SUM:
-	asm_fprintf (f, "[%s,#:lo12:", reg_names [REGNO (addr.base)]);
+	asm_fprintf (f, "[%s, #:lo12:", reg_names [REGNO (addr.base)]);
 	output_addr_const (f, addr.offset);
 	asm_fprintf (f, "]");
 	return;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PING][PATCH][AARCH64]Adjust address with offset assembler format
  2014-02-12 16:10 [PATCH][AARCH64]Adjust address with offset assembler format Renlin Li
@ 2014-02-24  9:45 ` Renlin Li
  2014-02-27 12:38 ` [PATCH][AARCH64]Adjust " Marcus Shawcroft
  1 sibling, 0 replies; 3+ messages in thread
From: Renlin Li @ 2014-02-24  9:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: Marcus Shawcroft, Richard Earnshaw

On 12/02/14 16:10, Renlin Li wrote:
> Hi all,
>
> This is a simple patch which adds a space between base register and 
> offset during the address asm translation, making the output assembler 
> code format consistent for aarch64 target.
>
> Is it Okay for stage-1?
>
> Kind regards,
> Renlin Li
>
>
> gcc/ChangeLog:
>
> 2014-02-12  Renlin Li  <Renlin.Li@arm.com>
>
>     * config/aarch64/aarch64.c (aarch64_print_operand_address): Adjust 
> the output asm format
>     by adding a space  between base register and offset.
Hi all,

Could anybody help me to review this patch?

Thank you!

Renlin Li

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][AARCH64]Adjust address with offset assembler format
  2014-02-12 16:10 [PATCH][AARCH64]Adjust address with offset assembler format Renlin Li
  2014-02-24  9:45 ` [PING][PATCH][AARCH64]Adjust " Renlin Li
@ 2014-02-27 12:38 ` Marcus Shawcroft
  1 sibling, 0 replies; 3+ messages in thread
From: Marcus Shawcroft @ 2014-02-27 12:38 UTC (permalink / raw)
  To: Renlin Li; +Cc: gcc-patches

On 12 February 2014 16:10, Renlin Li <renlin.li@arm.com> wrote:

> gcc/ChangeLog:
>
> 2014-02-12  Renlin Li  <Renlin.Li@arm.com>
>
>     * config/aarch64/aarch64.c (aarch64_print_operand_address): Adjust the
> output asm format
>     by adding a space  between base register and offset.

OK for stage-1.

/Marcus

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-27 12:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 16:10 [PATCH][AARCH64]Adjust address with offset assembler format Renlin Li
2014-02-24  9:45 ` [PING][PATCH][AARCH64]Adjust " Renlin Li
2014-02-27 12:38 ` [PATCH][AARCH64]Adjust " Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).