Patchwork [AARCH64] Remove REGISTER_PREFIX

login
register
mail settings
Submitter Hurugalawadi, Naveen
Date Jan. 8, 2013, 8:21 a.m.
Message ID <F3068DEED1A463459E0887A091B15493380961@BY2PRD0710MB364.namprd07.prod.outlook.com>
Download mbox | patch
Permalink /patch/210313/
State New
Headers show

Comments

Hurugalawadi, Naveen - Jan. 8, 2013, 8:21 a.m.
Hi,

AARCH64 back-end defines REGISTER_PREFIX to empty string.
Hence, it can be removed as the default value of REGISTER_PREFIX is "".

Please find attached the patch that removes REGISTER_PREFIX and all its
occurrence in aarch64 back-end. Please review the patch and let me know
if there should be any modifications?

Build and tested on aarch64-thunder-elf (using Cavium's internal
simulator).

Thanks,
Naveen.H.S

2013-01-08   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>

	* config/aarch64/aarch64-elf.h (REGISTER_PREFIX): Remove.
	* config/aarch64/aarch64.c (aarch64_print_operand): Remove all
	occurrence of REGISTER_PREFIX as its empty string.
Marcus Shawcroft - Jan. 23, 2013, 9:48 a.m.
On 08/01/13 08:21, Hurugalawadi, Naveen wrote:
> Hi,
>
> AARCH64 back-end defines REGISTER_PREFIX to empty string.
> Hence, it can be removed as the default value of REGISTER_PREFIX is "".
>
> Please find attached the patch that removes REGISTER_PREFIX and all its
> occurrence in aarch64 back-end. Please review the patch and let me know
> if there should be any modifications?
>
> Build and tested on aarch64-thunder-elf (using Cavium's internal
> simulator).
>
> Thanks,
> Naveen.H.S
>
> 2013-01-08   Naveen H.S  <Naveen.Hurugalawadi@caviumnetworks.com>
>
> 	* config/aarch64/aarch64-elf.h (REGISTER_PREFIX): Remove.
> 	* config/aarch64/aarch64.c (aarch64_print_operand): Remove all
> 	occurrence of REGISTER_PREFIX as its empty string.
>


This is OK, but please don't apply until trunk enters stage-1.

/Marcus

Patch

--- gcc/config/aarch64/aarch64.c	2013-01-07 17:04:51.295005008 +0530
+++ gcc/config/aarch64/aarch64.c	2013-01-08 09:50:46.717051922 +0530
@@ -3348,7 +3348,7 @@  aarch64_print_operand (FILE *f, rtx x, c
 	  output_operand_lossage ("incompatible floating point / vector register operand for '%%%c'", code);
 	  return;
 	}
-      asm_fprintf (f, "%s%c%d", REGISTER_PREFIX, code, REGNO (x) - V0_REGNUM);
+      asm_fprintf (f, "%c%d", code, REGNO (x) - V0_REGNUM);
       break;
 
     case 'S':
@@ -3361,8 +3361,7 @@  aarch64_print_operand (FILE *f, rtx x, c
 	  output_operand_lossage ("incompatible floating point / vector register operand for '%%%c'", code);
 	  return;
 	}
-      asm_fprintf (f, "%sv%d", REGISTER_PREFIX,
-			       REGNO (x) - V0_REGNUM + (code - 'S'));
+      asm_fprintf (f, "v%d", REGNO (x) - V0_REGNUM + (code - 'S'));
       break;
 
     case 'w':
@@ -3371,20 +3370,19 @@  aarch64_print_operand (FILE *f, rtx x, c
          64-bit).  */
       if (x == const0_rtx)
 	{
-	  asm_fprintf (f, "%s%czr", REGISTER_PREFIX, code);
+	  asm_fprintf (f, "%czr", code);
 	  break;
 	}
 
       if (REG_P (x) && GP_REGNUM_P (REGNO (x)))
 	{
-	  asm_fprintf (f, "%s%c%d", REGISTER_PREFIX, code,
-		       REGNO (x) - R0_REGNUM);
+	  asm_fprintf (f, "%c%d", code, REGNO (x) - R0_REGNUM);
 	  break;
 	}
 
       if (REG_P (x) && REGNO (x) == SP_REGNUM)
 	{
-	  asm_fprintf (f, "%s%ssp", REGISTER_PREFIX, code == 'w' ? "w" : "");
+	  asm_fprintf (f, "%ssp", code == 'w' ? "w" : "");
 	  break;
 	}
 
--- gcc/config/aarch64/aarch64-elf.h	2012-12-14 09:53:42.265262998 +0530
+++ gcc/config/aarch64/aarch64-elf.h	2013-01-08 09:47:17.525044826 +0530
@@ -106,7 +106,6 @@ 
 
 #define ASM_COMMENT_START "//"
 
-#define REGISTER_PREFIX		""
 #define LOCAL_LABEL_PREFIX	"."
 #define USER_LABEL_PREFIX	""