On Thu, Sep 26, 2002 at 01:37:39PM +0200, Svein E. Seldal wrote:
Index: expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.45
diff -c -3 -p -r1.45 expr.c
*** expr.c 20 Sep 2002 00:58:39 -0000 1.45
--- expr.c 26 Sep 2002 11:30:18 -0000
*************** operand (expressionP)
*** 841,846 ****
--- 841,852 ----
c = *input_line_pointer;
switch (c)
{
+ #ifdef TC_TIC4X
+ case '.': /* 0. */
+ floating_constant (expressionP);
+ break;
+ #endif
+
case 'o':
case 'O':
case 'q':
You should be able to handle this a few lines above, changing
/* Check for a hex constant. */
for (s = input_line_pointer; hex_p (*s); s++)
;
if (*s == 'h' || *s == 'H')
to
/* Check for a hex constant or floating point number. */
for (s = input_line_pointer; hex_p (*s); s++)
;
if (*s == 'h' || *s == 'H' || *input_line_pointer == '.')
*************** operand (expressionP)
*** 1079,1084 ****
--- 1085,1100 ----
else
expressionP->X_add_number = ! expressionP->X_add_number;
}
+ #ifdef TC_TIC4X
+ else if (expressionP->X_op == O_big && expressionP->X_add_number <= 0)
+ {
+ /* Negative flonum (eg, -1.000e0). */
+ if (generic_floating_point_number.sign == '+')
+ generic_floating_point_number.sign = '-';
+ else if (generic_floating_point_number.sign == 'P')
+ generic_floating_point_number.sign = 'N';
+ }
+ #endif
else if (expressionP->X_op != O_illegal
&& expressionP->X_op != O_absent)
{
This is careless. What about case '!' and case '~'? Please fix
your formatting too.
This patch is what it is, unaltered from the "original" binutils patch
from from Michael Hayes (the c4x-gcc author). If you disapprove this
patch, then I'll have to pull up my sleeves and actually start working
this thing out myself. (Maybe I'll get some help from Michael.) I
francly hoped to get this up and running, as this is the single blocker
for complete (offical) binutils/gcc support for tic4x. Initially I have
had nothing to do with this code, so I hope you'll excuse my persistence.