970917 on mips-sgi-irix6.2, haifa disabled: many problems

Mike Stump mrs@wrs.com
Fri Sep 26 09:48:00 GMT 1997


> Date: Fri, 26 Sep 1997 17:23:16 +0200 (MET DST)
> From: Kamil Iskra <kamil@dwd.interkom.pl>

> please explain what this "bytecode" stuff is all about? Sure, I know
> what a Java bytecode is, but this thing seems to be older than Java,
> so it's probably something completely different...

bytecode is a generic term for a technology that can be used to
describe many translation systems.  For example, the munched elisp
files (.elc) from emacs, can be called bytecode files (and is).  The
output from a Pascal P system compiler, can be so referred.  As can
some (most?) Java translators...  some C interpreters, the gcc
compiler (when generating bytecodes).  I suspect the perl and Tcl also
may have such systems, but not having reviewed the specifics of those,
I cannot say.

The qualities are generally, a binary instruction set that doesn't
exactly match the source language, but rather a simplification of it,
that is not a native binary format for the machine in question, whose
smallest element tends to be a byte (8 bits).  There is an interpreter
for byte codes that can execute the codes and give the desired
semantics of the program.  The advantages are generally smaller
binaries, portable binaries and the abstraction of all machines into a
single `virtual machine'.

Some people may put the further restriction that the byte code cannot
match any hardware implementation, as then all you have is a CPU
simulator; others may claim that all CPU simulators are byte code
interpreters.

bytecode as a technology despite that you may think Sun invented it
with Java is actually old, quite old.

You can read all the opcodes to get a sense of the machine that gcc
uses, by checking out bc-opcode.h from a gcc build directory.  If you
know rtl, it should be fairly unsurprising.



More information about the Gcc mailing list