Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Nov 2002 14:43:44 +1100
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        alpha@FreeBSD.ORG
Subject:   Re: ev4/5/6 issue ?
Message-ID:  <20021127034344.GB77914@gsmx07.alcatel.com.au>
In-Reply-To: <54463.1037022613@critter.freebsd.dk>
References:  <15823.46162.102126.470628@grasshopper.cs.duke.edu> <54463.1037022613@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

[Somewhat old but I don't think these points were ever answered]

On 2002-Nov-11 14:50:13 +0100, Poul-Henning Kamp <phk@critter.freebsd.dk> wrote:
>If this is an ev45/ev6 issue I guess my very naïve end-user questions
>are:
>
>	1. Why doesn't file(1) tell me if a binary is ev45 or ev6 ?

For much the same reason it doesn't tell you that the binary is a K-7
rather than 80386.  These are just code generation options on the
compiler.  This isn't as noticable on x86 because gcc doesn't tend
to use instructions that don't exist on the 386 (apart from FP).

I guess that in theory the compiler/assembler could output an ELF
option giving a bitmap of which instruction groups it emitted, from
which the linker could generate a merged bitmap showing which
instruction groups are needed by the executable (modulo dynamic linker
issues).  This sounds like a fair amount of work and it's not clear
that there's much benefit.


>	2. Couldn't the elf activator not find out and say "Sorry,
>	   cannot execute ev6 on this machine" ?

If there was some easy way for the ELF activator to know that
executable file contained EV6-specific instructions and the current
CPU didn't support them, then this could possibly be useful.

Given that we have emulation support for some instructions, what
should the ELF activator do if an executable requires an instruction
that doesn't exist in the CPU hardware, but is emulated?  If that
instruction is only executed once or twice, the user wouldn't even
notice it was emulated.  OTOH, if it formed the core of one of the
innermost loops, the difference is probably quite important.

Peter


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021127034344.GB77914>