This adds an extra feature: Commas inside double quotes are not an
arg delimiter, and thus can be part of the arg.
* loongarch-coder.c (loongarch_split_args_by_comma): Commas
inside quotes are not arg delimiters.
along with this program; see the file COPYING3. If not,
see <http://www.gnu.org/licenses/>. */
#include "sysdep.h"
+#include <stdbool.h>
#include "opcode/loongarch.h"
int
if (*args)
{
+ bool inquote = false;
arg_strs[num++] = args;
for (; *args; args++)
- if (*args == ',')
+ if (*args == '"')
+ inquote = !inquote;
+ else if (*args == ',' && !inquote)
{
if (MAX_ARG_NUM_PLUS_2 - 1 == num)
goto out;