Unified · Split
| @@ -745,6 +745,13 @@ static inline int constraint_priority(const char *str) · 744 unmodified lines | ||
| 745 | 745 | return priority; |
| 746 | 746 | } |
| 747 | 747 | |
| 748 | +static const char *skip_constraint_modifiers(const char *p) | |
| 749 | +{ | |
| 750 | + while (*p == '=' || *p == '&' || *p == '+' || *p == '%') | |
| 751 | + p++; | |
| 752 | + return p; | |
| 753 | +} | |
| 754 | + | |
| 748 | 755 | static void asm_compute_constraints(uint8_t *regs_allocated, |
| 749 | 756 | ASMOperand *operands, |
| 750 | 757 | int nb_operands1, int nb_outputs, |
| @@ -772,6 +779,7 @@ static void asm_compute_constraints(uint8_t *regs_allocated, · 21 unmodified lines | ||
| 772 | 779 | str = op->constraint; |
| 773 | 780 | op->ref_index = -1; |
| 774 | 781 | op->reg = -1; |
| 782 | + str = skip_constraint_modifiers(str); | |
| 775 | 783 | if (!is_output && (isnum(*str) || *str == '[')) { |
| 776 | 784 | /* this is a reference to another constraint */ |
| 777 | 785 | k = find_constraint(operands, nb_operands1, str, NULL); |
| @@ -780,9 +788,8 @@ static void asm_compute_constraints(uint8_t *regs_allocated, · 2 unmodified lines | ||
| 780 | 788 | j, str); |
| 781 | 789 | op->ref_index = k; |
| 782 | 790 | str = operands[k].constraint; |
| 791 | + str = skip_constraint_modifiers(str); | |
| 783 | 792 | } |
| 784 | − while (*str == '=' || *str == '&' || *str == '+') | |
| 785 | − str++; | |
| 786 | 793 | op->priority = constraint_priority(str); |
| 787 | 794 | } |
| 788 | 795 | |
| @@ -815,8 +822,7 @@ static void asm_compute_constraints(uint8_t *regs_allocated, · 26 unmodified lines | ||
| 815 | 822 | str = operands[op->ref_index].constraint; |
| 816 | 823 | } |
| 817 | 824 | |
| 818 | − while (*str == '=' || *str == '&' || *str == '+') | |
| 819 | − str++; | |
| 825 | + str = skip_constraint_modifiers(str); | |
| 820 | 826 | try_next: |
| 821 | 827 | c = *str++; |
| 822 | 828 | switch(c) { |