gas: drop TC_ADDRESS_BYTES conditionals

Message ID 41c7be2a-4682-a255-6563-8a60b7d927d9@suse.com
State New
Headers show
Series
  • gas: drop TC_ADDRESS_BYTES conditionals
Related show

Commit Message

Alan Modra via Binutils June 10, 2021, 11:36 a.m.
I've been repeatedly confused by, in particular, the .dc.a potable[]
entry being conditional. Grepping in gas/config/ reveals only very few
targets actually #define-ing it. But as of 7be1c4891a20 the symbol is
always defined, so #ifdef-s are pointless (and, as said, potentially
confusing).

gas/
2021-06-XX  Jan Beulich  <jbeulich@suse.com>

	* read.c (potable, cons_worker): Drop TC_ADDRESS_BYTES
	conditional.

Comments

Alan Modra via Binutils June 11, 2021, 2:21 p.m. | #1
Hi Jan,

> 2021-06-XX  Jan Beulich  <jbeulich@suse.com>

> 

> 	* read.c (potable, cons_worker): Drop TC_ADDRESS_BYTES

> 	conditional.


Approved - please apply.

Cheers
   Nick

PS.  If you are feeling motivated, a patch to update the description
of TC_ADDRESS_BYTES in gas/doc/internals.texi is pre-approved.  By
"updated" I mean "adding a line saying that if not defined a default
value will automatically be computed" or some phrsing similar to that.

Patch

--- a/gas/read.c
+++ b/gas/read.c
@@ -364,9 +364,7 @@  static const pseudo_typeS potable[] = {
   {"common.s", s_mri_common, 1},
   {"data", s_data, 0},
   {"dc", cons, 2},
-#ifdef TC_ADDRESS_BYTES
   {"dc.a", cons, 0},
-#endif
   {"dc.b", cons, 1},
   {"dc.d", float_cons, 'd'},
   {"dc.l", cons, 4},
@@ -4095,10 +4093,8 @@  cons_worker (int nbytes,	/* 1=.byte, 2=.
       return;
     }
 
-#ifdef TC_ADDRESS_BYTES
   if (nbytes == 0)
     nbytes = TC_ADDRESS_BYTES ();
-#endif
 
 #ifdef md_cons_align
   md_cons_align (nbytes);