From patchwork Tue Jan 8 08:21:22 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [AARCH64] Remove REGISTER_PREFIX From: "Hurugalawadi, Naveen" X-Patchwork-Id: 210313 Message-Id: To: "gcc-patches@gcc.gnu.org" Date: Tue, 8 Jan 2013 08:21:22 +0000 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 * 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. --- 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 ""