From 2e57ce7b1422a025a65ad4ef0b1f2f4c214b9eec Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 27 Aug 2015 22:50:38 +0930 Subject: More fallout from "Allow symbol and label names to be enclosed in double quotes" Some of the TC_START_LABEL implementations need to adjust the end of the symbol, when a colon doesn't mean a label definition. That means they need access to nul_char both the restore the NUL location (it may be a quote rather than a colon) and to store the new nul_char. Others need adjusting to step over a potential trailing quote. PR gas/18581 * config/tc-aarch64.h (TC_START_LABEL): Redefine. * config/tc-arm.c (tc_start_label_without_colon): Delete params. Use input_line_pointer directly. * config/tc-arm.h (TC_START_LABEL): Redefine. (TC_START_LABEL_WITHOUT_COLON): Redefine. (tc_start_label_without_colon): Update prototype. * config/tc-bfin.c (bfin_start_label): Delete ptr param. Check for NUL instead. * config/tc-bfin.h (bfin_start_label): Update prototype. (TC_START_LABEL): Redefine. * config/tc-d30v.h (TC_START_LABEL): Redefine. * config/tc-fr30.c (restore_colon): Rewrite. (fr30_is_colon_insn): Add nul_char param. Return int. Bump i_l_p over quote. Update restore_colon calls. * config/tc-fr30.h (TC_START_LABEL): Redefine. (fr30_is_colon_insn): Update prototype. * config/tc-m32c.c (restore_colon, m32c_is_colon_insn): As above. * config/tc-m32c.h (TC_START_LABEL): Redefine. (m32c_is_colon_insn): Update prototype. * config/tc-m32r.h (TC_START_LABEL): Redefine. * config/tc-mep.h (TC_START_LABEL): Redefine. * config/tc-nds32.h (TC_START_LABEL): Redefine. * config/tc-tic54x.c (tic54x_start_label): Replace params with nul_char and next_char. Step over trailing quote. * config/tc-tic54x.h (TC_START_LABEL_WITHOUT_COLON): Redefine. (tic54x_start_label): Update prototype. * read.c (TC_START_LABEL): Redefine. Update invocation. (TC_START_LABEL_WITHOUT_COLON): Update invocation. * config/tc-nios2.c (s_nios2_set): Save initial input_line_pointer and restore if calling s_set. Don't restore delim again. --- gas/config/tc-tic54x.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gas/config/tc-tic54x.h') diff --git a/gas/config/tc-tic54x.h b/gas/config/tc-tic54x.h index 0dacf21..9dd6f44 100644 --- a/gas/config/tc-tic54x.h +++ b/gas/config/tc-tic54x.h @@ -65,8 +65,9 @@ struct bit_info #define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while (0) /* tell GAS whether the given token is indeed a code label */ -#define TC_START_LABEL_WITHOUT_COLON(c,ptr) tic54x_start_label(c,ptr) -extern int tic54x_start_label (int, char *); +#define TC_START_LABEL_WITHOUT_COLON(NUL_CHAR, NEXT_CHAR) \ + tic54x_start_label(NUL_CHAR, NEXT_CHAR) +extern int tic54x_start_label (int, int); /* custom handling for relocations in cons expressions */ #define TC_CONS_FIX_NEW(FRAG, OFF, LEN, EXP, RELOC) \ -- cgit v1.1