aboutsummaryrefslogtreecommitdiff
path: root/tccasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tccasm.c')
-rw-r--r--tccasm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tccasm.c b/tccasm.c
index b651f68..eed3cdb 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -1079,6 +1079,7 @@ static void parse_asm_operands(ASMOperand *operands, int *nb_operands_ptr,
if (tok != ':') {
nb_operands = *nb_operands_ptr;
for(;;) {
+ CString astr;
if (nb_operands >= MAX_ASM_OPERANDS)
tcc_error("too many asm operands");
op = &operands[nb_operands++];
@@ -1091,11 +1092,10 @@ static void parse_asm_operands(ASMOperand *operands, int *nb_operands_ptr,
next();
skip(']');
}
- if (tok != TOK_STR)
- expect("string constant");
- op->constraint = tcc_malloc(tokc.str.size);
- strcpy(op->constraint, tokc.str.data);
- next();
+ parse_mult_str(&astr, "string constant");
+ op->constraint = tcc_malloc(astr.size);
+ strcpy(op->constraint, astr.data);
+ cstr_free(&astr);
skip('(');
gexpr();
if (is_output) {