This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
STUB_MOVE in elfxx-mips.c
- From: Atsushi Nemoto <anemo at mba dot ocn dot ne dot jp>
- To: binutils at sources dot redhat dot com
- Date: Wed, 01 Oct 2003 23:13:37 +0900 (JST)
- Subject: STUB_MOVE in elfxx-mips.c
I found following codes in bfd/elfxx-mips.c:
#define STUB_MOVE(abfd) \
(SGI_COMPAT (abfd) ? 0x03e07825 : 0x03e07821) /* move t7,ra */
0x03e07825 is "OR $15,$31,$0" and 0x03e07821 is "ADDU $15,$31,$0".
Why SGI_COMPAT() is used here?
The ADDU can not be used to copy 64bit register because the result is
sign-extended value of the low 32bit of the source register. So OR
must be used for 64bit ABI, right? Or using OR unconditionally is
enough, isn't it? Or am I missing something?
---
Atsushi Nemoto