diff mbox series

[committed,3/5] arc: Remove '^' print punct character

Message ID 20231005114345.1707504-3-claziss@gmail.com
State New
Headers show
Series [committed,1/5] arc: Remove unused/incomplete alignment assembly annotation. | expand

Commit Message

Claudiu Zissulescu Ianculescu Oct. 5, 2023, 11:43 a.m. UTC
The '^' was used to print '@' character in the ouput assembly. This is
not anylonger required by the ARC binutils. Remove it.

gcc/

	* config/arc/arc.cc (arc_init): Remove '^' punct char.
	(arc_print_operand): Remove related code.
	* config/arc/arc.md: Update patterns which uses '%&'.

gcc/testsuite/

	* gcc.target/arc/loop-3.c: Update test.

Signed-off-by: Claudiu Zissulescu <claziss@gmail.com>
---
 gcc/config/arc/arc.cc                 |  9 ---------
 gcc/config/arc/arc.md                 | 18 +++++++++---------
 gcc/testsuite/gcc.target/arc/loop-3.c |  2 +-
 3 files changed, 10 insertions(+), 19 deletions(-)
diff mbox series

Patch

diff --git a/gcc/config/arc/arc.cc b/gcc/config/arc/arc.cc
index 5e597d1bfeb..a1428eb41c3 100644
--- a/gcc/config/arc/arc.cc
+++ b/gcc/config/arc/arc.cc
@@ -1130,7 +1130,6 @@  arc_init (void)
   arc_punct_chars['*'] = 1;
   arc_punct_chars['?'] = 1;
   arc_punct_chars['!'] = 1;
-  arc_punct_chars['^'] = 1;
   arc_punct_chars['+'] = 1;
   arc_punct_chars['_'] = 1;
 }
@@ -4529,7 +4528,6 @@  static int output_sdata = 0;
     'V': cache bypass indicator for volatile
     'P'
     'F'
-    '^'
     'O': Operator
     'o': original symbol - no @ prepending.  */
 
@@ -4953,14 +4951,7 @@  arc_print_operand (FILE *file, rtx x, int code)
     case 'F':
       fputs (reg_names[REGNO (x)]+1, file);
       return;
-    case '^':
-	/* This punctuation character is needed because label references are
-	printed in the output template using %l. This is a front end
-	character, and when we want to emit a '@' before it, we have to use
-	this '^'.  */
 
-	fputc('@',file);
-	return;
     case 'O':
       /* Output an operator.  */
       switch (GET_CODE (x))
diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md
index 2a3ff05b66b..945cc4042d1 100644
--- a/gcc/config/arc/arc.md
+++ b/gcc/config/arc/arc.md
@@ -3934,9 +3934,9 @@  (define_insn "*branch_insn"
     {
       arc_ccfsm_record_condition (operands[1], false, insn, 0);
       if (get_attr_length (insn) == 2)
-	 return \"b%d1%? %^%l0\";
+	 return \"b%d1%?\\t%l0\";
       else
-	 return \"b%d1%# %^%l0\";
+	 return \"b%d1%#\\t%l0\";
     }
 }"
   [(set_attr "type" "branch")
@@ -3984,9 +3984,9 @@  (define_insn "*rev_branch_insn"
     {
       arc_ccfsm_record_condition (operands[1], true, insn, 0);
       if (get_attr_length (insn) == 2)
-	 return \"b%D1%? %^%l0\";
+	 return \"b%D1%?\\t%l0\";
       else
-	 return \"b%D1%# %^%l0\";
+	 return \"b%D1%#\\t%l0\";
     }
 }"
   [(set_attr "type" "branch")
@@ -4026,7 +4026,7 @@  (define_expand "jump"
 (define_insn "jump_i"
   [(set (pc) (label_ref (match_operand 0 "" "")))]
   "!TARGET_LONG_CALLS_SET || !CROSSING_JUMP_P (insn)"
-  "b%!%* %^%l0"
+  "b%!%*\\t%l0"
   [(set_attr "type" "uncond_branch")
    (set (attr "iscompact")
 	(if_then_else (match_test "get_attr_length (insn) == 2")
@@ -4990,13 +4990,13 @@  (define_insn "cbranchsi4_scratch"
    "*
      switch (get_attr_length (insn))
      {
-       case 2: return \"br%d0%? %1, %2, %^%l3\";
-       case 4: return \"br%d0%* %1, %B2, %^%l3\";
+       case 2: return \"br%d0%?\\t%1,%2,%l3\";
+       case 4: return \"br%d0%*\\t%1,%B2,%l3\";
        case 8: if (!brcc_nolimm_operator (operands[0], VOIDmode))
-		 return \"br%d0%* %1, %B2, %^%l3\";
+		 return \"br%d0%*\\t%1,%B2,%l3\";
        /* FALLTHRU */
        case 6: case 10:
-       case 12:return \"cmp%? %1, %B2\\n\\tb%d0%* %^%l3 ;br%d0 out of range\";
+       case 12:return \"cmp%? %1, %B2\\n\\tb%d0%*\\t%l3 ;br%d0 out of range\";
        default: fprintf (stderr, \"unexpected length %d\\n\", get_attr_length (insn)); fflush (stderr); gcc_unreachable ();
      }
    "
diff --git a/gcc/testsuite/gcc.target/arc/loop-3.c b/gcc/testsuite/gcc.target/arc/loop-3.c
index 7f55e2f43fa..ae0d6110f18 100644
--- a/gcc/testsuite/gcc.target/arc/loop-3.c
+++ b/gcc/testsuite/gcc.target/arc/loop-3.c
@@ -23,5 +23,5 @@  void fn1(void)
   }
 }
 
-/* { dg-final { scan-assembler "bne.*@.L2" } } */
+/* { dg-final { scan-assembler "bne.*\\.L2" } } */
 /* { dg-final { scan-assembler-not "add.eq" } } */