Commit 6236a862 authored by Christoph Mallon's avatar Christoph Mallon
Browse files

Add stub support for the asm constraint modifier '%'.

parent d7fdfbf0
......@@ -5,6 +5,7 @@ libFirm 1.22.1 (2016-01-07)
* Add `ia32-get_ip={pop,thunk}`
* Generate 'mov $~1, %r; rol x, %r' for '~(1 << x)' (ia32)
* Generate 'mov $~0x80000000, %r; ror x, %r' for '~(0x80000000 >> x)' (ia32)
* Stub support for the asm constraint modifier '%'
* Bugfixes
libFirm 1.22.0 (2015-12-31)
......
......@@ -82,6 +82,7 @@ void be_parse_asm_constraints_internal(be_asm_constraint_t *const constraint, id
case ' ':
case '\t':
case '\n':
case '%':
case '=':
case '+':
case '&':
......
......@@ -137,7 +137,7 @@ static void be_init_default_asm_constraint_flags(void)
/* List of constraints supported by gcc for any machine (or at least
* recognized). Mark them as NO_SUPPORT so we can differentiate them
* from INVALID. Backends should change the flags they support. */
char const *const gcc_common_flags = "%,0123456789<>EFGHIJKLMNOPVXgimoprs";
char const *const gcc_common_flags = ",0123456789<>EFGHIJKLMNOPVXgimoprs";
be_set_constraint_support(ASM_CONSTRAINT_FLAG_NO_SUPPORT, gcc_common_flags);
/* Skip whitespace.
* TODO '*' actually penalizes the selection of the next constraint letter.
......@@ -173,6 +173,7 @@ asm_constraint_flags_t be_parse_asm_constraints(const char *constraint)
switch (*c) {
case '=': ++c; flags = ASM_CONSTRAINT_FLAG_MODIFIER_WRITE; break;
case '+': ++c; flags = ASM_CONSTRAINT_FLAG_MODIFIER_READ | ASM_CONSTRAINT_FLAG_MODIFIER_WRITE; break;
case '%': ++c; /* FALLTHROUGH */ /* TODO stub, should mark this operand as commutative with the next. */
default: flags = ASM_CONSTRAINT_FLAG_MODIFIER_READ; break;
}
......
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