Hi, I am trying to compile romInit.s in vxWorks. And I am getting too many errors of following type ../romInit.s:452: Error: too many positional arguments The reason is the Macro definition does not take any space around operator for ex: li r3, MACRO_DEF where as MACRO_DEF is #define MACRO_DEF (a + b) #define a 0x1000 #define b 0x2000 To be able to compile successfully the above definition needs to be changed to #define MACRO_DEF (a+b) #define a (0x1000) #define b (0x2000) it reduces readability and it is tedious to do for all MACROS lise this thanks aparna
Please attach a test case. Your bug report doesn't make sense. You say you are using #define, ie. C preprocessor macros, but complain about a gas macro error message.
Subject: RE: Error: too many positional arguments Hi, Thanks for the reply Ok, sorry for the confusion. I did not give complete details. It normally happens when the defines are in a .macro definition For ex: An Asm instruction LOAD32 r4,FISRT_BLOCK_END Where as .macro LOAD32 reg,val .if ((0xffff8000 <= (\val) ) && ( (\val) <= 0x00007fff)) li \reg, \val .else .if ~(\val) & 0xffff8000 lis \reg, HIADJ(\val) .else lis \reg, 0x0000 .endif .if (\val) & 0xffff addi \reg, \reg, LO(\val) .endif .endif .endm And #define FISRT_BLOCK_END (LOCAL_MEM_LOCAL_ADRS+EXC_MSG_OFFSET - 4) Gives too many positional argumnet error If I change the definition to #define FISRT_BLOCK_END (LOCAL_MEM_LOCAL_ADRS+EXC_MSG_OFFSET-4) It is fine I think there is a similar bug Id 1077, but still in open state Thanks aparna -----Original Message----- From: amodra at bigpond dot net dot au [mailto:sourceware-bugzilla@sourceware.org] Sent: Tuesday, March 04, 2008 3:24 PM To: Aparna Jain (apjain) Subject: [Bug gas/5860] Error: too many positional arguments ------- Additional Comments From amodra at bigpond dot net dot au 2008-03-04 09:53 ------- Please attach a test case. Your bug report doesn't make sense. You say you are using #define, ie. C preprocessor macros, but complain about a gas macro error message. -- What |Removed |Added ------------------------------------------------------------------------ ---- Status|NEW |WAITING http://sourceware.org/bugzilla/show_bug.cgi?id=5860 ------- You are receiving this mail because: ------- You reported the bug, or are watching the reporter.
You still haven't attached a test case. Your pasted code snippets will not assemble without the definitions for HIADJ and LO. Incidentally, the LOAD32 macro is broken on 64-bit hosts or when binutils is compiled with a 64-bit bfd. If you can't post a complete testcase, please try a newer version of binutils. I think your problem has already been fixed.
Closing due to lack of response.