This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [js@convergence.de: binutils-2.11.92.0.12.3 gas MIPS bug: nested parens in %hi]


On Sat, Jan 12, 2002 at 03:23:23PM +0100, Thiemo Seufer wrote:
> > >    lui t0, %hi((0xa0000000 + 0x10001000))
> > > 
> > > produces parsing errors because of unmatched parens
> > > (sorry, I don't have the exact error message right now).
> 
> I overlooked this possibility when I changed/reimplemented this
> functions to support NewABI's nested percent op's like
> 
> 	lui $1, %hi(%neg(%pc_rel(symbol)))
...
> > > I dont't know all the details of the MIPS assembler syntax,
> > > but wouldn't it be the right way to use expr() (in gas/expr.c) for
> > > parsing, and provide support for percent-ops via the
> > > md_operand() hook?  This should work since is_name_beginner('%')
> > > returns FALSE and LITERAL_PREFIXPERCENT_BIN is #undef'd.
> 
> AFAICS this does not work for nested percent op's, so I expanded
> your patch to fix some more flaws and did also some code cleanup.

Thanks!

> It still looks ugly.

I read the code some more, and the interaction between mips_ip() and
my_getSmallExpression() is too complex for me to understand ;-),
especially without proper knowledge of the NewABI's % ops.
So, I think I can't help here. I will test your patch within
the next few days, though.


Regards,
Johannes


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]