From: mengqinggang Date: Sun, 10 Dec 2023 09:41:32 +0000 (+0800) Subject: LoongArch: Add support for and X-Git-Tag: binutils-2_42~637 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22b78fad28;p=thirdparty%2Fbinutils-gdb.git LoongArch: Add support for and Support symbol names enclosed in double quotation marks. --- diff --git a/gas/testsuite/gas/loongarch/double_quotation_marks.d b/gas/testsuite/gas/loongarch/double_quotation_marks.d new file mode 100644 index 00000000000..a42534b94a4 --- /dev/null +++ b/gas/testsuite/gas/loongarch/double_quotation_marks.d @@ -0,0 +1,13 @@ +#as: +#objdump: -dr + +.*:[ ]+file format .* + + +Disassembly of section .text: + +.* <.text>: +[ ]+0:[ ]+50000000[ ]+b[ ]+0[ ]+# 0x0 +[ ]+0: R_LARCH_B26[ ]+.L1 +[ ]+4:[ ]+5800018d[ ]+beq[ ]+\$t0, \$t1, 0[ ]+# 0x4 +[ ]+4: R_LARCH_B16[ ]+.L1 diff --git a/gas/testsuite/gas/loongarch/double_quotation_marks.s b/gas/testsuite/gas/loongarch/double_quotation_marks.s new file mode 100644 index 00000000000..f8b63074150 --- /dev/null +++ b/gas/testsuite/gas/loongarch/double_quotation_marks.s @@ -0,0 +1,2 @@ +b ".L1" +beq $r12, $r13, ".L1" diff --git a/opcodes/loongarch-coder.c b/opcodes/loongarch-coder.c index a68ae1c3106..672a468b3f4 100644 --- a/opcodes/loongarch-coder.c +++ b/opcodes/loongarch-coder.c @@ -264,6 +264,13 @@ loongarch_split_args_by_comma (char *args, const char *arg_strs[]) else *args = '\0', arg_strs[num++] = args + 1; } + + if (*(args-1) == '"') + { + *(args-1) = '\0'; + arg_strs[num-1] = arg_strs[num-1] + 1; + } + arg_strs[num] = NULL; return num; }