summaryrefslogtreecommitdiff
path: root/gas/config/tc-cr16.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/config/tc-cr16.c')
-rw-r--r--gas/config/tc-cr16.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gas/config/tc-cr16.c b/gas/config/tc-cr16.c
index 901838398ec..951e9ac7f38 100644
--- a/gas/config/tc-cr16.c
+++ b/gas/config/tc-cr16.c
@@ -2560,8 +2560,11 @@ md_assemble (char *op)
if (streq ("cinv", op))
{
/* Validate the cinv options. */
+ unsigned int op_len, param_len;
check_cinv_options (param);
- strcat (op, param);
+ op_len = strlen (op);
+ param_len = strlen (param) + 1;
+ memmove (op + op_len, param, param_len);
}
/* MAPPING - SHIFT INSN, if imm4/imm16 positive values