diff options
Diffstat (limited to 'gas/config/tc-d30v.c')
-rw-r--r-- | gas/config/tc-d30v.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gas/config/tc-d30v.c b/gas/config/tc-d30v.c index f61ff5b..1fdd45b 100644 --- a/gas/config/tc-d30v.c +++ b/gas/config/tc-d30v.c @@ -168,13 +168,6 @@ reg_name_search (name) low = 0; high = reg_name_cnt () - 1; - if (symbol_find (name) != NULL) - { - if (warn_register_name_conflicts) - as_warn ("Register name %s conflicts with symbol of the same name", - name); - } - do { middle = (low + high) / 2; @@ -183,8 +176,17 @@ reg_name_search (name) high = middle - 1; else if (cmp > 0) low = middle + 1; - else - return pre_defined_registers[middle].value; + else + { + if (symbol_find (name) != NULL) + { + if (warn_register_name_conflicts) + as_warn ("Register name %s conflicts with symbol of the same name", + name); + } + + return pre_defined_registers[middle].value; + } } while (low <= high); |