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