Commit 228d07f0 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

be: Correct handling of (and ignore) the '*' asm constraint modifier.

parent a861ef58
......@@ -126,8 +126,10 @@ static void be_init_default_asm_constraint_flags(void)
* from INVALID. Backends should change the flags they support. */
char const *const gcc_common_flags = "!%&0123456789<>?EFGHIJKLMNOPVXgimoprs";
be_set_constraint_support(ASM_CONSTRAINT_FLAG_NO_SUPPORT, gcc_common_flags);
/* Skip whitespace. */
be_set_constraint_support(ASM_CONSTRAINT_FLAG_NONE, "\t\n\r ");
/* Skip whitespace.
* TODO '*' actually penalizes the selection of the next constraint letter.
* We do not support this, yet. */
be_set_constraint_support(ASM_CONSTRAINT_FLAG_NONE, "\t\n\r *");
}
static void initialize_isa(void)
......@@ -167,10 +169,6 @@ asm_constraint_flags_t be_parse_asm_constraints(const char *constraint)
while (*c != 0 && *c != ',')
++c;
break;
case '*':
/* next character is a comment */
++c;
break;
default:
flags |= asm_constraint_flags[(unsigned char)*c];
......
......@@ -169,19 +169,14 @@ static void parse_asm_constraints(constraint_t *const constraint, ident *const c
arch_register_class_t const *new_cls = NULL;
char new_imm = '\0';
switch (*c) {
/* Skip spaces, out/in-out marker. */
case ' ':
case '\t':
case '\n':
break;
/* Skip out/in-out marker */
case '=': break;
case '+': break;
case '&': break;
case '=':
case '+':
case '&':
case '*':
++c;
break;
case '#':
......
......@@ -255,10 +255,10 @@ static void parse_asm_constraints(constraint_t *const constraint,
case '\n':
case '=':
case '+':
case '&': break;
case '&':
case '*':
++c;
break;
case '#':
while (*c != 0 && *c != ',')
++c;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment