Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
6236a862
Commit
6236a862
authored
Jan 24, 2016
by
Christoph Mallon
Browse files
Add stub support for the asm constraint modifier '%'.
parent
d7fdfbf0
Changes
3
Hide whitespace changes
Inline
Side-by-side
NEWS.md
View file @
6236a862
...
...
@@ -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)
...
...
ir/be/beasm.c
View file @
6236a862
...
...
@@ -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
'&'
:
...
...
ir/be/bemain.c
View file @
6236a862
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment