SUMMARY: inst emulated message from gcc 2.8.1

From: Bryan Dunlap <bcd_at_pacific.mps.ohio-state.edu>
Date: Fri, 28 May 1999 09:51:10 -0400 (EDT)

My original question:

   I built gcc 2.8.1 on an Alpha PW 500au (under 4.0E). On the non-EV6
   hosts, images compiled with this copy print a message of the form

    inst emulated pid=16728 <ssh1> va=0x11ffffbf4 pc=0x120009c2c inst=0x28300000

   when run. I really don't want to maintain separate copies of gcc for
   my Alphas. Does anyone know of a way to get rid of this message?

As usual, the list comes through with lightning quickness. Thanks to:

 Thomas Leitner <tom_at_radar.tu-graz.ac.at>
 "John J. Francini" <francini_at_progress.com>
 Debra Alpert <alpert_at_fas.harvard.edu>
 "Vipin Gokhale, Compaq SBU, Oracle Corporation" <VGOKHALE_at_us.oracle.com>
 Oisin McGuinness <oisin_at_sbcm.com>

...who all had helpful info.

The error is from the system, not from the compiler. This misled me,
and so I was looking in the wrong place for help. Sort of.
Regrettably, the gcc documentation regarding Alpha EV[45] optimization
is thin (I'm being charitable, I still haven't actually found any).

Not surprisingly, it is due to instructions that are only available on
later versions of the CPU being emulated when the code is run on an
older CPU. It comes up because gcc was built on a new CPU and
therefore optimized itself for it.

`man iec' will explain how to use the instruction emulation control
program, where you can turn the messages off either for the system or
for a process. You must be root of course to do it system-wide. In a
nutshell

   iec s noprint

for system-wide suppression of the message or

   iec p noprint

for a process (and its children).

Another option is to compile for the least common denominator
instruction set, e.g.

   gcc -mcpu=ev4

Debra Alpert had another way of doing this:

   You can give gcc a directive
   on the EV5.6 machine to tell it to compile using only the ev4 instruction
   set, thus allowing the same binary to run without inst emulations across
   both platforms. You must edit the global specs file on the EV5.6 machine.
   If gcc is installed under /usr/local/gcc-2.8.1, for instance, the file is:

   /usr/local/gcc-2.8.1/lib/gcc-lib/alphaev56-dec-osf4.0d/2.8.1/specs.

   Simply add the following lines to this file:

   *cc1:
   -mcpu=ev4

   If you now recompile the troublesome binaries with the new specs file and
   run them on a different processor, they should no longer incur inst
   emulation errors and the associated runtime overhead. Of course, on the
   EV5.6 machine, you are not compiling in an optimal way. If very fast code
   is required, one can override the specs directive by issuing `-mcpu=ev56'
   on the gcc command line.

Oisin McGuinness explained how to build gcc so it would default to the
older instruction set:

   My final solution was to build gcc on the ev5.6 because
   its faster, but configured for all machines using

   alpha-dec-osf4.0d

   instead of the auto discovered

   alphaev56-dec-osf4.0d

   If I recall correctly, you run
   ./configure --host=alpha-dec-osf4.0d

Of all of these, I can confirm that the `iec s noprint' option
certainly works, and I am evaluating the others to decide the best
solution for our work.

Bryan Dunlap, OSU Physics Dept. | Giving money and power to government
bcd_at_mps.ohio-state.edu 614/292-3402 | is like giving whiskey and car keys
174 W. 18th Ave. Columbus OH 43210 | to teenage boys. -- P.J. O'Rourke
Received on Fri May 28 1999 - 13:53:27 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:39 NZDT