LoongArch: Add support for <b ".L1"> and <beq, $t0, $t1, ".L1">
Support symbol names enclosed in double quotation marks.
This commit is contained in:
parent
42cb93f57d
commit
22b78fad28
3 changed files with 22 additions and 0 deletions
13
gas/testsuite/gas/loongarch/double_quotation_marks.d
Normal file
13
gas/testsuite/gas/loongarch/double_quotation_marks.d
Normal file
|
@ -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
|
2
gas/testsuite/gas/loongarch/double_quotation_marks.s
Normal file
2
gas/testsuite/gas/loongarch/double_quotation_marks.s
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
b ".L1"
|
||||||
|
beq $r12, $r13, ".L1"
|
|
@ -264,6 +264,13 @@ loongarch_split_args_by_comma (char *args, const char *arg_strs[])
|
||||||
else
|
else
|
||||||
*args = '\0', arg_strs[num++] = args + 1;
|
*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;
|
arg_strs[num] = NULL;
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue