From: Jim Wilson Date: Thu, 5 Jul 2001 02:30:21 +0000 (+0000) Subject: Fix 2 ia64-linux gas testsuite failures. X-Git-Tag: dberlin-typesystem-branchpoint~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3e37788f8d4f5cfa856054a2c7aabacdc1dc0bd1;p=platform%2Fupstream%2Fbinutils.git Fix 2 ia64-linux gas testsuite failures. * config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod sched branches. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index 5f2137f..9464ac7 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2001-07-04 Jim Wilson + + * config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod + sched branches. + 2001-07-05 Ben Elliston * read.c (s_fill): Correct spelling error in comments. diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c index 0a3dcc6..5ba8157 100644 --- a/gas/config/tc-ia64.c +++ b/gas/config/tc-ia64.c @@ -6914,19 +6914,29 @@ ia64_canonicalize_symbol_name (name) return name; } -/* Return true if idesc is a conditional branch instruction. */ +/* Return true if idesc is a conditional branch instruction. This excludes + the modulo scheduled branches, and br.ia. Mod-sched branches are excluded + because they always read/write resources regardless of the value of the + qualifying predicate. br.ia must always use p0, and hence is always + taken. Thus this function returns true for branches which can fall + through, and which use no resources if they do fall through. */ static int is_conditional_branch (idesc) struct ia64_opcode *idesc; { /* br is a conditional branch. Everything that starts with br. except - br.ia is a conditional branch. Everything that starts with brl is a - conditional branch. */ + br.ia, br.c{loop,top,exit}, and br.w{top,exit} is a conditional branch. + Everything that starts with brl is a conditional branch. */ return (idesc->name[0] == 'b' && idesc->name[1] == 'r' && (idesc->name[2] == '\0' - || (idesc->name[2] == '.' && idesc->name[3] != 'i') - || idesc->name[2] == 'l')); + || (idesc->name[2] == '.' && idesc->name[3] != 'i' + && idesc->name[3] != 'c' && idesc->name[3] != 'w') + || idesc->name[2] == 'l' + /* br.cond, br.call, br.clr */ + || (idesc->name[2] == '.' && idesc->name[3] == 'c' + && (idesc->name[4] == 'a' || idesc->name[4] == 'o' + || (idesc->name[4] == 'l' && idesc->name[5] == 'r'))))); } /* Return whether the given opcode is a taken branch. If there's any doubt,