Mercurial > hg > tinycc
changeset 257:9aefaa6735e3
[project @ 2003-04-27 11:46:10 by bellard]
added % constraint
author | bellard |
---|---|
date | Sun, 27 Apr 2003 11:46:10 +0000 |
parents | b47b8f2aebf6 |
children | 23d6a8deb2d6 |
files | i386-asm.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/i386-asm.c Sun Apr 27 11:45:54 2003 +0000 +++ b/i386-asm.c Sun Apr 27 11:46:10 2003 +0000 @@ -745,6 +745,13 @@ return priority; } +static const char *skip_constraint_modifiers(const char *p) +{ + while (*p == '=' || *p == '&' || *p == '+' || *p == '%') + p++; + return p; +} + static void asm_compute_constraints(uint8_t *regs_allocated, ASMOperand *operands, int nb_operands1, int nb_outputs, @@ -772,6 +779,7 @@ str = op->constraint; op->ref_index = -1; op->reg = -1; + str = skip_constraint_modifiers(str); if (!is_output && (isnum(*str) || *str == '[')) { /* this is a reference to another constraint */ k = find_constraint(operands, nb_operands1, str, NULL); @@ -780,9 +788,8 @@ j, str); op->ref_index = k; str = operands[k].constraint; + str = skip_constraint_modifiers(str); } - while (*str == '=' || *str == '&' || *str == '+') - str++; op->priority = constraint_priority(str); } @@ -815,8 +822,7 @@ str = operands[op->ref_index].constraint; } - while (*str == '=' || *str == '&' || *str == '+') - str++; + str = skip_constraint_modifiers(str); try_next: c = *str++; switch(c) {