linux-origin
[Top] [All Lists]

Re: compilers ... again

To: Ulf Carlsson <ulfc@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: compilers ... again
From: Ralf Baechle <ralf@xxxxxxxxxxx>
Date: Wed, 26 Apr 2000 14:40:56 -0700
Cc: Kanoj Sarcar <kanoj@xxxxxxxxxxxxxxxxxxx>, linux-origin@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.21.0004261425420.1735-100000@calypso.engr.sgi.com>; from ulfc@calypso.engr.sgi.com on Wed, Apr 26, 2000 at 02:33:24PM -0700
References: <200004261508.IAA79987@google.engr.sgi.com> <Pine.LNX.4.21.0004261425420.1735-100000@calypso.engr.sgi.com>
Sender: owner-linux-origin@xxxxxxxxxxx
On Wed, Apr 26, 2000 at 02:33:24PM -0700, Ulf Carlsson wrote:

> > Here's another more serious problem: create a UP kernel, then disassemble
> > handle_sys. Identify the code that corresponds to the STI. You will see
> > the generated code is using registers t4 and t5, instead of t0 and t1
> > as in the definition of STI in asm/stackframe.h. I can't say this is 
> > causing any problems, but it is surely disturbing me ...
> 
> This is not really a problem.  In a 32-bit kernel we are using the register
> definition that's from System V Application Binary Interface, but in the
> 64-bit kernel we're using another register definition.  I don't know where the
> latter one is specified, but you can find it documented in for example the
> MIPSpro Assembly Language Programmer's Guide.

It's defined in the n32 / 64-bit psABI.

>  As you've already noticed objdump is using the first one..

I've been confused by this buglet before.  SGI's tools set some flag in
the ELF header indicating the ABI flavour the code was compiled for.  If
we'd have the same thing objdump could select the register names for the
disassembler based on those flags.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>