h8300 branch relaxing
DJ Delorie
dj@redhat.com
Fri Jul 11 03:37:00 GMT 2008
While investigating why gas doesn't relax branches for h8/300, I
discovered that the .sbranch and .lbranch pseudos have no effect. So,
here's a patch to at least support those (although gcc doesn't use
them). Ok?
In addition, is anyone working on adding branch relaxing for the h8?
Index: tc-h8300.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-h8300.c,v
retrieving revision 1.57
diff -p -U3 -r1.57 tc-h8300.c
--- tc-h8300.c 17 Oct 2007 16:45:55 -0000 1.57
+++ tc-h8300.c 11 Jul 2008 03:36:18 -0000
@@ -1815,7 +1815,12 @@ fix_operand_size (struct h8_op *operand,
/* This condition is long standing, though somewhat suspect. */
if (operand->exp.X_add_number > -128
&& operand->exp.X_add_number < 127)
- operand->mode |= L_8;
+ {
+ if (operand->exp.X_add_symbol != NULL)
+ operand->mode |= bsize;
+ else
+ operand->mode |= L_8;
+ }
else
operand->mode |= L_16;
break;
More information about the Binutils
mailing list