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]

Problem with gas macros


 I have written a gas macro as follows :

.macro  j label
.short  (0xA000 | \label)
.endm

The above macro is supposed to generate the bytes directly for the "j"
instruction. 
The label can be 11 bits maximum.

I am using the following gas version

bash# mips-as --version
GNU assembler 2.13.1
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms
of
the GNU General Public License.  This program has absolutely no
warranty.
This assembler was configured for a target of `mips16'.

I use the macro as follows in a file temp.S

--------------------------------------------
j label
 instruction1
 instruction2
 -
label: instruction2

--------------------------------------------

I get the following error on assembly

bash-2.05b$ mips16-as -alhsm=temp.ls temp.S
temp.S: Assembler messages:
temp.S:275: Error: invalid section for operation

I am not able to understand what the error means. I dont understand what
invalid section for operation implies.

Under what conditions does this error arise ? Any help will be
appreciated.

Regards.
-------------------------------------------------------------
Arun Vishwanathan 
Software Engineer
Nevis Networks Inc.      
------------------------------------------------------------
Good design always comes from bad design. 


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