This is the mail archive of the
mailing list for the binutils project.
Re: .cpload $25 understanding help
- From: David Daney <ddaney at avtrex dot com>
- To: Deep Visana <deep_visana at yahoo dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 25 Jan 2007 21:51:13 -0800
- Subject: Re: .cpload $25 understanding help
- References: <firstname.lastname@example.org>
Deep Visana wrote:
Hi,.cpload $25 causes $gp to be set to the proper value given that $25
contains the address of the same .cpload (which should always be the
function entry point.
Writing this to you after reading mail thread
Need your help as I am new to MIPS and assembly code
We have seen that gcc compiler emits .cpload $25.
Q1: ".cpload $25" pseudo-ops and needs to be
interpreted by gnu assembler?
Q2: What should be done by assembler to replace it
with correct instruction. What are the content of $25?
If you read the message that you referenced you would see that the
addu $gp,$gp,.cpload argument
$25 contains the address of the function being called.
Q3: Is there any good refernce/documentation to such
mips specific pseudo ops available somewhere?
Yes. I once found one by using Google. I forget where I put it.
Our basic problem is that we need to feed gcc
compiled ".s" to Greenhills MIPS assembler and it does
not understand .cpload pseudo. Any suggestions on how
to replace .cpload with correct m/c instruction in few
such .s file?
Cpu is mips 5k running in 32bit mode.
You don't say which ABI the Greenhills tools use. If they don't use the
o32 ABI then you will probably have problems. GCC allows you to choose
several different ABIs. You should choose one that matches what
Greenhills is using.