home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-18 | 86.8 KB | 1,652 lines |
- Known bugs:
- - Can't optimize because of compiler bug #50416 prevents line 235 in symbols.c
- from working (currently has #pragma CC_OPT_OFF and #pragma CC_OPT_RESUME
- around that routine).
- - The m88k instruction "tb0 0,r0,undef" trashes the instruction because of
- the undefined.
- - 68k does not handle packed immediates (the tables have been changed to dis-
- allow this) because there is no routine to convert a flonum to a 68k packed
- form.
- - The logical operators && and || are not implemented.
-
- To do:
- - Mark the instructions that are 601 specific (book IV) and registers with
- /* 601 only */ comments on them and flag as an error unless
- -force_cpusubtype_ALL is specified.
-
- Bugs to be fixed:
- - The m68k "jmp @(_foo)" is not legal and needs to be flaged.
-
- Changes for the 4.1 release (the cctools-202 release):
- - Fixed a bug in the assembler's handling of signals so that only one signal
- needs to be generated to cause it to exit non-zero. The change is in as.c
- in got_sig() (bug #67606).
- - Fixed a bug in the assembler such that when it gets an error in the second
- pass it does not create the output file. The change is in write_object.c
- in write_object() (bug #67607).
-
- Changes for the 4.0 release (the cctools-182 release):
- - Ifdef'ed !defined(__TEFLON__) out a free() call to the internal stdio buffer
- as has changed in 4.4BSD. This change was in input-file.c in
- input_file_give_next_buffer().
- - Ifdef'ed !defined(__TEFLON__) out a typedef of uint in i386.h:
- #ifndef __TEFLON__
- typedef unsigned int uint;
- #endif
- as this is defined in <sys/types.h>.
-
- Changes for the 4.0 release (the cctools-178 release):
- - Changed the work around for compiler optimizer bug #50416. The change is
- to symbols.c in the routine colon(). The expression the compiler was having
- trouble with was:
- ((symbolP->sy_desc) & (~REFERENCE_TYPE)) == 0
- so symbolP->sy_desc was assigned to a volatile unsigned int temporary and
- the expression was re-written to:
- (temp & (~REFERENCE_TYPE)) == 0
- which seems to work. The reason for no longer using the #pragma CC_OPT_OFF
- as a work around is that the sparc compiler for -dynamic does not work for
- non-optimized code (bug #58804).
-
- Changes for the 4.0 release (the cctools-173 release):
- - Picked up a fis to the sparc assembler that was ifdef'ed sparc instead of
- SPARC in layout.c .
- - Picked up a fix to the i386 assembler which allows lables to have double
- quotes around them as in: call "foo". This was a one expression change to
- an if statement in i386_operand() in i386.c when looking for a memory
- reference.
-
- Changes for the 4.0 release (the cctools-172 release):
- - Picked up the sparc changes to symbols.c that ifdef's the #pragma CC_OPT_OFF
- so that it is not turned off for sparc and the sparc compiler fails.
-
- Changes for the 4.0 release (the cctools-170 release):
- - Picked up the sparc changes to layout.c for dealing with sparc relocation
- entries which have (symbol1 - symbol2 + constant) that must be treated as
- absolute (too small for sectdiff).
-
- Changes for the 4.0 release (the cctools-168 release):
- - Picked up the sparc changes to sparc.c for the changes to internal relocation
- entries used by only the assembler.
- - Picked up the sparc changes to the sizes of the symbol_stub section (32) and
- the picsymbol_stub section (60) in read.c .
- - Fixed a bug in the .zerofill directive that did not propagate the align
- expresion into the section header.
-
- Changes for the 4.0 PR1 release (the cctools-166.1 and cctools-167 releases):
- - Changed it so that if -static is seen twice no complaint is printed (bug
- #53307).
-
- Changes for the 4.0 release (the cctools-166 release):
- - Added the .const_data directive for the (__DATA,__const) section (bug #53067).
- - For the m68k assembler removed the -l flag which made a2@(undef) 32 bit
- offsets rather than 16 bit offsets. Now they are always 32 bit offsets.
- This had one change in m68_ip() in m68k.c in the AOFF case when the
- expression was not a constant. This condition was removed. It was also
- incorrect. It was:
- if(!flagseen['l'] && flagseen['k'] && seg(opP->con1) != SEG_DIFFSECT)
- and should have been:
- if(!flagseen['l'] && (flagseen['k'] || seg(opP->con1) != SEG_DIFFSECT))
- Also in md_parse_option() the 'l' case was removed for completeness.
- This case caused bug #53010 when -dynamic was changed to the default.
- - Changed the directive .mod_init_func to be in the __DATA section as it may
- will have relocation entries and may be written on by dyld.
-
- Changes for the 4.0 release (the cctools-163 release):
- - Changed the default to -dynamic. This is done in as.c by setting
- flagseen[(int)'k'] = TRUE;
- which is TRUE for -dynamic and FALSE for -static.
-
- Changes for the 4.0 release (the cctools-162 release):
- - For the fix below in cctools-159 missed clearing the lazy bound bit in
- indirect_symbol_new() when the section was S_NON_LAZY_SYMBOL_POINTERS. So
- This was added to symbols.c .
-
- Changes for the 4.0 release (the cctools-160 release):
- - Put back in the -O flag and for bug #50416 which prevents line 235 in
- symbols.c from working added has #pragma CC_OPT_OFF and #pragma CC_OPT_RESUME
- around that routine.
-
- Changes for the 4.0 release (the cctools-159 release):
- - Fixed a problem the fix below and jbsr's on hppa which caused them to all
- be non-lazy.
-
- Changes for the 4.0 release (the cctools-158 release):
- - Fixed a bug that caused a symbol that was used both lazy and non-lazy to be
- incorrectly marked as lazy. This happened in gmon.c for _moninitrld which
- caused the dynamic libsys not to work with profiling as it would crash as
- the call to moninitrld would jump to the common symbol moninitrld.
-
- Changes for the 4.0 release (the cctools-154 release):
- - Changed it so that if -dyanmic is seen twice no complaint is printed.
- - Removed the use of nmedit now that libstuff has __private_extern__'s.
-
- Changes for the 4.0 release (the cctools-150 release):
- - Changed to allow .private_extern without -dynamic.
-
- Changes for the 4.0 release (the cctools-149 release):
- - Added setting of the S_ATTR_SOME_INSTRUCTIONS section attribute in the
- md_assemble() routines (except the i860) to mark those sections that contain
- some instructions.
- - Removed the section attribute relocate at launch (S_ATTR_RELOC_AT_LAUNCH).
-
- Changes for the 4.0 release (the cctools-138 release):
- - Picked up sparc.c & sparc-opcode.h.
-
- Changes for the 4.0 release (the cctools-137 release):
- - Picked up sparc.c.
-
- Changes for the 4.0 release (the cctools-136 release):
- - Change for sparc.c which cause relocation entries for call instructions to
- localy defined symbols to be emitted.
-
- Changes for the 4.0 release (the cctools-135 release):
- - Fix for Tracker 41317 [as(hppa) : does not support cache control hints.]
- as/hppa.c and as/hppa-opcode.h changed to add new parsing rule characters
- for cache control hints. The general format of the insruction supporting
- cache control hints is :
- <opcode>, cmpltr,cc <operands>
- Here cmpltr can be <none>, in which case the formats supported are :
- <opcode>,,cc <operands> or
- <opcode>,cc <operands>
- The parser will take care of both.
-
- Changes for the 4.0 release (the cctools-134 release):
- - Picked up the sparc changes to the sparc.c.
-
- Changes for the 4.0 release (the cctools-133 release):
- - Picked up the sparc changes to the sparc.c and sparc-check.c.
-
- Changes for the 4.0 release (the cctools-132 release):
- - Picked up the sparc changes to the sparc.c.
- - Picked up the sparc changes to the write_object.c for putting out the
- relocation entries.
- - Picked up the sparc changes to the comments in fixup_section() in layout.c.
- - Picked up the sparc s_seg() routine in read.c.
- - Picked up the sparc-check stuff in the Makefile and sparc-check.c.
- - Made the assembler ProjectBuilder aware and send its error and warning
- messages to ProjectBuilder (bug #40745).
- - Added -dynamic to eventually replace -NEXTSTEP-deployment-target 3.3 and
- -static to eventually replace -NEXTSTEP-deployment-target 3.2. Changed all
- the incompatiblity error messages to use -dynamic.
-
- Changes for the 3.3 release (the cctools-131 release):
- - Fixed a bug in md_estimate_size_before_relax() in i386.c that caused all
- branches to be long. The problem was with the change ti a full Mach-O
- assembler the test for symbols in the section changed and the code was not
- changed (bug #43745).
-
- Changes for the 3.3 release (the cctools-128 release):
- - Picked up the bug fix for 42587 made in cctools-119.1 for the 3.2hp release.
- "Hangs if tried to enter a register number in hex format". The test case
- is the instruction "ldcwx 0xc(0,%r1),%r2".
-
- Changes for the 3.3 release (the cctools-127 release):
- - Changed the hppa picsymbol_stub size to 32 bytes.
- - Changed the order of the output of the assembler's symbolic info to this:
- relocation entries (by section)
- indirect symbol table
- symbol table
- string table
- - Moved the sparc assember to /usr/local/bin for now (bug #42033).
-
- Changes for the 3.3 release (the cctools-122 release):
- - Had to give up on checking indirect symbol because the m68k pic symbol stubs
- generate machine dependent frags that get relaxed later. The code in symbol.c
- in indirect_symbol_new() was ifdef'ed CHECK_INDIRECTS which is off.
- - Fixed another bug in the m68k assembler when trying to parse '#L0-"x:y:z"'
- in crack_operand() in m68k.c. It needed to know about "'ed symbol names to
- correctly step over them.
- - Fixed a bug that showed up in the m68k assembler when trying to assemble the
- expression in the instruction: 'addl #L0-"L1",a1' . This is a problem in the
- way get_symbol_end() works and is used. get_symbol_end() writes a '\0' on the
- symbol's trailing " which does not get replaced with a " later. So I fixed
- This on in operand() when it calls get_symbol_end() and it knows the name
- started with a ". Later when it is replacing the character returned from
- get_symbol_end() back into input_line_pointer it also replaces the " if the
- name started with a ". This a may have to be done in other places some day.
- - Fixed a bug in indirect_symbol_new() where we first see if the last frag
- recorded for an indirect symbol turned out to be zero sized then changed that
- recorded frag to the next non-zero frag in the list. I think this happens
- because we record the frag before we fill it and if we run out of space that
- frag gets a zero size and a new one is created.
- - Added the flag -NEXTSTEP-deployment-target which takes either 3.2 or 3.3 as
- arguments. With 3.3 it turns on the -k flag. Also the warnings about
- incompatible features that printed -k were changed.
-
- Changes for the 3.3 release (the cctools-120 release):
- - Fixed a bug in that caused the symbol table to be trashed when -L was used and
- the input file had a global symbol that started with 'L'. The fix was in
- layout_symbols() in write_object.c that corrected the assumption that all 'L'
- symbols were non-external.
- - Fixed a bug in the i386 assembler that did not allow symbols like "[Foo bar:]"
- to be parsed as operands. This fix was made in i386.c, first was to add "
- to operand_special_chars[] array, second was to add some code in md_assemble()
- in the loop that parses operands to scan for the ending " if an operand has
- one.
- - Set the sizes for the i386 .symbol_stub and .picsymbol_stub to 24 and 26.
-
- Changes for the 3.3 release (the cctools-119 release):
- - Picked up first round of changes for the sparc target. This work is
- incomplete.
-
- Changes for the 3.3 release (the cctools-116 release):
- - Fixed a bug when -n is used on a file containing just a .zerofill directive
- the assembler core dumped indirecting through frag_now in layout_addresses()
- in layout.c. A check for frag_now being NULL was added.
-
- Changes for the 3.3 release (the cctools-115 release):
- - Changed the way the m68k assembler handles the operand "pc@(symbol-.)" to
- make the value of "." the value of the instruction after the opcode. This
- is needed so that when this operand is used in a symbol stub to reference the
- lazy pointer an any offset in the expression "symbol1-symbol2+offset" will
- correctly apply to symbol1 and the check in the link editor can figure out
- which lazy pointer is being referenced by the relocation entry.
- - Fixed a bug in indirect_symbol_new() when a section changed occured between
- .indirect_symbol directives it thought it was a bad or missing indirect
- symbol. This was because there were zero length frags created on the section
- change. Code was added to find the last real frag by skiping the zero length
- frags at the end.
-
- Changes for the 3.3 release (the cctools-112 also 111.1 release):
- - Picked up a fix for the hppa assembler that caused (bug #39710):
- comib,<> 0,%r19,LBE2
- nop
- nop
- nop
- nop
- LBE2:
- nop
- Not to assemble correctly as it didn't do the relocation. The fix was in
- hppa.c where the following constant was stuff in char field which it does not
- fit:
- 32c32
- < #define HPPA_RELOC_12BRANCH (127) /* only used internal in here */
- ---
- > #define HPPA_RELOC_12BRANCH (1000) /* only used internal in here */
- - Fix a bug in the hppa assembler (bug 40043) that did not assemble
- "ble R`0xc0000004(%sr4,%r1)" correctly. The code noticed that the expression
- was absolute but failed to remember the instruction takes a word (not a byte)
- displacement. In hppa.c:
- 804c804
- < dis_assemble_17(im14>>2,&w1,&w2,&w);
- ---
- > dis_assemble_17(im14,&w1,&w2,&w);
-
- Changes for the 3.3 release (the cctools-111 release):
- - Fixed a bug in parsing octal characters \ooo out of strings that would not
- stop after picking up at most 3 characters and not stop if the digit was not
- an octal digit. The fix was in next_char_of_string() in read.c (bug #39363).
- - Fixed a bug in the i386 assember that the instruction "call 0" caused the
- assembler to core dump. The fix was to md_assemble() in i386.c at line 1352
- where an SEG_ABSOLUTE has a NULL i.disps[0]->X_add_symbol which was not tested
- for. This was in the code that caused relocation entries for calls to be
- generated for scattered loading.
- - Fixed a bug when an unlink() was needed before the creation of the output
- file so that clones are handled correctly. The fix was in write_object()
- at the end just before the call to open().
- - Fixed a bug in the native hppa assembler that put an extra 4 bytes of zero in
- the text section. The problem was caused by frags being aligned to the
- default which turns out to be 8 on the hppa in the obstack code. The fix was
- to change the obstack_begin() call in section_new() in sections.c to use
- _obstack_begin() and specifiy a 4 byte alignment.
-
- Changes for the 3.3 release (the cctools-108 release):
- - Fixed a bug for the i386 which caused scattered loading not to work because
- it did not create a relocation entry for local calls to symbols that were in
- the output file. The change is at line 1352 in i386.c in md_assemble().
-
- Changes for the 3.3 release (the cctools-104 release):
- - Changed the code from using COMPAT_NeXT3_2 ifdef's to using flagseen['k'] and
- requiring -k when the new incompatable features are being used.
- - Fixed a bug in the JBSR relocation type for non-external relocation types
- where the other_part (stored in the r_address of the pair) which is an offset
- from the start of the section address had the base address of the section in
- it (the fix was to subtract sect_addr in this case in at the end of
- fix_to_relocation_entries() in write_object.c in the JBSR case).
- - Fixed a 3.2 compatiblity problem introduced with putting the symbol table
- before the relocation entries which caused strip not to work since the
- symbol table and string table were not at the end of the file. A set of
- #ifdef COMPAT_NeXT3_2 were added to write_object.c when assigning the
- offset to the symbol table.
- - Added the use of the reserved1 field in the section header for indirect
- sections to be the index into the indirect symbol table for that section.
- One line change in layout_indirect_symbols() in write_object.c.
-
- Changes for the 3.3 release (the cctools-103 release):
- - Fixed a bug in s_lcomm() in read.c that did not propagate the alignment to
- the section header leaving the bss section with an alignment of 0 and failing
- to align the starting address of the section.
-
- Changes for the 3.3 release (the cctools-102 release):
- - Integrated in the hppa support.
- * Added the SECTDIFF support for the hppa with the HI21 and LO14 SECTDIFF
- relocation types.
- * Fixed the use of calc_hppa_HILO() in md_number_to_imm() in hppa.c to
- correctly pass the symbol value and offset value as the two first
- parameters.
- different as/Mach-O.c (integrated for cctools-102, logicly into write_object.c)
- Using cctoolshppa-37 with diffs minimized for format changes. New stuff
- for hppa relocation entries.
- different as/Makefile (integrated for cctools-102)
- Using cctoolshppa-37 with diffs minimized for format changes. New stuff
- for hppa assembler and new hppa files.
- Changes for cctools-102
- Added -DNEW_FORMAT to ahppa_test target's COPTS. Removed ASFLAGS=-W from
- ahppa_test target.
- different as/app.c (started integrating for cctools-102)
- Using cctoolshppa-37. Has a bunch of code to deal with field selectors
- (of the form L'expression) the code has comments about a BUG to be fixed.
- Changes for cctools-102
- Picked up 4 additional "#if ... defined(HPPA)" so '@' can be used as a
- statement separator and // used as a comment.
- Not picked up: the field selectors stuff. In talking to Umesh he said this
- was no longer needed as they changed from L' to L` for field selectors.
- different as/as.c (integrated for cctools-102)
- Using cctoolshppa-37. New stuff for hppa cputype, CPU_SUBTYPE_HPPA_ALL and
- -arch hppa.
- different as/read.c (no changes for cctools-102)
- Two real changes plucked from cctoolshppa-37:
- 1) Add the include hppa.h ifdef'ed HPPA
- 2) Also there is an issue with the completer ",=" not being treated as an
- assignment. The cctools-100 changes appear to also fix this.
- There still is a bug with spaces around "=" for assignments.
- The cctools-100 changes have fixed this.
- different as/write.c (integrated for cctools-102, this now in write_object.c)
- One real changes plucked from cctoolshppa-37:
- 1) Add the include hppa.h ifdef'ed HPPA
- Only in cctoolshppa-37/as: hppa-aux.c (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-aux.c from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa-aux.h (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-aux.h from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa-check.c (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-check.c from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa-ctrl-func.c (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-ctrl-func.c from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa-ctrl-func.h (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-ctrl-func.h from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa-opcode.h (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa-opcode.h from cctoolshppa-37.
- Only in cctoolshppa-37/as: hppa.c (picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa.c from cctoolshppa-37 and changed
- HPPA_RELOC_NORELOC to NO_RELOC in three places.
- Changes for cctools-102 to allow hppa.h to be removed:
- were to add these lines:
- #include <mach-o/hppa/reloc.h>
- #define HPPA_RELOC_12BRANCH (1000) /* only used internal in here */
- Only in cctoolshppa-37/as: hppa.h (NOT picked up for cctools-102)
- Pick up cctoolshppa-37/as/hppa.h from cctoolshppa-37 and change:
- Changed lines 33 and 34 from:
- #define NO_RELOC HPPA_RELOC_NORELOC
- #define HPPA_RELOC_12BRANCH (HPPA_RELOC_NORELOC + 1000)
- to:
- #define NO_RELOC 0x10 /* out side the range of r_type:4*/
- #define HPPA_RELOC_12BRANCH (NO_RELOC + 1000)
- So HPPA_RELOC_NORELOC could be removed from mach-o/hppa/reloc.h .
-
- Removed line 38 which was:
- extern int next_char_of_string();
- It is static in read.c and was changed for no apperent reason.
-
- Changes for the 3.3 release (the cctools-101 release):
- - Second major round of changes for the new shlib stuff.
- 1) Added the LC_DYSYMTAB load command to the object file format and
- organization of the symbol table and string table as well as the layout
- of the relocation entries.
- 2) Added the support for the indirect symbol sections and stub sections. This
- added 3 new types of sections, some new section directives, and indirect
- symbols and the creation of the indirect symbol table and marking of
- symbols as lazy bound undefined.
- - For the m68k fixed the code in m68k_ip() for the "Bg", "Bw", and "Bc" branches
- as many parts did not work. Now things like "bra foo:w" works. To make this
- work m68k_ip_op() was changed to not strip off the ":w" and not set the
- opP->isiz field but to use get_num() and use the e_siz field. This only
- effected the ABSL case.
- - Made a bit of an ugly fix for "jbsr foo:w" and "jra foo:w" which is trying to
- force the word from. So to make this always work when foo is an absolute
- number that fits in a word the instruction is changed from the "bsr" form to
- the "jsr" form (or from the "bra" to "jmp") which does not use a displacement
- and is not effected by the address of the instruction.
-
- Changes for the 3.3 release (the cctools-100 release):
- - First major round of changes for the new shlib stuff.
- 1) Major restructuring and clean up for support of a true Mach-O assembler
- which includes .section and .zerofill directives for arbitrary sections.
- 2) Support for possition-independent code through the SECTDIFF relocataion
- type (these changes are ifdef'ed COMPAT_NeXT_3_2 as the will produce
- object files that are incompatible with the 3.2 release).
- 3) Support for .private_extern directive (again ifdef'ed COMPAT_NeXT_3_2).
- - Fixed a bug in try_to_make_absolute() which when changing an expression to
- absolute did not set the add_symbol and subtract_symbol fields to NULL which
- caused the wrong fixup to be done that used the expression with a fixup
- (bug #37382).
-
- Changes for the 3.2 release (the cctools-25 release):
- - Added forms of shld and shrd with two operands that imply the cl register.
- - Added missing opcode table entries for the i386 instructions fcom and fcomp
- with no arguments in i386-opcode.h.
- - Fixed "0: jmp 0b" which did not work, 0 was the problem in the 0b (1-9 work).
- This was a problem in operand() in expr.c when 0b... expressions were added
- (bug #8331) and the fix was to look to see of the next character was the end
- of the line or not a hex digit.
-
- Changes for the 3.1 release (the cctools-20 release):
- - Fixed a bug for the m98k that did not correctly check for too few parameters.
- Two bugs here one in calcomp that was testing != NONE which should have been
- == NONE and a bug in md_assemble in advanceing past the '+' or '-' when it
- did not exist and there was nothing but a '\0' after the op it advanced past
- it.
-
- Changes for the 3.1 release (the cctools-16 release):
- - Fixed a bug with the m98k opcodes for stwcx. stdcx. where bit 0 was not set
- to a 1.
- - Changed the following instructions so that for the SH field the value 32 (or
- 64) assembles as 0: rldicl rldicl. rldicr rldicr. rldic rldic. rldimi
- rldimi. rlwinm rlwinm. rlwimi rlwimi.
- - Fixed a bug in the m98k assembler where the value of exprressions which was
- exactly (1 << width) was not treated as an error (4 places > was changed to
- >= in m98k.c).
-
- Changes for the 3.1 release (the cctools-15 release):
- - Moved the m88k and m98k to be install in /usr/local/lib not /lib.
- - Fixed a bug in the m98k assembler that did not detect instructions with too
- many parameters.
- - Added macros and register names for batX[ul] the same as ibatX[ul] since the
- 601 does not have split i and d for these.
- - Changed the m98k instruction's "icbi" first paramenter to G0REG from GREG.
- - Back out the below fix and added new code in try_to_make_absolute() that
- walked the frags between the the symbols L0 and L1 to calculate the absolute
- value.
- - Fixed a bug where the expression L1-L0 was not coming up right when it had a
- .align between L0 and L1. A hack was removed from try_to_make_absolute() in
- expr.c that had the code ifdef out that was trying to say the expresion could
- change due to relaxation. The the routine s_align() in read.c was ifdef
- RISC to do the alignment instead of creating an align frag.
-
- Changes for the 3.1 release (the cctools-14 release):
- - Added a form of fcmpu and fcmpo that takes a crX as it's first argument.
- - Added the opcodes for tlbiex (31,338) and tlbia (31,370).
- - Fixed a bug in the m68k assembler where the code to handle implementation
- specific instructions had || in two places where && was supposed to be.
- The change was on lines 2693 and 2706 in md_assemble() in m68k.c .
- - Changed the m98k instructions: lwarx, ldarx, stwcx. and stdcx. second arg from
- GREG to G0REG.
- - Fixed the Makefile to install the m98k assembler it built.
-
- Changes for the 3.1 release (the cctools-13 release):
- - Added the m98k (PowerPC) architecture.
-
- Changes for the 3.1 release (the cctools-10 release):
- - Changed the default .include directories to /NextDeveloper/Headers and
- /LocalDeveloper/Headers in as.c and made them work (the default never
- worked).
- - Corrected the following table entries for i386 floating point instructions
- which had a FloatD or'ed into them which was wrong: faddp, fmulp.
- - Fixed a bug that caused an error message that a segment override was specified
- more than once for string instructions for the i386. The fix was in i386.c
- where i.seg was need to be set to zero after the string instruction operands
- were parsed (bug #29867).
- - Fixed the assembler driver /bin/as to take machine specific architecture
- flags and run the family architecture named assembler. So "as -arch m68040"
- will run /lib/m68k/as and not /lib/m68040/as.
- - Changed the handling of the cpusubtypes to support this design:
- The design allows each architecture family (m68k, m88k, i386) to have a
- cpusubtype that will run on all implementations of that architecture and
- have cpusubtypes that will run only on specific implementations of an
- architecture. The design also gives the programmer the option to force the
- cpusubtype indicating all implementations (at build time with a flag) when
- using instructions that are implementation specific leaving it up to the
- program to runtime select the correct code to execute.
- The assemblers implementation of this design is:
- By default the assembler will produce the cpusubtype ALL for the object file
- it is assembling if it finds no implementation specific instructions. Again
- by default the assembler will allow implementation specific instructions for
- implementations and combine the cpusubtype for those specific
- implementations. The combining of specific implementations is architecture
- dependent and may not be allowed for some architectures and are flagged as
- an error. With the optional -force_cpusubtype_ALL flag all instructions
- are allowed and the object file's cpusubtype will be ALL.
- If an -arch flag for a specific implementation (ie. -arch m68040 or -arch
- i586) is used the assembler will flag as errors instructions that are not
- supported on that architecture and produce the cpusubtype for that specific
- implementation in the object file (even if no specific instructions are
- used).
- This effected as.c, as.h, Mach-O.c, m68k.c, m68k-opcode.h, i386.c, i386.h, and
- i386-opcode.h. The m88k and i860 assemblers had no machine specific
- modifications.
-
- Changes for the 3.1 release (the cctools-9 release):
- - Fixed a bug that caused the .include feature to fail in some cases. The value
- of the stuff saved by save_scrub_context() in app.c was not reset which caused
- the app preprecessor to start parsing the included file and think it was in
- the case of a string.
-
- Changes for the 3.1 release (the cctools-8 release):
- - Fixed a bug the did not cause m68k floating point branchs to undefined symbols
- to have relocation entries that make it to the object file to work with
- scattered loading. On line 3299 in m68k.c was:
- fix_new(fragP,(int)(fragP->fr_fix),4,fragP->fr_symbol,
- (symbolS *)0,fragP->fr_offset+4,1);
- changed to:
- fix_new(fragP,(int)(fragP->fr_fix),4,fragP->fr_symbol,
- (symbolS *)0,fragP->fr_offset+4,1+2);
- - Fixed a bug in the i386 assembler for these two instructions where the segment
- override did not get picked up from:
- mov %eax,%gs:sr_mem_offset
- jmp %gs:sr_mem_offset
- The first is bug #29555 the second is just another form of the same logic bug
- in another place. There maybe more of this same logic bug. The fixes are in
- i386.c in md_assemble() when putting out the opcode.
- - Fixed a bug in the string instructions where segment overrides in the operand
- fields were not picked up. To do this the kludge that ignored the operands
- of string instructions had to be removed as special case table entries and
- matching checking had to be added (bug #26409).
- - Fixed a bug in the i386 assembler where the invlpg instruction did not take
- a Mem operand (it was Mem32). The fix was in the table entry for invlpg in
- i386-opcode.h (change requested by the Lono group). The manual is confusing
- on this instruction.
- - Fixed a bug in the i386 assembler where a call or jmp instruction to an
- absolute address was not getting put out pc relitive and no relocation entry
- was produced (line 1050 and line 1155 in i386.c).
- - Fixed the problem of getting alignment correct for .align directives that are
- greater than the default alignment. This effected the struct frchain in
- subsegs.h, the routine set_section_align() in Mach-O.c and the routine
- write_object_file() in write.c and the initialization of the new field in
- subsegs.c (bug #29432).
- - Changed the I386 bound instruction such that the parameters are consistant
- with gas (reversed them). Also fixed the boundw so it only put out one '0x66'
- data16 prefix byte.
- - Fixed a bug for the I386 that padded the text section with zeros (changed to
- pad with nops) in write.c.
- - Added the wait (0x9b) prefix to the following instructions: "finit", "fstcw",
- "fstsw", "fclex", "fstenv" and "fsave" the "XnXXX" form does not have the
- wait prefix.
- - Added "fucom" as an alias for "fucom %st(1)"
- - Added "fucomp" as an alias for "fucomp %st(1)"
-
- Changes for the 3.1 release (the cctools-7 release):
- - Added the i486 and i586 specific stuff to i386-opcode.h (bug #27475). The
- changes are ifdef'ed i486 and i586 and these are turned in in the Makefile.
- Also the define STRICT_i586 is ifdef'ed (but not defined) where the i586 does
- not allow certian things (test register instructions).
- - Fixed a bug in md_assemble() in i386.c where the instruction "mov %ah,%al"
- would assemble wrong. The problem was when the suffix was selected based
- on the register type the "i.types[o]" needed to and'ed with `Reg' because
- %al and %ax have `Acc' in their types and they were coming up with a 'l'
- suffix. This is ifdefed NeXT.
- - Fixed a bug in m68k_reg_parse() in m68k.c where the registers "ic", dc" and
- "bc" were incorrectly parsed because of an "if (c2 = 'c')" (bug #27954).
- - Added an ifdef CHECK_WORD_IMMEDIATES in m68k.c and code to make checking of
- 16-bit immediates consistant in the m68k assembler (bug #26863). Also to make
- this work the "link" (no suffix) for an immediate word entry in m68k-opcode.h
- had a new "place" character created for it (#z for #w) and code was added to
- m68k.c to handle it. The define CHECK_WORD_IMMEDIATES is left off to cause
- truncation of too large immediate words.
- - Fixed a bug that did not allow -arch and -arch_multiple (as.c). This was
- put in to the NRW cctools-6 but not into lono's.
-
- Changes for the 3.1 release (the cctools-6 release):
- - Added the -arch_multiple flag that will cause one line to printed before all
- error messages which will contain the architecture name.
- - Fixed the m88k pmul and punpk instructions where the last register is not
- required to be an even register.
- - Fixed a bug in atof-ieee.c in gen_to_words() that did not round IEEE denorms
- correctly and caused the smallest denorm to become zero (bug #23178).
-
- Changes for the 3.1 release (the cctools-5 release):
- - Picked up the lono team's cctools-4_2 i386-opcode.h .
- - Added the pseudo op for the m88k assembler ".dot symbol" that sets the value
- of the location counter into the value of the symbol.
- - Removed the trnc.x mnemonic as it is not legal "trnc.sx" is the correct form
- which remains in m88k-opcode.h
- { 0x8400d900, "trnc.x", { {21,5,REG}, {0,5,XREG}, {0,0,NIL} } },
-
- Changes for the 3.1 release (the cctools-4 release):
- - Fixed a bug in parse_cst() in m88k.c that did not allow expressions for
- constant operands. This bug was found with "tb0 0,r0,(129)" where the
- ()'s caused the problem. (bug #21052)
- - Changed installing the i386 assembler into /lib/i386/as from ix86 (and changed
- the -arch name to i386).
- - Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 in Mach-O.c
- - Picked up the changes for the i386 assembler to allow scattered loading from
- the lono team.
-
- Changes for the 3.0 release (the -57 compiler release)
- - Removed the following opcodes from m88k-opcode.h as siff(1) and the newest
- 110 manual says they are not valid.
- { 0X840008A0, "fcvt.dd", { {21,5,REG}, {0,5,REG}, {0,0,NIL} } },
- { 0X840088A0, "fcvt.dd", { {21,5,XREG}, {0,5,XREG}, {0,0,NIL} } },
- { 0X84000800, "fcvt.ss", { {21,5,REG}, {0,5,REG}, {0,0,NIL} } },
- { 0X84008800, "fcvt.ss", { {21,5,XREG}, {0,5,XREG}, {0,0,NIL} } },
- { 0X84000800, "fcvt.ss", { {21,5,REG}, {0,5,REG}, {0,0,NIL} } },
- { 0X84008800, "fcvt.ss", { {21,5,XREG}, {0,5,XREG}, {0,0,NIL} } },
- (bug #20021)
- - Fixed a bug introduced with the change of the SUB_SEGMENT_ALIGN. It turns
- out it broke the objective-C runtime that assumed that the __protocol section
- (amoung others) can be indexed like an array of structs which are not
- multiples of 8 bytes. The fix was to align all objective-C sections to 4
- bytes. Again the change was in write_object_file() in write.c (bug #20022).
-
- Changes for the 3.0 release (the -56 compiler release) (performance month):
- - Changed the order of the objective-C sections. The message_refs and the
- cls_refs section were switched. The meta_cls_refs section was removed.
- This change effected Mach-O.c, write.c and read.c.
- - Changed write_object_file() in write.c to used the normal subsegment
- alignment:
- #ifdef RISC
- #define SUB_SEGMENT_ALIGN (3)
- #else
- #define SUB_SEGMENT_ALIGN (2)
- #endif
- and handle the literal pointer sections special (by knowing their subsegment
- values). This fixes a problem on the m88k where the const section had a
- .align 3 directive but started on a align of 2 boundary. This still has
- the problem if a section has an align greater 3 the data in the output file
- will end up aligned correctly but the section start will not resulting in
- the link edited object to having the data not aligned correctly. (bug #19492)
-
- Changes for the 3.0 release (the -55 compiler release) (performance month):
- - Changed the Makefile to install the driver in /usr/local/bin and the 68k
- assembler in /bin/as and all other assemblers in /usr/local/lib/* .
- - Changed the as driver (driver.c) to look in /lib and in /usr/local/lib for
- assemblers.
- - Changed the order of the objective-C setions to:
- 2 (__OBJC,__class)
- 3 (__OBJC,__meta_class)
- 4 (__OBJC,__string_object)
- 5 (__OBJC,__protocol)
- 6 (__OBJC,__cat_cls_meth)
- 7 (__OBJC,__cat_inst_meth)
- 8 (__OBJC,__cls_meth)
- 9 (__OBJC,__inst_meth)
- 10 (__OBJC,__cls_refs)
- 11 (__OBJC,__meta_cls_refs)
- 12 (__OBJC,__message_refs)
- 13 (__OBJC,__class_names)
- 14 (__OBJC,__module_info)
- 15 (__OBJC,__symbols)
- 16 (__OBJC,__category)
- 17 (__OBJC,__meth_var_types)
- 18 (__OBJC,__class_vars)
- 19 (__OBJC,__instance_vars)
- 20 (__OBJC,__meth_var_names)
- 21 (__OBJC,__selector_strs)
- Also the special casing of the objective-C section in determing to created a
- scatter or non-scattered relocation entry was removed for all but the
- (__OBJC,__selector_strs) section. The directive ".objc_selector_refs"
- is still there and the cc-55 compiler will be changed to use the correct
- directive ".objc_message_refs" and then this can be removed. These changes
- effected read.c and Mach-O.c
-
- Changes for the 3.0 release (the -54 compiler release) (performance fortnight):
- - Added three string sections to the Objective-C segment:
- .objc_class_names, __OBJC __class_names
- .objc_meth_var_names, __OBJC __meth_var_names
- .objc_meth_var_types, __OBJC __meth_var_types
- This effected read.c and Mach-O.c.
- - Added the following lines to i386-opcode.h at the request of the lono guys:
- {"repz", 0, 0xf3, _, NoModrm, 0, 0, 0},
- { "repnz", 0, 0xf2, _, NoModrm, 0, 0, 0},
- Plus allow .word on the ix86 (ifdef added in read.c).
- - Added const to lex_type, is_end_of_line, potable in read.c to make read-only.
- - Added const to op_encoding in expr.c to make read-only.
- - Added const to m68k_opcodes and endop in m68k-opcode.h to make read-only.
- - Changed in_buf in input-file.c to allways be malloc()'ed.
- - Added const to the Makefile for the next_version.c echo line.
-
- Changes for the 3.0 release (the -51 compiler release):
- - Changed Mach-O.c to pad out the string table to a multiple of 4 and set the
- padded bytes to '\0'.
-
- Changes for the 3.0 release (the -50 compiler release):
- - Changed the instructions f[sd]sqrtx for operands FPm,FPn and FPm to f[sd]sqrt
- (without the trailing 'x'). This was just wrong (but the moto opcode is
- inconsistant with all others in this case).
- - Fixed a bug in the fsincos instruction where the FPc and FPs registers were
- switched in the instruction.
- - Changed the order of the objective-C classes to:
- __class - always written on
- __meta_class - always written on
- __string_object - always written on
- __protocol - always written on
- __cls_meth - sometimes written on
- __inst_meth - sometimes written on
- __cat_cls_meth - sometimes written on <these will not be used soon>
- __cat_inst_meth - sometimes written on <these will not be used soon>
- __cls_refs - sometimes written on (uniqued) <these are not used now>
- __meta_cls_refs - sometimes written on (uniqued) <these are not used now>
- __message_refs - sometimes written on (uniqued)
- __symbols - never written on
- __category - never written on
- __class_vars - never written on
- __instance_vars - never written on
- __module_info - never written on
- __selector_strs - never written on (uniqued)
- The six sections starting from the __string_object section were effected.
- The change was made in read.c and Mach-O.c .
-
- Changes for the 3.0 release (the -49 compiler release):
- - Fixed a bug where the assembler was padding literal pointer sections with a
- zero for RISC machines and causing the link editor to complain. The fix was
- to change the macro SUB_SEGMENT_ALIGN from 3 to 2 in write.c and to set the
- alignment of S_LITERAL_POINTER sections in Mach_O.c to 2.
- - Fixed the passing and using of RC_CFLAGS correctly in the Makefile.
-
- Changes for the 3.0 release (the -49 compiler release):
- - Changed the Makefile to meet the RC api.
-
- Changes for the 3.0 release (the -47 compiler release):
- - Added the missing 040 "ptest[rw] An@" instructions.
- - Changed the constant CPU_TYPE_I386 to CPU_TYPE_I80x86 to match header file.
- - Changed the behavior so if warning message is produced (with as_warn()) that
- an object is not produced. The change was in as_warn() in messages.c and is
- ifdef'ed NeXT which sets bad_error to 1 just like as_bad(). (bug #16137 and
- #16044)
- - Added the (__OBJC,__string_object) section with the directive
- .objc_string_object (read.c and Mach-O.c where changed).
-
- Changes for the 3.0 release (the -44 compiler release):
- - Created an assembler driver to be placed in /bin/as and the assemblers are
- then moved to /lib/<arch_flag>/as . The Makefile was updated to build and
- install this way. as.c was changed to take "-arch <arch_flag>" and check it
- against the type of assembler it is.
- - Switch over to the new header file organization.
-
- Changes for the 3.0 release (the -43 compiler release):
- - Changed the Makefile to install the i860 assembler in /usr/local/bin/as860 .
- - Picked up md.h from 1.38.1 which added const to md_pseudo_table and
- md_relax_table so i860.c, m68k.c and m88k.c were all updated as were the
- uses in read.c and write.c.
- - Picked up the files: i386.c, i386.h and i386-opcode.h from the 1.38.1 release.
-
- Changes for the 3.0 release (the -39 compiler release):
- - Fixed so that strings can have characters with the 8th bit set in them. This
- involved adding the lines in next_char_of_string() in read.c:
- #ifdef NeXT /* allow 8 bit chars in strings */
- c = (c & MASK_CHAR); /* to make sure the 0xff char is not returned as -1*/
- #endif NeXT
- so that the high bit does not get sign extened and the -1 return code that is
- tested for at the call sites as >= 0 is not tripped over.
- Second changed all 8th bit set chars in lex_type[] in read.c to be allowed in
- names. Also had to change the macros in read.h
- #define is_name_beginner(c) ( lex_type[(c) & 0xff] & LEX_BEGIN_NAME )
- #define is_part_of_name(c) ( lex_type[(c) & 0xff] & LEX_NAME )
- to add the "& 0xff" because of the sign extension of chars (bug #15597).
-
- Changes for the 3.0 release (the -37 compiler release):
- - Fixed the relocation entries for the 88k so that 88k objects can be scatter
- loaded by the link editor. This involves adding a PAIR relocation entry for
- the LO16 type (as well as having one for the HI16 type) and moving the place
- in the relocation entry where the other half of the relocatable expression is
- store from the r_symbolnum field to the r_address field (so that a scattered
- relocation can be used, since it does not have an r_symbolnum field). Also
- removed all support for signed immediates on the 88110 since NeXT will not
- use this feature. Also to be consistant the i860's PAIR's will also use the
- r_address field even though they will not use scattered relocation entries.
- These changes were made in Mach-O.c .
- Also required forcing relocation entries for non-local labels for 88k branch
- instructions which was done with the same kludge as the 68k by setting the
- 0x2 bit in the fx_pcrel fix structure when it is created in m88k.c in
- md_assemble(). This also required an extra ifdef M68k in Mach-O.c in
- fix_to_relocation_info() when choosing to put out a scattered relocation
- entry because of the way 68 branch instructions work.
-
- Changes for the 3.0 release (the -36f compiler release):
- - Fixed a bug that did not catch a bit field expression error between the <>'s.
- A check for the trailing '<' was missing. This was added in parse_bf() in
- m88k.c .
- - Fixed the .abs directive for 88k registers. The fix was for it to handle
- scaled register expressions and also not generate an undefined symbol for the
- register name "U r1". The changes were to m88k.c adding s_m88k_abs() for the
- .abs pseudo-op and to read.c to leave s_abs() but to ifdef it out of the
- table for the 88k as s_m88k_abs() uses s_abs().
- - Corrected the lex_type table in read.c to not allow the character '[' as
- part of a name.
- - Added '@' as a statement separator for the 88k (change the "# <line> <file>
- <level>" stuff to use it when generating ".line <line> @ .file <file>" ).
- Changed app.c and read.c ifdef'ed M88K. Also s_reg(), s_scaled() and
- no_delay() in m88k.c also need this because they can't use the macros in
- read.c .
- - Added the .no_delay 88k pseudo-op. Changed m88k.c and m88k-opcode.h to add
- the delay_slot field to the instruction table and a static variable,
- in_delay_slot, that gets set each time an instruction is assembled.
- - Fixed a bug not allowing macro names to start with '.' . The fix was in
- read.c in parse_a_buffer() right before it detects an unknown pseudo-op.
- Also change it so the unknown pseudo-op is printed when an error happens.
- Also changed s_macro() in read.c to print a warning if a known pseudo-op name
- is used a macro name.
-
- Changes for the 3.0 release (the -36e compiler release):
- - Fixed a bug where the operand "pc@" did not assemble correctly. The fix was
- in m68_ip() in m68k.c on linr 1604 for the "case AINDR" which can be set with
- PC in the opP->reg. In this case the mode pc@(d16) is used. This is ifdef'ed
- NeXT.
- - Fixed a bug where "foo :" did not recognize "foo" as a label. The fix was in
- app.c in do_scrub_begin() where the line:
- lex [':'] |= LEX_IS_LINE_SEPERATOR;
- was ifdef'ed out since ':' did not work. But ... This DOES not cause ':' to
- be a LINE SEPERATOR but does make the second if logic after flushchar: in
- do_scrub_next_char() to handle "foo :" and strip the blanks. This is the way
- has always been and must be this way to work.
-
- Changes for the 3.0 release (the -36d compiler release):
- - Fixed a bug in the 88k assember that did not handle "# <line> <file> <level>"
- comments correctly because it uses ";" which is a comment and the .file gets
- ignored. The fix was ugly. The change was to app.c and read.c ifdef'ed M88K
- to allow '\001' as a statement seporator (CHANGED IN -36f see above).
- - Changed the marking of literal sections from not marking them for RISC to
- not marking them for only the I860. This change is since the 88k compiler
- will ALLWAYS make a 32 bit reference to an item and leave it to the link
- editor to find ways to make 16 bit references these sections can marked for
- uniqueing for the 88k.
- - Added the following directives for the following new sections:
- .constructor for __TEXT, __constructor
- .destructor for __TEXT, __destructor
- .objc_protocol for __OBJC, __protocol
- .objc_cls_refs for __OBJC, __cls_refs (S_LITERAL_POINTERS)
- .objc_meta_cls_refs for __OBJC, __meta_cls_refs (S_LITERAL_POINTERS)
-
- Changes for the 3.0 release (the -36c compiler release):
- - Fixed a bug involving expressions with unknown symbols for operators other
- than '+' or '-'. The problem is that in expr() in expr.c if an expression
- operator is something other than '+' or '-' then it sets the need_pass_2
- flag and no other "frags" (bytes of output) are generated. You would think
- it would want to run another pass but the code doesn't do that (major bug)!
- So now it just does what it would in the case the symbol is known which is
- report the expression can't be relocated.
- - Fixed m88k.c to use LO16 relocation types not LO16EXT types.
-
- Changes for the 3.0 release (the -36b compiler release):
- - Added the m88k directive .scaled as requested by the OS group.
- - Allow expressions for the bit number, parse_cmp() like in bb0, condition
- match, parse_cnd() like in bcnd, and even 4 bit rotation, parse_e4rot like
- in prot.
-
- Changes for the 3.0 release (the -36a compiler release):
- - Added the opcodes "illop[123]" as per the version 3.0 88110 spec.
- - Removed the "lda.b rD,rS1[rS2]" instruction and replaced that opcode with
- "lda.x rD,rS1[rS2]" as per the version 3.0 88110 spec.
- - Corrected "nint.[sdx]" to be "nint.s[sdx]" and "int.[sdx]" to be "int.s[sdx]"
- which was just wrong in the GNU assembler (trnc was previous corrected but
- flaged as an 88110 versrion 3 change but that was incorrect as the assembler
- was just wrong (even for the 88100)).
- - Corrected "mov.s xD,xS2" to be "mov xD,xS2" as per the version 3.0 88110 spec.
- - Removed the old (version 2.0 of the 88110) opcodes: "mov.t xrD,rD2" and
- "mov.t rD,xrS2" which used blank instead of .s for single.
- - Removed the old (version 2.0 of the 88110) opcodes: "trnc.t rD,xrs2" and
- "trnc.t rD,rS2" (where t is the type of the result) which used only the type
- of the result and implied the .s for single.
- - Removed the "ppack.8.b", "ppack.8.h", and "ppack.16.b" opcodes from the m88k
- opcode table. These operations are undefined.
-
- Changes for the 3.0 release (the -35 compiler release):
- - Fixed a bug in parse_bf() when expressions were added expressions that did
- not start with a digit (for example a '(', '+', '-', '~' or '!') were not
- recognized.
- - Changed the action for .abort to print the remaining line as part of the
- error message. Feature request by the OS group.
- - Added an option [,alignment] expression to the end of the .lcomm directive
- which aligns the symbol to the power of 2 alignment expression (same as the
- .align directive). This is ifdef'ed NeXT in s_lcomm() in read.c .
- - Changed which directives are allowed on which machines
- .word 68k and i860 only (machine specific) NOT 88k
- .long 68k and i860 only NOT 88k
- .quad 68k only
- .octa 68k only
- .float 68k and i860 only NOT 88k
- These changes are in read.c, m68k.c and i860.c . Feature request by the OS
- group and removal of .quad and .octa for the i860 approved by the NeXT
- Dimension group.
- - Added the directive .elseif . This involed a bit of reworking the .if, .else
- and .endif stuff in read.c . Feature request by the OS group.
- - Fixed a bug that would allow you to use the macro in a macro definition
- and cause the assember to core dump. A limit, MAX_MACRO_DEPTH of 20, is
- used to avoid this.
- - Added the directives .macros_on .macros_off. This is to allow macros to be
- turned off, which allows macros to override a machine instruction and still
- use the machine instruction. This is in read.c and toggles the variable
- macros_on in s_macros_on() and s_macros_off() which is tested in
- parse_a_buffer(). Feature request by the OS group.
- - Added s_abs() in read.c to implement ".abs symbol,exp" which set symbol to 1
- or 0 depending on if the expression is an absolute expression. This is
- intended for use in macros. Feature request by the OS group.
- - Added s_reg() to m88k.c to implement ".greg symbol,exp" and ".xreg symbol,exp"
- which set symbol to 1 or 0 depending on if the expression is a general
- register or extended register respectfully. These are intended for use in
- macros. Feature request by the OS group.
- - Added $n in expand_macro() in read.c to substitute the number of actual
- arguments for the macro. Feature request by the OS group.
- - Changed the code for setting the line separator's (character for multiple
- statements on a line) in do_scrub_begin() in app.c . The character '/'
- tried to be a separator for the 88k but code down stream prevented it from
- working so it was removed and the 88k does not allow multiple statements on
- a line. Also removed the NeXT ifdef for the ':' character which also did
- not work.
-
- Changes for the 3.0 release (the -34 compiler release):
- - Fixed a bug that for all floating-point branches it did not generate a
- relocation entry. The fix is in md_estimate_size_before_relax() in m68k.c
- where the case of 'TAB(FBRANCH,SZ_UNDEF)' was not handled in the first
- switch and code to generate the relocation entry (a call to add_fix) was
- not done. This is ifdef'ed NeXT.
- - Fixed a bug for branches that use displacements to absolute addresses which
- produced a displacement off by -4. This is ifdef'ed NeXT in m68_ip() in
- m68k.c in the second main switch statement that sets the bits in the
- instruction for the 'B' case. There are two ifdef's, one for 'g' sub case
- (normal branches) and one for the 'c' sub case (floating-point branches).
- - Disallow all floating-point packed immediates for the 68k assembler because
- the gen_to_words() routine in atof-ieee.c does not produce the correct 68k
- packed decimal format. This simply disallows this but does not fix it.
- So "fmovep #0r1.0,fp0" will no longer assemble instead of assemble wrong.
- This is ifdef'ed PACKED_IMMEDIATE in m68k-opcode.h and m68k.c in m68_ip().
- (internal bug #5)
- - Fixed a bug in the assembler which matched the "fmoveml #1,fpc" where the
- immediate #1 cause an internal FATAL error because it can't decode the mode
- "*s". The fix is in m68_ip() in m68k.c where the case for 's' was ifdef'ed
- NeXT in just like the long case. This is legal but the instruction
- "fmoveml #1,fpc/fpi" is not and the assembler STILL accepts it.
- (internal bug #4).
- - Fixed a bug in the assembler which matched the "movec sfc,#1" where the
- immediate #1 cause an internal FATAL error because it can't decode the mode
- "#j". The fix in m68_ip() in m68k.c in the loop to install the operand bits
- for the '#' case was missing the second sub case for 'j' that check the
- range of the value and installed the operand. If the immediate is a variable
- my guess this will still fail but in a different way.
- (internal bug #3).
- - Fixed a bug that caused the assembler to call abort with no error message
- when assembling "andiw #0x8001,fpir/fpcr/fpsr". In get_num() in m68k.c
- the case for a SEG_PASS1 was missing from the switch statement from the
- type of the expression() call. It was ifdef'ed NeXT in and handled like
- SEG_UNKNOWN and a bunch of others that just print out it can't handle the
- expression.
- STILL BROKEN!
- (internal bug #2).
- - Fixed a bug that the operand of the form "zpc@(0)" was trying to use the
- pc@(16) (AOFF) form which does not allow the base register to be suppressed
- which is what zpc is. So this now uses the pc@(bd,Xn) form (AINDX). The
- bug caused "zpc@(0)" to generate garbage, namely "d1". The change is in
- m68k_ip_op() in m68k.c and ifdef'ed NeXT with a comment like above.
- (internal bug #1).
- - Ifdef'ed out the turning operands into PC relative in m68_ip() in m68k.c (this
- is a 1.36 feature) because it breaks scattered loading.
- - Fixed a bug in the 1.36 version of GAS where the table of fmovem instructions
- were reordered. See the comment in m68k-opcode.h with the header "REGISTER
- LIST BUG:". The fix was to put the list back in the previous order. There
- is a design bug here that needs to be fixed.
- - Fixed a bug where the .align directives were not propagated into the section
- headers of the object file. A new routine, set_section_align() in Mach_O.c,
- is called from s_align() in read.c .
- - Put the change in atof-ieee() in atof-ieee.c that creates infinities on
- overflows. This fixes bug #13409.
- - Picked up a change in i860_ip() in i860.c from the NDTools-6 version.
- Having to do with constant offset alignments.
- - Added expressions to the width and <offset> bit field instructions. Since the
- parameter syntax is width<offset> and offset may be a two character 'cmp' bit
- designator, the width expression may not contain the character '<' and the
- offset expression must start with a digit.
- - Changed "mov.t xrD,rD2" and "mov.t rD,xrS2" to use .s for single instead
- of blank. (version 3.0 of 88110 spec).
- - Changed "trnc.t rD,xrs2" and "trnc.t rD,rS2" (where t is the type of the
- result) to use .st where the s is for single and t is the type of the result.
- (version 3.0 of 88110 spec).
- - Changed the pflusha instruction to pflusha030 and pflusha040 because there is
- no way to tell them apart.
- - Added automatic creation of stabs for assembly code debugging with -g. The
- comment that explains in detail how this is done is in read_a_source_file()
- in read.c, The other changes are in make_stab_for_symbol() in symbols.c,
- s_include(), s_line() in read.c, and md_assemble() in m68k.c and m88k.c also
- two static declarations were removed from input-scrub.c. These changes are
- marked with pairs of:
- #ifdef NeXT /* generate stabs for debugging assembly code */
- ...
- #endif NeXT /* generate stabs for debugging assembly code */
- - Added the MMU instructions for the 030 and 040 (ifdef'ed BUILTIN_MMUS) and
- turned off the m68851 define for that set of MMU instructions. The reason to
- turn it off is because of the register names it must recognize (see bug #7525
- why we don't want to do this). This change is not ifdef'ed NeXT because it
- is very intertwined with the 68851 stuff. Also with this change the "MMU
- status register" correct name of "mmusr" was added but the old name of "psr"
- was retained for compatiblity because of assembler code that might use it.
- - Added installsrc, installIBMsrc and installGNUsrc targets to the Makefile.
- - Bug #8331, feature request for hex immediate bit-patterns for floating-point
- immediates. Added the constant radix 0b... like 0x... except that it would be
- assumed to be a "bignum" and then a binary bit pattern for a hex immediate.
- This effected the routines operand() in expr.c, get_num() in m68k.c and
- m68_ip() in m68k.c . All of these are ifdef'ed NeXT with the comment
- /* fix for bug #8331 */ .
- - Bug #13017, this is where ".fill x,3,x" would cause the assembler to call
- abort because the repeat size is 3 bytes. This is now dissallowed in s_fill()
- in read.c and only repeat sizes of 0,1,2 and 4 are allowed.
- - Bug #11209, this is where if the file system fills up or something and the
- file can't be closed the object file was left and would confuse later
- make(1)'s because the object file would be present but would then just hand
- this off to the link editor and it would complain about a bad object file.
- The fix in output_file_close() in output-file.c was to remove the file in this
- case because it might be bad.
- - Bug #8920, where s file containing just "bra L1" would produce a bad object
- file because the undefined local lable L1 was not defined is fixed. The fix
- is in write_object_file() in write.c (and one line in write_Mach_O() in
- Mach-O.c to test bad_error). The undefined local symbols are printed with an
- error message in this case and then the object file is not written.
- - Bug #8918, where a line of the form "# 40 MP1 = M + 1" gets confused with a
- line of the form "# 1 "hello.c" 1" and causes a bug that ignores the rest of
- the file. This was fixed in app.c when in state 4 (after putting out a .line,
- put out digits) and then not finding an expected '"' for the name of the file
- it ignores the rest of the line but forgets to set the state to 0 (begining of
- a line). This is ifdef'ed NeXT.
- - Bug #7525 (second part), where "bfffo d0{#2,#32},d1" would not work with the
- field width of 32 is now fixed. (I'm not sure exactly what the fix was it
- probably came from the 1.36 version of GNU).
- - Bug #5384, where if a ".globl foo" precedes "foo=1" foo does not end up global
- has been verfied to be fixed (I'm not sure exactly what the fix was it
- probably came from the 1.36 version of GNU).
- - Changed the default alignment of sections to 3 (8) for RISC machines from 2
- (4) in both write.c and MachO.c.
- - Print a warning for -R (make data text) to used .const and not put the data
- in the text.
- - Cleaned up Mach-O.c and read.c by changing/adding message_refs where
- selector_refs was used.
- --- Changes to merge in John Anderson's (DJA) version of GAS ---
- - added relational binary operators (<, ==, >, <= and >=) and modified the
- precedence to conform to 'C'. The code is marked with pairs of:
- #ifdef NeXT /* added relational ops, changed precedence to be same as C */
- ...
- #endif NeXT /* added relational ops, changed precedence to be same as C */
- and is contained in the file expr.c and is the DJA version with a few bug
- fixes to make it work. Found a logic bug when "<>" was used as an operator
- it was recognized as a "<". This "operator" appears in the WriteNow source
- so I added "<>" as a form of "!=".
- - added logical negation unary operator (!). The code is marked with pairs of:
- #ifdef NeXT /* logical negation feature */
- ...
- #endif NeXT /* logical negation feature */
- and is contained in the file expr.c and is exactly the DJA version.
- - added code to try to make expresions absolute. The code is marked with
- pairs of:
- #ifdef NeXT /* feature to try to make expressions absolute */
- ...
- #endif NeXT /* feature to try to make expressions absolute */
- and is contained in the files expr.c and m68k.c (the code is exactly the DJA
- version).
- - added the .dump/.load feature (this is based on top of the .include and
- .macro features). The code is marked with pairs of:
- #ifdef NeXT /* the .dump/.load feature */
- ...
- #endif NeXT /* the .dump/.load feature */
- and is in read.c (and one line in symbols.c) and is the DJA version. Fixed
- a bug in write_symbol() in read.c where the symbol's n_type field needed to
- be and'ed with the N_TYPE macro before checking for equal to N_ABS.
- not checked
- - added the conditional assembly feature (pseudo ops .if .else .endif) and the
- macro feature (pseudo ops .macro and .endmacro). This is all contined read.c
- and required a major rewrite of the main parsing routine read_a_source_file().
- This was replaced by three routines read_a_source_file(), parse_a_buffer() and
- parse_line_comment(). Since the their was no way to ifdef the old code it was
- removed. Where possible the conditional assembly feature code is marked with
- pairs of:
- #ifdef NeXT /* the conditional assembly feature (.if, .else, and .endif) */
- ...
- #endif NeXT /* the conditional assembly feature (.if, .else, and .endif) */
- and the macro feature code is marked with pairs of:
- #ifdef NeXT /* the .macro feature */
- ...
- #endif NeXT /* the .macro feature */
- All of these changes are in read.c and except for the rewrite
- read_a_source_file() the changes are the DJA version.
- - added the .include "filename" pseudo op. This is marked with pairs of:
- #ifdef NeXT /* .include feature */
- ...
- #endif NeXT /* .include feature */
- the code in in read.c, as.c, app.c, as.h and input-scrub.c. Except for the
- code in app.c and the typedef scrub_context_data in as.h (related to the
- major changes in the app.c code from the DJA version) it is exactly what
- was in the DJA version. Fixed a bug in input_file_open() in input-file.c
- where it was doing a setbuffer() call using a staticly allocated buffer for
- all the file's in read. This was changed to use a dynamicly allocated buffer
- when processing an include file so the buffer does not get reused by include
- files.
-
- Changes for the 3.0 release (the -33 compiler release):
- - Fixed trap*.w and trap*.l to take one immediate operand of word or long
- (this was just wrong in GAS).
- --- Changes to merged in the 1.36 version of GAS ---
- app.c: (1.36 version picked up)
- - This deals with the "# <number> <filename> <garbage>" in the state
- machine (the NeXT fix in s_line() was much cleaner).
- - Picked up the 1.36 version. The only odd difference is that ':' was
- ifdef'ed OUT in the 1.36 version and IN the the NeXT 1.28 version.
- #ifdef DONTDEF <- 1.36
- #ifndef DONTDEF <- NeXT 1.28
- lex [':'] |= LEX_IS_LINE_SEPERATOR;
- #endif
- I did the NeXT thing in fear of breaking something. Done with:
- #if defined(DONTDEF) || defined(NeXT)
- append.c: (1.36 version picked up)
- - Only Copyright comment changed
- as.c: (1.36 version picked up)
- - The machine specific command line options have been moved to routines
- named md_parse_option() in the machine specific files.
- - The handling of assembly errors has changed from using as_warn() to the
- new routine as_bad() which if called sets bad_error and will not produce
- an output file if that gets set (see the file messages.c for
- definitions).
- - Handling of signals has changed to an array of signal numbers and a
- routine that catches them and prints out the signal number.
- messages.c: (1.36 version picked up)
- - The addition of the routine as_bad() and the variable bad_error. If
- as_bad() is called then bad_error gets set and the output file does not
- get produced (see main() in as.c).
- as.h: (1.36 version picked up)
- - The following macros had ()'s added around their parameters:
- #define bzero(s,n) memset((s),0,(n))
- #define bcopy(from,to,n) memcpy((to),(from),(n))
- atof-generic.c: (1.36 version picked up)
- - Macro for alloca ifdef'ed __GNUC__ added:
- #ifdef __GNUC__
- #define alloca __builtin_alloca
- #else
- #ifdef sparc
- #include <alloca.h>
- #endif
- #endif
- - Macros for bzero and index ifdef'ed USG added:
- #ifdef USG
- #define bzero(s,n) memset(s,0,n)
- #define index strchr
- #endif
- - The strings "nan", "inf" or "infinity" (in either case) are recognized
- first and NaN's get the sign set to 0, +infinity gets the sign set to
- 'P' and -infinity gets the sign set to 'N' (see flonum.h). They used to
- be caught at the end and the strings "Infinity", "infinity", "NaN",
- "nan", "SNan", or "snan" had been recognized and some note about
- see atof-m68k.c was there (this file was removed and atof-ieee.c was
- added).
- - A loop was added to strip leading '0' characters:
- while(number_of_digits_after_decimal &&
- first_digit[number_of_digits_before_decimal +
- number_of_digits_after_decimal] == '0')
- --number_of_digits_after_decimal;
- After they were picked up.
- - Looks like the extra precision was move into two extra littlenums worth
- in the implementation of converting digit strings into flonum's.
- flonum-const.c: (1.36 version picked up)
- - Comment changes.
- flonum-copy.c: (1.36 version picked up)
- - Copyright comment changed.
- flonum-mult.c: (1.36 version picked up)
- - Added a check if the signs of the two numbers are one of '+' or '-' it
- is an error and returns zero. This happens with infinities as the sign
- is set to 'P' or 'M' or NaNs and the sign is set to zero ('\0' or 0).
- - Also some extra term in an if statement:
- 146c141
- < if (significant || P<0)
- ---
- > if (significant)
- I did figure out what it was.
- flonum.h: (1.36 version picked up)
- - Comment about NaN and infinities was added:
- /* JF: A sign value of 0 means we have been asked to assemble NaN
- A sign value of 'P' means we've been asked to assemble +Inf
- A sign value of 'N' means we've been asked to assemble -Inf
- */
- atof-ieee.c: (1.36 version picked up)
- - Replaces atof-m68k.c
- bignum-copy.c: (1.36 version picked up)
- - The addtion of the explit return type of 'int' was added to the routine
- bignum_copy().
- - Copyright comment changed
- bignum.h: (1.36 version picked up)
- - The commented out extra digits of LOG_TO_BASE_2_OF_10 were uncommented.
- the comment above this was that this was done to get around a problem
- in GCC (I'm assuming that has been fixed).
- < #define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
- ---
- > #define LOG_TO_BASE_2_OF_10 (3.321928
- /* 0948873623478703194294893901758651 */)
- - Copyright comment changed.
- expr.c: (1.36 version picked up with Mach_O and NeXT ifdef's merged in)
- - Copyright comment changed and top comment removed.
- - A hack was changed with respect to the variable generic_bignum[].
- The comment explains:
- /* Seems atof_machine can backscan through generic_bignum and hit
- whatever happens to be loaded before it in memory. And its way
- too complicated for me to fix right. Thus a hack. JF: Just make
- generic_bignum bigger, and never write into the early words, thus
- they'll always be zero. I hate Dean's floating-point code. Bleh.
- */
- - This varable and comment was added but no one uses it. See flonum.h
- for how NaNs and infinities are handled.
- /* If nonzero, we've been asked to assemble nan, +inf or -inf */
- int generic_floating_point_magic;
- - Changes to allow d$ where d is a digit has been added ifdef'ed
- SUN_ASM_SYNTAX. But according to the Sun assembler manual, page 10
- section 2.4, the local labels are n$ where n is any integer (I wounder
- if it really supports negitive integers). There is also code in expr.c,
- symbols.c and read.c to support this.
- expr.h: (1.36 version picked up)
- - Copyright comment changed.
- frags.h: (1.36 version picked up)
- - Copyright comment changed.
- hash.c: (1.36 version picked up with error() calls ifdef NeXT to as_fatal)
- - Copyright comment changed and two /* in comments changed to / *
- - A change from:
- newsize = handle->hash_stat[STAT_SIZE] <<= 1;
- to
- handle->hash_stat[STAT_SIZE] <<= 1;
- newsize = handle->hash_stat[STAT_SIZE];
- in hash_grow();
- hash.h: (1.36 version picked up)
- - Copyright comment changed.
- - The following line removed:
- static char * hash_grow(); /* error text (internal) */
- hex-value.c: (1.36 version picked up)
- - Copyright comment changed.
- - The following routine was added:
- #ifdef VMS
- dummy2()
- {
- }
- #endif
- input-file.c: (1.36 version picked up)
- - Copyright comment changed.
- - The commented out declaration was removed (but not the comment out code)
- /* static int file_handle; /* <0 === not open */
- - The explict declaration of the pre prameter was added to the routine
- input_file_open().
- - The explict declaration of the routine do_scrub_next_char() was added
- inside the routine input_file_give_next_buffer() in a local scope.
- input-file.h: (1.36 version picked up)
- - Copyright comment changed.
- input-scrub.c: (1.36 version picked up)
- - Copyright comment changed.
- - The macro AFTER_STRING was changed from:
- #define AFTER_STRING (" ") /* bcopy of 0 chars might choke. */
- to:
- #define AFTER_STRING ("\0") /* bcopy of 0 chars might choke. */
- - The varables used by the ifdef'ed DONTDEF code was removed (why not just
- also ifdef'ed?):
- char *p;
- char *out_string;
- int out_length;
- static char *save_buffer = 0;
- extern int preprocess;
- m68k-opcode.h: (1.36 version merged in)
- - Copyright comment changed.
- - The bras and bsrs were ifdef'ed NeXT to not use word displacements.
- - some reordering of the movem and fmovem type instructions.
- - all m68851 stuff pulled in (comments and opcodes), pmmu.h was removed.
- m68k.c: (1.36 version merged in)
- - Copyright comment changed
- - Lots of changes related to the DBCC and DBCC68000 with jumps to jumps (see
- GAS 1.36 version change log).
- - The characters 'e' and 'E' were added to FLT_CHARS[]
- - In the md_relax_table the long branches (BRANCH,FBRANCH & PCREL) had their
- forward and backward reach changed by 2 where (the 2 was removed from the
- expression).
- - Constants for the BCC68000 and DBCC branch types were added as well as
- entries in the md_relax_table.
- - The .proc pseudo op was added
- - The register defines for m68851 were added to m68k.c and pmmu.h was removed.
- - Fixed a bunch of the macros like add_fix which did NOT have ()'s around the
- parameters which was the source of a nasty bug NeXT tracked down.
- - The routine m68k_reg_parse() takes something of the form fp0: and turns
- the ':' into a ',' .
- - A fix to handling big numbers (greater than 32 bits) as a floating-point
- bit pattern was made to put the bits out in the correct order. The loop
- was changed from:
- for(wordp=generic_bignum;offs(opP->con1)--;wordp++)
- to:
- for(wordp=generic_bignum+offs(opP->con1)-1;offs(opP->con1)--;--wordp)
- - The the routine md_atof() was changed to use atof_ieee() from atof_m68k().
- - Picked up the md_parse_option() routine.
-
- - The NeXT made change to allow hex immediates for floating-point (which
- broke decimal immediates like #1 and did not work for doubles) was removed.
- Also see bug #8331 in bug tracker.
- This change is in the routine m68_ip() (which converts a string into a
- 68k instruction) in the code for handling immediates which are some
- type of floating point number that is not a SEG_BIG.
- This next #if 0 #endif pair comments out these two lines:
- int_to_gen(nextword);
- gen_to_words(words,baseo,(long int)outro);
- and replaces it with this line:
- /* modified by mself to support hex immediates. */
- *(int *)words = nextword;
- The effect is that the non SEG_BIG expression (which is just an integer,
- not a floating point value) is not converted to a float but just used
- as a bit pattern for the floating point number. This fails for doubles
- since some random bits left in the local array words[] get stuffed into
- the 64 bit double value and of course breaks the common case of #1 for
- decimal numbers.
-
- - The NeXT use of atof_m68k was removed in the case of getting a floating
- point immediate and the code to call gen_to_words() was put back.
- - The NeXT change of #if 0'ing out the line: (I don't know why):
- gen_to_words(words,2,8L);/* These numbers are magic! */
- was removed the the #if removed and the code left in.
- obstack.c: (1.36 version picked up)
- - Lots of changes but diffed with the same file in the cc directory (which
- is based on 1.36) it looks very close to the same. Since the NeXT 2.0
- compiler uses it it is picked up here on faith.
- obstack.h: (1.36 version picked up)
- - Lots of changes but diffed with the same file in the cc directory (which
- is based on 1.36) it looks very close to the same. Since the NeXT 2.0
- compiler uses it it is picked up here on faith.
- output-file.c: (1.36 version picked up with NeXT and Mach_O ifdef's put in)
- - Copyright comment changed.
- - The NeXT ifdef is to unlink the file before doing a create on it.
- - The Mach_O ifdef is for the routine output_write().
- pmmu.h: removed (1.36 has this stuff moved into m68k-opcode.h and m68k.c)
- read.c: (1.36 version picked up with NeXT, Mach_O and I860 ifdefs added)
- - Copyright comment changed.
- - There is a differing set of changes related to the bumping of the line
- counters with respect to #NO_APP and #APP. One in the 1.28 version
- ifdef'ed NeXT and the other in the 1.36 version. The 1.36 set of
- changes were picked up.
- - A bunch of changes to the s_set routine (not use in the NeXT compiler
- suite).
- read.h: (1.36 version picked up)
- - Copyright comment changed.
- strstr.c: (1.36 version picked up with NeXT ifdef code added)
- - Only Copyright comment changed
- - The routine strstrn() apperently was added by NeXT and is used in read.c
- for searching for "#NO_APP\n".
- struc-symbol.h: (1.36 version picked up with NeXT ifdef code added)
- - Only Copyright comment changed
- - The ifdef NeXT code is to the sy_other macro to refer to the n_sect
- field instead of the n_other field.
- subsegs.c: (1.36 version picked up)
- - Only Copyright comment changed
- subsegs.h: (1.36 version picked up)
- - Only Copyright comment changed
- symbols.c: (1.36 version picked up with Mach_O ifdef code added)
- - Only Copyright comment changed
- - Changes to allow d$ where d is a digit has been added ifdef'ed
- SUN_ASM_SYNTAX. But according to the Sun assembler manual, page 10
- section 2.4, the local labels are n$ where n is any integer (I wounder
- if it really supports negitive integers). There is also code in expr.c,
- symbols.c and read.c to support this.
- - The ifdef Mach_O code is to set the n_sect field.
- symbols.h: (1.36 version picked up)
- - Only Copyright comment changed
- version.c: (1.36 version picked up)
- - The comments were removed and place in a file ChangeLog
- write.c: (1.36 version picked up with NeXT, M68K, Mach_O and I860 ifdefs added)
- write.h: (1.36 version picked up with the NeXT ifdef added)
- xmalloc.c: (1.36 version picked up with NeXT ifdef code added)
- - Only Copyright comment changed
- - The NeXT ifdefs are changing the call to error() to as_fatal() so the
- macro -Derror=as_fatal does not have to be used (since it could
- substitue in places where it shouldn't.
- xrealloc.c: (1.36 version picked up with NeXT ifdef code added)
- - Only Copyright comment changed
- - The NeXT ifdefs are changing the call to error() to as_fatal() so the
- macro -Derror=as_fatal does not have to be used (since it could
- substitue in places where it shouldn't.
-
- --- Changes to merged in the i860 version of GAS by NeXT Dimension team ---
- (NDTools-4)
- - i860.h:
- This contained the i860 relocation stuff. This was moved into reloc.h
- Also there was a bug in the GNU version of ld that relocated the
- RELOC_HIGHADJ wrong. The adjustment was always done out of the
- assembler and should have been taken out and put back everytime.
- This is now the case in the NeXT Mach-O link editor in i860_reloc.c .
-
- - I860 changes to read.c:
- big_cons(), get_known_segmented_expression() and stringer() no longer static
-
- Mike changed s_file() and s_line() to handle the cpp line directive nesting
- level by adding discard_rest_of_line() to it. The complier group's version
- just recognized the extra digits in s_file(). The compiler group's version
- was retained and Mike's changes were left out.
-
- The i860 has it's own align syntax and the "align" pseudo-op is ifdef'ed out
- for the i860 (what is this symtax?).
-
- The i860 has the "org" and "quad" pseudo-op's ifdef'ed out.
-
- The as_fatal() call in pobegin() has "... (%s)", errtxt ); added to it.
-
- An Intel "lable::" crock, which also makes the symbol global
-
- The fix_new() call in cons() has an extra RELOC_VANILLA argument added to it
- that is ifdef'ed I860. This also requires i860.h to be included which
- defines RELOC_VANILLA to be added at line 37:
- #if defined(I860)
- #include <i860.h>
- #endif
-
- - I860 changes to write.c:
- Added at line 50 (for the NO_RELOC relocation r_type)
- #if defined(I860)
- #include "i860.h"
- #endif
-
- The variable next_object_file_charP is not static for the i860 (ifdef'ed
- I860).
-
- fix_new has an extra prameter r_type (ifdef'ed I860) and it is set in to the
- fixP struct via:
- fixP->fx_r_type = r_type;
- also ifdef'ed I860.
-
- In write_object_file() after the relax segment calls the text alignment is
- forced to 32 byte alignment, the data and bss to 16 byte alignment. The
- code for text at line 316 is:
- /* Check/force alignment here! */
- #if defined(I860)
- text_siz = (text_siz + 0x1F) & (~0x1F);/* Keep 32 byte alignment (most
- restrictive) */
- text_last_frag->fr_address = text_siz; /* and pad the last fragment.*/
- #endif
- for data at line 388 is:
- #if defined(I860)
- data_siz += (16 - (data_siz % 16)) % 16; /* Pad data seg to
- preserve alignment */
- data_last_frag->fr_address = data_siz; /* to quad-word
- boundries */
- #endif
- and for bss at line 361 is:
- #if defined(I860)
- local_bss_counter=(local_bss_counter+0xF)&(~0xF); /* Pad BSS to
- preserve alignment */
- #endif
-
- The call to fix_new() in write_object_file() has an extra parameter added
- to it, NO_RELOC, which is ifdef'ed I860. At line 522:
- #if defined(I860)
- fix_new(lie->frag,lie->word_goes_here - lie->frag->fr_literal,2,
- lie->add,lie->sub,lie->addnum,0,NO_RELOC);
- #else
- fix_new(lie->frag,lie->word_goes_here - lie->frag->fr_literal,2,
- lie->add,lie->sub,lie->addnum,0);
- #endif
-
- In write_object_file() a bunch of checks were added. Just before emitting
- relocations at line 675:
- know(next_object_file_charP==
- (the_object_file+(N_TXTOFF(the_exec)+the_exec.a_text+the_exec.a_data)));
- Just before emiting the symbols at line 684:
- know(next_object_file_charP == (the_object_file + N_SYMOFF(the_exec)) );
- Just before emiting the strings at line 710:
- know(next_object_file_charP == (the_object_file + N_STROFF(the_exec)) );
-
- In fixup_segment() the switch statement for immediate displacement types for
- case 0 is ifdef'ed I860 with this change (at line 1209):
- #if defined(I860)
- fixP->fx_addnumber = add_number;
- /*
- * fixup_segment is expected to return a count of the number of
- * relocation_info structures needed for an object module.
- * Two specific relocation types encode only the high half
- * of an address, and so are followed by a second relocation_info
- * structure which encodes the low half. We allow for this
- * by bumping seg_reloc_count an extra time here.
- *
- * The extra item is generated in emit_relocations().
- */
- if ( fixP->fx_addsy &&
- (fixP->fx_r_type==RELOC_HIGH ||
- fixP->fx_r_type==RELOC_HIGHADJ))
- {
- ++seg_reloc_count;
- }
- md_number_to_imm (place, add_number, size,fixP,this_segment_type);
- #else
- md_number_to_imm (place, add_number, size);
- #endif
- and for case 1 the comment was added (at line 1232):
- case 1: /* Not used in i860 version */
-
- In emit_relocations() the following line was ifdef'ed in the other two were
- else'ed out (at line 1276):
- #if defined(I860)
- ri . r_type = fixP -> fx_r_type;
- #else /* I860 */
- /* These two 'cuz of NS32K */
- ri . r_bsr = fixP -> fx_bsr;
- ri . r_disp = fixP -> fx_im_disp;
- #endif /* I860 */
-
- In emit_relocations() at the end of the loop processing the fixS structures
- the following lines were added to handle split relocations (at line 1425):
- #if defined(I860)
- /* Whenever we have a relocation item using the high half of an
- * address, we also emit a relocation item describing the low
- * half of the address, so the linker can reconstruct the address
- * being relocated in a reasonable manner.
- *
- * We set r_extern to 0, so other apps won't try to use r_symbolnum
- * as a symbol table indice. We OR in some bits in bits 16-23 of
- * r_symbolnum so it is guaranteed to be outside the range we use
- * for non-external types to denote what segment the relocation is in.
- */
- if ( fixP->fx_r_type == RELOC_HIGH ||
- fixP->fx_r_type == RELOC_HIGHADJ )
- {
- ri.r_length = nbytes_r_length [fixP->fx_size];
- ri.r_pcrel = fixP->fx_pcrel;
- ri.r_address = fixP -> fx_frag->fr_address + fixP->fx_where
- - segment_address_in_file;
- ri.r_extern = 0;
- ri.r_type = RELOC_PAIR;
- /* Hide the low half of the addr in r_symbolnum. More
- overloading...*/
- ri.r_symbolnum = (fixP->fx_addnumber & 0xFFFF) | 0x7F0000;
- md_ri_to_chars((char *) &ri, ri);
- append(&next_object_file_charP, (char *)&ri,
- (unsigned long)sizeof(ri));
- }
- #endif
-
- --- Changes made to do the merges of 1.36 and i860 versions ---
- - Removed the cpp macro "error" which was set on the compiler line to
- -Derror=as_fatal and changed the 4 uses in hash.c, xmalloc.c and xrealloc.c
- to just use as_fatal.
- - Added the cpp macro M68K for 68k specific ifdef that are needed (like in
- Mach-O.c). This is instead of the "default case" without a target processor
- macro meaning that it is the 68k case. This is set in the Makefile as the
- target processor that the assembler is for in the make macro COPTS.
- - Changed the only use of the cpp macro CROSS in output-file.c to use NeXT to
- get rid of this macro. The line of code that is ifdef'ed is is the unlink of
- "name" in output_file_create().
- - Removed a.out.h and letting the one in ../include get used which is a merge
- of the original and includes NeXT's files (nlist.h and reloc.h).
- - Removed the file atom.c since Mach-O.c replaces it (also removed all the
- code in write.c that used it).
- - Removed all machine specific files except for the target processors that
- NeXT uses. The remaining code that used this stuff has been ifdef'ed where
- needed to preserved the code in the files we use.
- - Removed the files gdb.c, gdb-file.c, gdb-symbols.c, gdb-blocks.c and
- gdb-lines.c and ifdef'ed DONTDEF the code in as.c, read.c and write.c that
- used this stuff since the GNU 1.36 version of GAS did the same.
- - Removed the files m-68k.h, m-sun3.h, m-hpux and m-generic and ifndef'ed the
- include of m-68k.h out of m-68k.c.
- - Removed the files atof-m68k.c atof-m68k-assist.s since they are no longer
- used (see the change below for the -27 compiler release). And replaced the
- the file atof-m68k.c with the 1.36 atof-ieee.c .
-
- The 2.0 Release (the -32 compiler release)
-
- Changes for the Warp ?? release (the -27 compiler release):
- - Fixed m68_ip() to handle hex immediate operands to floating point insn's.
- Now fadds #0xffffffff,fp0 works correctly. The fix only works for .s, not
- for .d or .x. This orignally worked, but was broken by NeXT's mods to
- atof-m68k.c. (mself)
- - Added new 68040 floating-point instructions to m68k-opcode.h (mself)
- - Changed the name of the the section generated by the .objc_selector_refs
- directive from __selector_refs to __message_refs and set the flags field of
- this section to S_LITERAL_POINTERS. This change requires a link editor that
- knows how to handle a S_LITERAL_POINTERS section.
- - Changed m68k.c to use the reguar atof (actually strtod) instead of using
- atof-m68k.c and atof-m68k-assist.s, since these instructions will be
- emulated on th '040. (mself)
-
- Changes for the Warp ?? release (the -26 compiler release):
- - Added the file Mach-O.c and the ablity to have a subset of a fixed number of
- sections. All changes ifdef'ed MACH_O. This removes atom.c (ifdef'ed out).
- New sections include const, literal4, literal8, 11 new objc sections, etc.
- Basicly a lot of changes.
-
- Changes for the Warp 3 (OS update) release (the -25 compiler release):
- - Added scattered relocation entries to the assembler in emit_relocation() in
- write.c (see extensive comments in there and in <reloc.h>).
- - Changed fixup_segment() in write.c and md_estimate_size_before_relax() in
- m68k.c to make branches to lables that persist on output to be long in length
- and have a relocation entry (to make scattered loading in the link editor
- work). This was done by using the value of 3 in fx_pcrel (see the comment in
- write.h) for force this to happen.
-
- Changes for the Warp ?? release (the -24 compiler release):
- - Fixed the bug that would not assemble the following instruction:
- L2:movl #1,@(_down:l,d7:l:4)
- The fix was a bug in the macro use in m68k.c for add_fix() which the macro
- did not put ()'s around it's arguments (bugs 5207 and 5270).
- - Fixed the bug with cpp processed assembler files (bug 4280). The new syntax
- of the cpp output now includes an optional number after the file name, for
- example: `# 1 "x.c" 2' the 2 is the new number. This was done by changing
- the routine s_file() in read.c which recognizes the .file directive (that the
- assembler's preprecessor inserts) to optionally recognize this new number.
- - Changed the section alignment of the text section to 2 byte alignment so that
- scattered loading will work (the branch table of the shlibs will not move).
-
- Changes for the 2.0 impulse X.X release (the -23 compiler release):
- - Now is linked with libsys.
-
- Changes for the 2.0 impulse X.X release (the -22 compiler release):
- - Allow symbol names to appear in ""'s . This is so that the symbol names for
- methods can be "+[Class(category) method:name:]" and tools will not have to
- go through the objective-C section to get these names. Changes how
- get_symbol_end() works and how the callers of it use it.
-
- Changes for the 2.0 impulse X.X release (the -19 compiler release):
- - as is no longer installed as as-<version_number> to match the rest of the
- project.
- - Updated atom.c to the changes to CPU_TYPE and CPU_SUBTYPE with the changes to
- <sys/machine.h>
-
- Changes for the 0.91 release (the -10 compiler release):
- * s.stone fixed a bug in `#APP', `#NO_APP' that affected read.c & strstr.c.
- + Fixed a bug in converting to Mach-O object files with the new sections
- for the objective-C runtime. The bug was if a local relocation item refered
- to a symbol plus an offset the incorrect section number could be assigned if
- the value of the symbol plus offset was in a different section than the value
- of the symbol. This is an un fixable bug in atom(1) but fixed in here by
- moving the assignment of the section number into the r_symbolnum field into
- the assembler and using just the symbol's value (not plus the offset) to pick
- the section number. The fix is in write.c in emit_relocation() (plus a call
- to a new function get_objc_section_bounds() before calling emit_relocation).
- + Fixed a bug where a file had no symbols and the result was a Mach-O file.
- What would happen was a 4 (the size of the string table) was written at offset
- 0 in the output file (overwriting the magic number). Also did some major
- clean up of atom.c and removed all the garbage that did not apply (about half
- of what was there).
- + Added the .reference pseudo op to read.c. This was added for the new
- objective-C runtime to use so that archive semantaic could be maintained but
- no globals (that 'C' could use) are created.
- + Fixed the exponent overflow handling in atof-m68k.c to not print a warning
- (ifdef NeXT) and to get the right answer (a bzero of the 'words' as added,
- and corrected the reversed sign for infinities).
-
- New notes go at the TOP of this file.
-