NOTES
NOTES.config
README
-README-quirks
README-vms
-README.coff
-README.rich
acconfig.h
aclocal.m4
app.c
* mac-as.r: Fix copyright and version strings.
(cfrg): Use PROG_NAME instead of literal name.
-
Mon Dec 11 14:14:08 1995 Ian Lance Taylor <ian@cygnus.com>
* read.c (read_a_source_file): If tc_unrecognized_line is defined,
Sorry, no description of the interfaces is written up yet. Look at existing
back ends and work from there.
-New hosts: If your host system has a strange header file setup, create a
-config/ho-foo.h file for it and include the appropriate header files or
-definitions there. If your host has a broken compiler, or some broken macros
-in header files, create a host-specific file and repair the damage there.
-(See, for example, ho-rs6000.h. The "assert" macro on that system doesn't work
-right, and a flag is set to rewrite an expression in tc-m68k.c that the native
-compiler mis-compiles.)
-
-New target formats: Look at the BFD_ASSEMBLER code. The a.out code might be a
-fair example. There are no "good" examples yet, unfortunately, nor any good
-documentation of the changes.
+New hosts: The configure script, which is generated by autoconf,
+should handle all host specific configuration.
+
+New target formats: Look at the BFD_ASSEMBLER code. The a.out or ELF
+code might be a fair example. There are no "good" examples yet,
+unfortunately, nor any good documentation of the changes.
New target processors: Check first to see if the BFD_ASSEMBLER interface is
supported by the file format code you need to use.
-New environments: ???
-
DOCUMENTATION:
The internals of gas need documenting.
various processors or formats. As the various targets get converted over,
these will gradually go away.
-As of the moment I'm editing this file, only the "sun4" and "decstation-bsd"
-targets can really use the BFD code. Other back ends still need merging or
-touching up.
-
TO DO:
Remove DONTDEF code, commented-out code.
since these two instructions can dual-issue. Since .align is ued a lot by
gcc, it is an important optimization.
-Torbjorn Granlund <tege@cygnus.com> writes, regarding i386/i486/pentium:
-
- In a new publication from Intel, "Optimization for Intel's 32 bit
- Processors", they recommended code alignment on a 16 byte boundary if that
- requires less than 8 bytes of fill instructions. The Pentium is not
- affected by such alignment, the 386 wants alignment on a 4 byte boundary.
- It is the 486 that is most helped by large alignment.
-
- Recommended nop instructions:
- 1 byte: 90 xchg %eax,%eax
- 2 bytes: 8b c0 movl %eax,%eax
- 3 bytes: 8d 76 00 leal 0(%esi),%esi
- 4 bytes: 8d 74 26 00 leal 0(%esi),%esi
- 5 bytes: 8b c0 8d 76 00 movl %eax,%eax; leal 0(%esi),%esi
- 6 bytes: 8d b6 00 00 00 00 leal 0(%esi),%esi
- 7 bytes: 8d b4 26 00 00 00 00 leal 0(%esi),%esi
-
- Note that `leal 0(%esi),%esi' has a few different encodings...
-
- There are faster instructions for certain lengths, that are not true nops.
- If you can determine that a register and the condition code is dead (by
- scanning forwards for a register that is written before it is read, and
- similar for cc) you can use a `incl reg' for a 3 times faster 1 cycle nop...
-
(From old "NOTES" file to-do list, not really reviewed:)
fix relocation types for i860, perhaps by adding a ref pointer to fixS?
Theory:
-The goal of the new configuration scheme is to bury all object format,
-target processor, and host machine dependancies in object, target, and
-host specific files. That is, to move all #ifdef's out of the gas
-common code.
+The goal of the new configuration scheme is to bury all object format
+and target processor dependancies in object and target specific files.
+That is, to move all #ifdef's out of the gas common code.
Here's how it works. There is a .h and a .c file for each object file
-format, a .h and a .c file for each target processor, and a .h for
-each host. config.gas creates {sym}links in the current directory to
-the appropriate files in the config directory. config.gas also serves
-as a list of triplets {host, target, object-format} that have been
-tested at one time or another. I also recommend that config.gas be
-used to document triplet specific notes as to purpose of the triplet,
-etc.
+format and a .h and a .c file for each target processor. The
+configure script creates symlinks in the current directory to the
+appropriate files in the config directory. configure also serves as a
+list of triplets {host, target, object-format} that have been tested
+at one time or another. I also recommend that configure be used to
+document triplet specific notes as to purpose of the triplet, etc.
Implementation:
-host.h is a {sym}link to .../config/xm-yourhost.h. It is intended to
-be used to hide host compiler, system header file, and system library
-differences between host machines. If your host needs actual c source
-files, then either: these are generally useful functions, in which
-case you should probably build a local library outside of the gas
-source tree, or someone, perhaps me, is confused about what is needed
-by different hosts.
-
obj-format.h is a {sym}link to .../config/obj-something.h. It is intended
All gas .c files include as.h.
+++ /dev/null
-* rcsid's should be conspicuously absent until someone explains to me
- how to use them constructively without affecting diffs from remote
- sites. If you can, then I will become an active supporter of
- rcsid's.
-
-* "diff -u" patches preferred. "diff -c" patches accepted. All other
- patches will be returned.
+++ /dev/null
-The coff patches intend to do the following :
-
- . Generate coff files very compatible with vanilla linker.
- . Understands coff debug directives.
-
-Here are the guidelines of the work I have done :
-
- . Encapsulate format dependent code in macros where it is possible.
- . Where not possible differenciate with #ifdef
- . try not to change the calling conventions of the existing functions.
- I made one exception : symbol_new. I would be pleased to hear about
- a better solution. (symbols.c)
- . Extend the use of N_TYPE_seg seg_N_TYPE tables so that segments can
- be manipulated without using their format dependent name. (subsegs.c)
- . Write a function to parse the .def debug directives
- . Write two small peaces of code to handle the .ln directive.
- . In write.c try to move all the cross compilation specifics (md_..) to
- format dependent files.
- . Encapsulate the data structures using generic types, macros calls.
- . Added too much code to resolve the complexity of the symbol table
- generated. Most of the code deals with debug stuff.
- . Create another makefile, shorter, cleaner.
- . Create a config.gas shell script to mimic the gcc,gdb... configuration
- mechanism. This reduce the complexity of the makefile.
- . Isolate the format dependent code in two files
- coff.c coff.h
- aout.c aout.h
- elf.c elf.h [ Not yet ;-]
- . added a little stack management routine for coff in file stack.c
- . isolate os specific flags in m- files
-
-If further development is planed on it is should solve the following problems :
-
- . Encapsulate DESC & OTHER tests in a macro call. I'm not aware
- of their exact semantics.
- . Clean up the seg_N_TYPE N_TYPE_seg naming scheme
- . Try to remove as much reference to segment dependent names as possible
- . Find a cleaner solution for symbol_new.
- . Report the modifications on vax, ns32k, sparc machine dependent files.
- To acheive this goal, search for \<N_, sy_, symbol_new and symbolS.
- . Allow an arbitrary number of segments (spare sections .ctor .dtor .bletch)
- . Find a way to extend the debug information without breaking sdb
- compatibility. Mainly intended for G++.
- . should it do something to generate shared libraries objects ?
-
-I have tested this code on the following processor/os. gcc-1.37.1 was
- used for all the tests.
-
-386 SCO unix ODT
- gcc-1.37.1, gas, emacs-18.55
-
-386 Esix rev C
- gas-1.37/write.s
-
-386 Ix 2.02
- gas, all the X11R4 mit clients
-
-386 CTIX 3.2
- xsol (X11R4 solitary game), gas
-
-68030 unisoft 1.3
- the kernel (V.3.2) + tcp/ip extensions
- bash-1.05, bison-1.11, compress-4.0, cproto, shar-3.49, diff-1.14,
- dist-18.55, flex-2.3, gas-1.37, gcc-1.37.1, gdb-3.6, grep-1.5,
- kermit, make-3.58, makedep, patch, printf, makeinfo, g++-1.37.1,
- tar-1.08, texi2roff, uuencode, uutraf-1.2, libg++-1.37.2, groff-0.5
-
-68020 sunos 3.5 (no, not coff, just to be sure that I didn't
- introduce errors)
- gcc-1.37.1, gas, emacs-18.55, gdb-3.6, bison-1.11, diff-1.14,
- make-3.58, tar-1.08
-
-68030 sunos 4.0.3 (idem)
- gas
-
-I would be glad to hear about new experiences
-
- Loic (loic@adesign.uucp or loic@afp.uucp)
-
+++ /dev/null
-
-
- The Code Pedigree of This Directory
-
-
-This directory contains a big merge of several development lines of
-gas as well as a few bug fixes and some configuration that I've added
-in order to retain my own sanity.
-
-A little history.
-
-The only common baseline of all versions was gas-1.31.
-
-From 1.31, Intel branched off and added:
-
- support for the Intel 80960 (i960) processor.
- support for b.out object files.
- some bug fixes.
- sloppy mac MPW support
- Intel gnu/960 makefiles and version numbering.
-
-Many of the bug fixes found their way into the main development line
-prior to 1.36. ALL intel changes were ifdef'd I80960. This was good
-as it isolated the changes, but bad in that it connected the b.out
-support to the i960 support, and bad in that the bug fixes were only
-active in the i960+b.out executables of gas, (although most of these
-were nicely marked with comments indicating that they were probably
-general bug fixes.)
-
-To pick up the main FSF development line again, along the way to 1.36,
-several new processors were added, many bugs fixed, and the world was
-a somewhat better place in general.
-
-From gas-1.36, Loic at Axis Design (france!) encapsulated object
-format specific actions, added coff versions of those encapsulations,
-and a config.gas style configuration and Makefile. This was a big
-change and a lot of work.
-
-Then along came the FIRST FSF release of gas-1.37. I say this because
-there have been at least two releases of gas-1.37. Only two of them
-do we care about for this story, so let's call them gas-1.37.1 and
-gas-1.37.2.
-
-Here starts the confusion. Firstly, gas-1.37.1 did not compile.
-
-In the meantime, John Gilmore at Cygnus Support had been hacking
-gas-1.37.1. He got it to compile. He added support for the AMD 29000
-processor. AND he started encapsulating some of the a.out specific
-pieces of code mostly into functions. AND he rebuilt the relocation
-info to be generic. AND he restructured somewhat so that for a single
-host, cross assemblers could be built for all targets in the same
-directory. Useful work but a considerable nuisance because the a29k
-changes were not partitioned from the encapsulation changes, the
-encapsulation changes were incomplete, and the encapsulation required
-functions where alternate structuring might have used macros. Let's
-call this version gas-1.37.1+a29k.
-
-By the time gas-1.37.2 was "released", (remember that it TOO was
-labelled by FSF as gas-1.37), it compiled, but it also added i860
-support and ansi style const declarations.
-
-At this point, Loic rolled his changes into gas-1.37.2.
-
-What I've done.
-
-I collected all the stray versions of gas that sounded relevant to my
-goals of cross assembly and alternate object file formats and the FSF
-releases from which the stray versions had branched.
-
-I rolled the Intel i960 changes from 1.31 into versions that I call
-1.34+i960, 1.36+i960, and then 1.37.1+i960.
-
-Then I merged 1.37.1+i960 with 1.37.1+a29k to produce what I call
-1.37.1+i960+a29k or 1.37.3.
-
-From 1.37.3, I pulled in Loic's stuff. This wasn't easy as Loic's
-stuff hit all the same points as John's encapsulations. Loic's goal
-was to split the a.out from coff dependancies for native assembly on
-coff, while John's was to split for multiple cross assembly from a
-single host.
-
-Loic's config arranged files much like emacs into m-*, etc. I've
-rearranged these somewhat.
-
-Theory:
-
-The goal of the new configuration scheme is to bury all object format,
-target processor, and host machine dependancies in object, target, and
-host specific files. That is, to move all #ifdef's out of the gas
-common code.
-
-Here's how it works. There is a .h and a .c file for each object file
-format, a .h and a .c file for each target processor, and a .h for
-each host. config.gas creates {sym}links in the current directory to
-the appropriate files in the config directory. config.gas also serves
-as a list of triplets {host, target, object-format} that have been
-tested at one time or another. I also recommend that config.gas be
-used to document triplet specific notes as to purpose of the triplet,
-etc.
-
-Implementation:
-
-host.h is a {sym}link to .../config/xm-yourhost.h. It is intended to
-be used to hide host compiler, system header file, and system library
-differences between host machines. If your host needs actual c source
-files, then either: these are generally useful functions, in which
-case you should probably build a local library outside of the gas
-source tree, or someone, perhaps me, is confused about what is needed
-by different hosts.
-
-obj-format.h is a {sym}link to .../config/obj-something.h. It is intended
-
-All gas .c files include as.h.
-
-as.h #define's "gas", includes host.h, defines a number of gas
-specific structures and types, and then includes tp.h, obj.h, and
-target-environment.h.
-
-target-environment.h defines a target environment specific
-preprocessor flag, eg, TE_SUN, and then includes obj-format.h.
-
-obj-format.h defines an object format specific preprocessor flag, eg,
-OBJ_AOUT, OBJ_BOUT, OBJ_COFF, includes "target-processor.h", and then
-defines the object specific macros, functions, types, and structures.
-
-target-processor.h
-
-target-processor.
-
-Porting:
-
-There appear to be four major types of ports; new hosts, new target
-processors, new object file formats, and new target environments.
-
-
------
-
-reloc now stored internally as generic. (symbols too?) (segment types
-vs. names?)
-
-I don't mean to overlook anyone here. There have also been several
-other development lines here that I looked at and elected to bypass.
-Specifically, xxx's stabs in coff stuff was particularly tempting.