home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Source / GNU / cctools / as / notes < prev    next >
Encoding:
Text File  |  1993-02-05  |  65.0 KB  |  1,235 lines

  1. Known bugs:
  2. - The m88k instruction "tb0 0,r0,undef" trashes the instruction because of
  3.   the undefined.
  4. - "0: jmp 0b" does not work, 0 is the problem in the 0b (1-9 work).
  5. - 68k does not handle packed immediates (the tables have been changed to dis-
  6.   allow this) because there is no routine to convert a flonum to a 68k packed
  7.   form.
  8. - The logical operators && and || are not implemented.
  9.  
  10. To do:
  11. - Mark the instructions that are 601 specific (book IV) and registers with
  12.   /* 601 only */ comments on them and flag as an error unless
  13.   -force_cpusubtype_ALL is specified.
  14.  
  15. Changes for the 3.1 release (the cctools-20 release):
  16. - Fixed a bug for the m98k that did not correctly check for too few parameters.
  17.   Two bugs here one in calcomp that was testing != NONE which should have been
  18.   == NONE and a bug in md_assemble in advanceing past the '+' or '-' when it
  19.   did not exist and there was nothing but a '\0' after the op it advanced past
  20.   it.
  21.  
  22. Changes for the 3.1 release (the cctools-16 release):
  23. - Fixed a bug with the m98k opcodes for stwcx. stdcx. where bit 0 was not set
  24.   to a 1.
  25. - Changed the following instructions so that for the SH field the value 32 (or
  26.   64) assembles as 0: rldicl rldicl.  rldicr rldicr.  rldic rldic.  rldimi
  27.   rldimi.  rlwinm rlwinm.  rlwimi rlwimi.
  28. - Fixed a bug in the m98k assembler where the value of exprressions which was
  29.   exactly (1 << width) was not treated as an error (4 places > was changed to
  30.   >= in m98k.c).
  31.  
  32. Changes for the 3.1 release (the cctools-15 release):
  33. - Moved the m88k and m98k to be install in /usr/local/lib not /lib.
  34. - Fixed a bug in the m98k assembler that did not detect instructions with too
  35.   many parameters.
  36. - Added macros and register names for batX[ul] the same as ibatX[ul] since the
  37.   601 does not have split i and d for these.
  38. - Changed the m98k instruction's "icbi" first paramenter to G0REG from GREG.
  39. - Back out the below fix and added new code in try_to_make_absolute() that
  40.   walked the frags between the the symbols L0 and L1 to calculate the absolute
  41.   value.
  42. - Fixed a bug where the expression L1-L0 was not coming up right when it had a
  43.   .align between L0 and L1.  A hack was removed from try_to_make_absolute() in
  44.   expr.c that had the code ifdef out that was trying to say the expresion could 
  45.   change due to relaxation.  The the routine s_align() in read.c was ifdef
  46.   RISC to do the alignment instead of creating an align frag.
  47.  
  48. Changes for the 3.1 release (the cctools-14 release):
  49. - Added a form of fcmpu and fcmpo that takes a crX as it's first argument.
  50. - Added the opcodes for tlbiex (31,338) and tlbia (31,370).
  51. - Fixed a bug in the m68k assembler where the code to handle implementation
  52.   specific instructions had || in two places where && was supposed to be.
  53.   The change was on lines 2693 and 2706 in md_assemble() in m68k.c .
  54. - Changed the m98k instructions: lwarx, ldarx, stwcx. and stdcx. second arg from
  55.   GREG to G0REG.
  56. - Fixed the Makefile to install the m98k assembler it built.
  57.  
  58. Changes for the 3.1 release (the cctools-13 release):
  59. - Added the m98k (PowerPC) architecture.
  60.  
  61. Changes for the 3.1 release (the cctools-10 release):
  62. - Changed the default .include directories to /NextDeveloper/Headers and
  63.   /LocalDeveloper/Headers in as.c and made them work (the default never
  64.   worked).
  65. - Corrected the following table entries for i386 floating point instructions
  66.   which had a FloatD or'ed into them which was wrong: faddp, fmulp.
  67. - Fixed a bug that caused an error message that a segment override was specified
  68.   more than once for string instructions for the i386.  The fix was in i386.c
  69.   where i.seg was need to be set to zero after the string instruction operands
  70.   were parsed (bug #29867).
  71. - Fixed the assembler driver /bin/as to take machine specific architecture
  72.   flags and run the family architecture named assembler.  So "as -arch m68040"
  73.   will run /lib/m68k/as and not /lib/m68040/as.
  74. - Changed the handling of the cpusubtypes to support this design:
  75.     The design allows each architecture family (m68k, m88k, i386) to have a
  76.     cpusubtype that will run on all implementations of that architecture and
  77.     have cpusubtypes that will run only on specific implementations of an
  78.     architecture.  The design also gives the programmer the option to force the
  79.     cpusubtype indicating all implementations (at build time with a flag) when
  80.     using instructions that are implementation specific leaving it up to the
  81.     program to runtime select the correct code to execute.
  82.   The assemblers implementation of this design is:
  83.     By default the assembler will produce the cpusubtype ALL for the object file
  84.     it is assembling if it finds no implementation specific instructions.  Again
  85.     by default the assembler will allow implementation specific instructions for
  86.     implementations and combine the cpusubtype for those specific
  87.     implementations.  The combining of specific implementations is architecture
  88.     dependent and may not be allowed for some architectures and are flagged as
  89.     an error.  With the optional -force_cpusubtype_ALL flag all instructions
  90.     are allowed and the object file's cpusubtype will be ALL.
  91.     If an -arch flag for a specific implementation (ie. -arch m68040 or -arch
  92.     i586) is used the assembler will flag as errors instructions that are not
  93.     supported on that architecture and produce the cpusubtype for that specific
  94.     implementation in the object file (even if no specific instructions are
  95.     used).
  96.   This effected as.c, as.h, Mach-O.c, m68k.c, m68k-opcode.h, i386.c, i386.h, and
  97.   i386-opcode.h.  The m88k and i860 assemblers had no machine specific
  98.   modifications.
  99.  
  100. Changes for the 3.1 release (the cctools-9 release):
  101. - Fixed a bug that caused the .include feature to fail in some cases.  The value
  102.   of the stuff saved by save_scrub_context() in app.c was not reset which caused
  103.   the app preprecessor to start parsing the included file and think it was in
  104.   the case of a string.
  105.  
  106. Changes for the 3.1 release (the cctools-8 release):
  107. - Fixed a bug the did not cause m68k floating point branchs to undefined symbols
  108.   to have relocation entries that make it to the object file to work with
  109.   scattered loading.  On line 3299 in m68k.c was:
  110.     fix_new(fragP,(int)(fragP->fr_fix),4,fragP->fr_symbol,
  111.         (symbolS *)0,fragP->fr_offset+4,1);
  112.   changed to:
  113.     fix_new(fragP,(int)(fragP->fr_fix),4,fragP->fr_symbol,
  114.         (symbolS *)0,fragP->fr_offset+4,1+2);
  115. - Fixed a bug in the i386 assembler for these two instructions where the segment
  116.   override did not get picked up from:
  117.     mov    %eax,%gs:sr_mem_offset
  118.     jmp    %gs:sr_mem_offset
  119.   The first is bug #29555 the second is just another form of the same logic bug
  120.   in another place.  There maybe more of this same logic bug.  The fixes are in
  121.   i386.c in md_assemble() when putting out the opcode.
  122. - Fixed a bug in the string instructions where segment overrides in the operand
  123.   fields were not picked up.  To do this the kludge that ignored the operands
  124.   of string instructions had to be removed as special case table entries and
  125.   matching checking had to be added (bug #26409).
  126. - Fixed a bug in the i386 assembler where the invlpg instruction did not take
  127.   a Mem operand (it was Mem32).  The fix was in the table entry for invlpg in
  128.   i386-opcode.h (change requested by the Lono group).  The manual is confusing
  129.   on this instruction.
  130. - Fixed a bug in the i386 assembler where a call or jmp instruction to an
  131.   absolute address was not getting put out pc relitive and no relocation entry
  132.   was produced (line 1050 and line 1155 in i386.c).
  133. - Fixed the problem of getting alignment correct for .align directives that are
  134.   greater than the default alignment.  This effected the struct frchain in
  135.   subsegs.h, the routine set_section_align() in Mach-O.c and the routine
  136.   write_object_file() in write.c and the initialization of the new field in
  137.   subsegs.c (bug #29432).
  138. - Changed the I386 bound instruction such that the parameters are consistant
  139.   with gas (reversed them).  Also fixed the boundw so it only put out one '0x66'
  140.   data16 prefix byte.
  141. - Fixed a bug for the I386 that padded the text section with zeros (changed to
  142.   pad with nops) in write.c.
  143. - Added the wait (0x9b) prefix to the following instructions: "finit", "fstcw",
  144.   "fstsw", "fclex", "fstenv" and "fsave" the "XnXXX" form does not have the
  145.   wait prefix.
  146. - Added "fucom" as an alias for "fucom %st(1)"
  147. - Added "fucomp" as an alias for "fucomp %st(1)"
  148.  
  149. Changes for the 3.1 release (the cctools-7 release):
  150. - Added the i486 and i586 specific stuff to i386-opcode.h (bug #27475).  The
  151.   changes are ifdef'ed i486 and i586 and these are turned in in the Makefile.
  152.   Also the define STRICT_i586 is ifdef'ed (but not defined) where the i586 does
  153.   not allow certian things (test register instructions).
  154. - Fixed a bug in md_assemble() in i386.c where the instruction "mov %ah,%al"
  155.   would assemble wrong.  The problem was when the suffix was selected based
  156.   on the register type the "i.types[o]" needed to and'ed with `Reg' because
  157.   %al and %ax have `Acc' in their types and they were coming up with a 'l'
  158.   suffix.  This is ifdefed NeXT.
  159. - Fixed a bug in m68k_reg_parse() in m68k.c where the registers "ic", dc" and
  160.   "bc" were incorrectly parsed because of an "if (c2 = 'c')" (bug #27954).
  161. - Added an ifdef CHECK_WORD_IMMEDIATES in m68k.c and code to make checking of
  162.   16-bit immediates consistant in the m68k assembler (bug #26863).  Also to make
  163.   this work the "link" (no suffix) for an immediate word entry in m68k-opcode.h
  164.   had a new "place" character created for it (#z for #w) and code was added to
  165.   m68k.c to handle it.  The define CHECK_WORD_IMMEDIATES is left off to cause
  166.   truncation of too large immediate words.
  167. - Fixed a bug that did not allow -arch and -arch_multiple (as.c).  This was
  168.   put in to the NRW cctools-6 but not into lono's.
  169.  
  170. Changes for the 3.1 release (the cctools-6 release):
  171. - Added the -arch_multiple flag that will cause one line to printed before all
  172.   error messages which will contain the architecture name.
  173. - Fixed the m88k pmul and punpk instructions where the last register is not
  174.   required to be an even register.
  175. - Fixed a bug in atof-ieee.c in gen_to_words() that did not round IEEE denorms
  176.   correctly and caused the smallest denorm to become zero (bug #23178).
  177.  
  178. Changes for the 3.1 release (the cctools-5 release):
  179. - Picked up the lono team's cctools-4_2 i386-opcode.h .
  180. - Added the pseudo op for the m88k assembler ".dot symbol" that sets the value
  181.   of the location counter into the value of the symbol.
  182. - Removed the trnc.x mnemonic as it is not legal "trnc.sx" is the correct form
  183.   which remains in m88k-opcode.h
  184.  { 0x8400d900, "trnc.x",      { {21,5,REG},      {0,5,XREG},   {0,0,NIL}   } },
  185.  
  186. Changes for the 3.1 release (the cctools-4 release):
  187. - Fixed a bug in parse_cst() in m88k.c that did not allow expressions for
  188.   constant operands.  This bug was found with "tb0 0,r0,(129)" where the
  189.   ()'s caused the problem. (bug #21052)
  190. - Changed installing the i386 assembler into /lib/i386/as from ix86 (and changed
  191.   the -arch name to i386).
  192. - Changed CPU_TYPE_I80x86 to CPU_TYPE_I386 in Mach-O.c
  193. - Picked up the changes for the i386 assembler to allow scattered loading from
  194.   the lono team.
  195.  
  196. Changes for the 3.0 release (the -57 compiler release)
  197. - Removed the following opcodes from m88k-opcode.h as siff(1) and the newest
  198.   110 manual says they are not valid.
  199.  { 0X840008A0, "fcvt.dd",     { {21,5,REG},      {0,5,REG},    {0,0,NIL}   } },
  200.  { 0X840088A0, "fcvt.dd",     { {21,5,XREG},     {0,5,XREG},   {0,0,NIL}   } },
  201.  { 0X84000800, "fcvt.ss",     { {21,5,REG},      {0,5,REG},    {0,0,NIL}   } },
  202.  { 0X84008800, "fcvt.ss",     { {21,5,XREG},     {0,5,XREG},   {0,0,NIL}   } },
  203.  { 0X84000800, "fcvt.ss",     { {21,5,REG},      {0,5,REG},    {0,0,NIL}   } },
  204.  { 0X84008800, "fcvt.ss",     { {21,5,XREG},     {0,5,XREG},   {0,0,NIL}   } },
  205.   (bug #20021)
  206. - Fixed a bug introduced with the change of the SUB_SEGMENT_ALIGN.  It turns
  207.   out it broke the objective-C runtime that assumed that the __protocol section
  208.   (amoung others) can be indexed like an array of structs which are not
  209.   multiples of 8 bytes.  The fix was to align all objective-C sections to 4
  210.   bytes.  Again the change was in write_object_file() in write.c (bug #20022).
  211.  
  212. Changes for the 3.0 release (the -56 compiler release) (performance month):
  213. - Changed the order of the objective-C sections.  The message_refs and the
  214.   cls_refs section were switched.  The meta_cls_refs section was removed.
  215.   This change effected Mach-O.c, write.c and read.c.
  216. - Changed write_object_file() in write.c to used the normal subsegment
  217.   alignment:
  218.     #ifdef RISC
  219.     #define SUB_SEGMENT_ALIGN (3)
  220.     #else
  221.     #define SUB_SEGMENT_ALIGN (2)
  222.     #endif
  223.   and handle the literal pointer sections special (by knowing their subsegment
  224.   values).  This fixes a problem on the m88k where the const section had a
  225.   .align 3 directive but started on a align of 2 boundary.  This still has
  226.   the problem if a section has an align greater 3 the data in the output file
  227.   will end up aligned correctly but the section start will not resulting in
  228.   the link edited object to having the data not aligned correctly. (bug #19492)
  229.  
  230. Changes for the 3.0 release (the -55 compiler release) (performance month):
  231. - Changed the Makefile to install the driver in /usr/local/bin and the 68k
  232.   assembler in /bin/as and all other assemblers in /usr/local/lib/* .
  233. - Changed the as driver (driver.c) to look in /lib and in /usr/local/lib for
  234.   assemblers.
  235. - Changed the order of the objective-C setions to:
  236.     2  (__OBJC,__class)
  237.     3  (__OBJC,__meta_class)
  238.     4  (__OBJC,__string_object)
  239.     5  (__OBJC,__protocol)
  240.     6  (__OBJC,__cat_cls_meth)
  241.     7  (__OBJC,__cat_inst_meth)
  242.     8  (__OBJC,__cls_meth)
  243.     9  (__OBJC,__inst_meth)
  244.     10 (__OBJC,__cls_refs)
  245.     11 (__OBJC,__meta_cls_refs)
  246.     12 (__OBJC,__message_refs)
  247.     13 (__OBJC,__class_names)
  248.     14 (__OBJC,__module_info)
  249.     15 (__OBJC,__symbols)
  250.     16 (__OBJC,__category)
  251.     17 (__OBJC,__meth_var_types)
  252.     18 (__OBJC,__class_vars)
  253.     19 (__OBJC,__instance_vars)
  254.     20 (__OBJC,__meth_var_names)
  255.     21 (__OBJC,__selector_strs)
  256.   Also the special casing of the objective-C section in determing to created a
  257.   scatter or non-scattered relocation entry was removed for all but the
  258.   (__OBJC,__selector_strs) section.  The directive ".objc_selector_refs"
  259.   is still there and the cc-55 compiler will be changed to use the correct
  260.   directive ".objc_message_refs" and then this can be removed.  These changes
  261.   effected read.c and Mach-O.c
  262.  
  263. Changes for the 3.0 release (the -54 compiler release) (performance fortnight):
  264. - Added three string sections to the Objective-C segment:
  265.     .objc_class_names,    __OBJC __class_names
  266.     .objc_meth_var_names,    __OBJC __meth_var_names
  267.     .objc_meth_var_types,    __OBJC __meth_var_types
  268.   This effected read.c and Mach-O.c.
  269. - Added the following lines to i386-opcode.h at the request of the lono guys:
  270.     {"repz", 0, 0xf3, _, NoModrm, 0, 0, 0},
  271.     { "repnz", 0, 0xf2, _, NoModrm, 0, 0, 0},
  272.   Plus allow .word on the ix86 (ifdef added in read.c).
  273. - Added const to lex_type, is_end_of_line, potable in read.c to make read-only.
  274. - Added const to op_encoding in expr.c to make read-only.
  275. - Added const to m68k_opcodes and endop in m68k-opcode.h to make read-only.
  276. - Changed in_buf in input-file.c to allways be malloc()'ed.
  277. - Added const to the Makefile for the next_version.c echo line.
  278.  
  279. Changes for the 3.0 release (the -51 compiler release):
  280. - Changed Mach-O.c to pad out the string table to a multiple of 4 and set the
  281.   padded bytes to '\0'.
  282.  
  283. Changes for the 3.0 release (the -50 compiler release):
  284. - Changed the instructions f[sd]sqrtx for operands FPm,FPn and FPm to f[sd]sqrt
  285.   (without the trailing 'x').  This was just wrong (but the moto opcode is
  286.   inconsistant with all others in this case).
  287. - Fixed a bug in the fsincos instruction where the FPc and FPs registers were
  288.   switched in the instruction.
  289. - Changed the order of the objective-C classes to:
  290. __class        - always written on
  291. __meta_class    - always written on
  292. __string_object    - always written on
  293. __protocol    - always written on
  294. __cls_meth    - sometimes written on
  295. __inst_meth    - sometimes written on
  296. __cat_cls_meth    - sometimes written on <these will not be used soon>
  297. __cat_inst_meth    - sometimes written on <these will not be used soon>
  298. __cls_refs    - sometimes written on (uniqued) <these are not used now>
  299. __meta_cls_refs    - sometimes written on (uniqued) <these are not used now>
  300. __message_refs    - sometimes written on (uniqued)
  301. __symbols    - never written on
  302. __category    - never written on
  303. __class_vars    - never written on
  304. __instance_vars    - never written on
  305. __module_info    - never written on
  306. __selector_strs    - never written on (uniqued)
  307.   The six sections starting from the __string_object section were effected.
  308.   The change was made in read.c and Mach-O.c .
  309.  
  310. Changes for the 3.0 release (the -49 compiler release):
  311. - Fixed a bug where the assembler was padding literal pointer sections with a
  312.   zero for RISC machines and causing the link editor to complain.  The fix was
  313.   to change the macro SUB_SEGMENT_ALIGN from 3 to 2 in write.c and to set the
  314.   alignment of S_LITERAL_POINTER sections in Mach_O.c to 2.
  315. - Fixed the passing and using of RC_CFLAGS correctly in the Makefile.
  316.  
  317. Changes for the 3.0 release (the -49 compiler release):
  318. - Changed the Makefile to meet the RC api.
  319.  
  320. Changes for the 3.0 release (the -47 compiler release):
  321. - Added the missing 040 "ptest[rw] An@" instructions.
  322. - Changed the constant CPU_TYPE_I386 to CPU_TYPE_I80x86 to match header file.
  323. - Changed the behavior so if warning message is produced (with as_warn()) that
  324.   an object is not produced.  The change was in as_warn() in messages.c and is
  325.   ifdef'ed NeXT which sets bad_error to 1 just like as_bad(). (bug #16137 and
  326.   #16044)
  327. - Added the (__OBJC,__string_object) section with the directive
  328.   .objc_string_object (read.c and Mach-O.c where changed).
  329.  
  330. Changes for the 3.0 release (the -44 compiler release):
  331. - Created an assembler driver to be placed in /bin/as and the assemblers are
  332.   then moved to /lib/<arch_flag>/as .   The Makefile was updated to build and
  333.   install this way.  as.c was changed to take "-arch <arch_flag>" and check it
  334.   against the type of assembler it is.
  335. - Switch over to the new header file organization.
  336.  
  337. Changes for the 3.0 release (the -43 compiler release):
  338. - Changed the Makefile to install the i860 assembler in /usr/local/bin/as860 .
  339. - Picked up md.h from 1.38.1 which added const to md_pseudo_table and
  340.   md_relax_table so i860.c, m68k.c and m88k.c were all updated as were the
  341.   uses in read.c and write.c.
  342. - Picked up the files: i386.c, i386.h and i386-opcode.h from the 1.38.1 release.
  343.  
  344. Changes for the 3.0 release (the -39 compiler release):
  345. - Fixed so that strings can have characters with the 8th bit set in them. This
  346.   involved adding the lines in next_char_of_string() in read.c:
  347.     #ifdef NeXT /* allow 8 bit chars in strings */
  348.       c = (c & MASK_CHAR); /* to make sure the 0xff char is not returned as -1*/
  349.     #endif NeXT
  350.   so that the high bit does not get sign extened and the -1 return code that is
  351.   tested for at the call sites as >= 0 is not tripped over.
  352.   Second changed all 8th bit set chars in lex_type[] in read.c to be allowed in
  353.   names.  Also had to change the macros in read.h
  354.     #define is_name_beginner(c)     ( lex_type[(c) & 0xff] & LEX_BEGIN_NAME )
  355.     #define is_part_of_name(c)      ( lex_type[(c) & 0xff] & LEX_NAME       )
  356.   to add the "& 0xff" because of the sign extension of chars (bug #15597).
  357.  
  358. Changes for the 3.0 release (the -37 compiler release):
  359. - Fixed the relocation entries for the 88k so that 88k objects can be scatter
  360.   loaded by the link editor.  This involves adding a PAIR relocation entry for
  361.   the LO16 type (as well as having one for the HI16 type) and moving the place
  362.   in the relocation entry where the other half of the relocatable expression is
  363.   store from the r_symbolnum field to the r_address field (so that a scattered
  364.   relocation can be used, since it does not have an r_symbolnum field).  Also
  365.   removed all support for signed immediates on the 88110 since NeXT will not
  366.   use this feature.  Also to be consistant the i860's PAIR's will also use the
  367.   r_address field even though they will not use scattered relocation entries.
  368.   These changes were made in Mach-O.c .
  369.   Also required forcing relocation entries for non-local labels for 88k branch
  370.   instructions which was done with the same kludge as the 68k by setting the
  371.   0x2 bit in the fx_pcrel fix structure when it is created in m88k.c in
  372.   md_assemble().  This also required an extra ifdef M68k in Mach-O.c in 
  373.   fix_to_relocation_info() when choosing to put out a scattered relocation
  374.   entry because of the way 68 branch instructions work.
  375.  
  376. Changes for the 3.0 release (the -36f compiler release):
  377. - Fixed a bug that did not catch a bit field expression error between the <>'s.
  378.   A check for the trailing '<' was missing.  This was added in parse_bf() in 
  379.   m88k.c .
  380. - Fixed the .abs directive for 88k registers.  The fix was for it to handle
  381.   scaled register expressions and also not generate an undefined symbol for the
  382.   register name "U r1".  The changes were to m88k.c adding s_m88k_abs() for the
  383.   .abs pseudo-op and to read.c to leave s_abs() but to ifdef it out of the
  384.   table for the 88k as s_m88k_abs() uses s_abs().
  385. - Corrected the lex_type table in read.c to not allow the character '[' as
  386.   part of a name.
  387. - Added '@' as a statement separator for the 88k (change the "# <line> <file>
  388.   <level>" stuff to use it when generating ".line <line> @ .file <file>" ).
  389.   Changed app.c and read.c ifdef'ed M88K.  Also s_reg(), s_scaled() and
  390.   no_delay() in m88k.c also need this because they can't use the macros in
  391.   read.c .
  392. - Added the .no_delay 88k pseudo-op.  Changed m88k.c and m88k-opcode.h to add
  393.   the delay_slot field to the instruction table and a static variable,
  394.   in_delay_slot, that gets set each time an instruction is assembled.
  395. - Fixed a bug not allowing macro names to start with '.' .  The fix was in
  396.   read.c in parse_a_buffer() right before it detects an unknown pseudo-op.
  397.   Also change it so the unknown pseudo-op is printed when an error happens.
  398.   Also changed s_macro() in read.c to print a warning if a known pseudo-op name
  399.   is used a macro name.
  400.  
  401. Changes for the 3.0 release (the -36e compiler release):
  402. - Fixed a bug where the operand "pc@" did not assemble correctly.  The fix was
  403.   in m68_ip() in m68k.c on linr 1604 for the "case AINDR" which can be set with
  404.   PC in the opP->reg.  In this case the mode pc@(d16) is used.  This is ifdef'ed
  405.   NeXT.
  406. - Fixed a bug where "foo :" did not recognize "foo" as a label.  The fix was in
  407.   app.c in do_scrub_begin() where the line:
  408.     lex [':'] |= LEX_IS_LINE_SEPERATOR;
  409.   was ifdef'ed out since ':' did not work.  But ...  This DOES not cause ':' to
  410.   be a LINE SEPERATOR but does make the second if logic after flushchar: in
  411.   do_scrub_next_char() to handle "foo :" and strip the blanks.  This is the way
  412.   has always been and must be this way to work.
  413.  
  414. Changes for the 3.0 release (the -36d compiler release):
  415. - Fixed a bug in the 88k assember that did not handle "# <line> <file> <level>"
  416.   comments correctly because it uses ";" which is a comment and the .file gets
  417.   ignored.  The fix was ugly.  The change was to app.c and read.c ifdef'ed M88K
  418.   to allow '\001' as a statement seporator (CHANGED IN -36f see above).
  419. - Changed the marking of literal sections from not marking them for RISC to
  420.   not marking them for only the I860.  This change is since the 88k compiler
  421.   will ALLWAYS make a 32 bit reference to an item and leave it to the link
  422.   editor to find ways to make 16 bit references these sections can marked for
  423.   uniqueing for the 88k.
  424. - Added the following directives for the following new sections:
  425.     .constructor for __TEXT, __constructor
  426.     .destructor for __TEXT, __destructor
  427.     .objc_protocol for __OBJC, __protocol
  428.     .objc_cls_refs for __OBJC, __cls_refs (S_LITERAL_POINTERS)
  429.     .objc_meta_cls_refs for __OBJC, __meta_cls_refs (S_LITERAL_POINTERS)
  430.  
  431. Changes for the 3.0 release (the -36c compiler release):
  432. - Fixed a bug involving expressions with unknown symbols for operators other
  433.   than '+' or '-'.  The problem is that in expr() in expr.c if an expression
  434.   operator is something other than '+' or '-' then it sets the need_pass_2
  435.   flag and no other "frags" (bytes of output) are generated.  You would think
  436.   it would want to run another pass but the code doesn't do that (major bug)!
  437.   So now it just does what it would in the case the symbol is known which is
  438.   report the expression can't be relocated.
  439. - Fixed m88k.c to use LO16 relocation types not LO16EXT types.
  440.  
  441. Changes for the 3.0 release (the -36b compiler release):
  442. - Added the m88k directive .scaled as requested by the OS group.
  443. - Allow expressions for the bit number, parse_cmp() like in bb0, condition
  444.   match, parse_cnd() like in bcnd, and even 4 bit rotation, parse_e4rot like
  445.   in prot.
  446.  
  447. Changes for the 3.0 release (the -36a compiler release):
  448. - Added the opcodes "illop[123]" as per the version 3.0 88110 spec.
  449. - Removed the "lda.b rD,rS1[rS2]" instruction and replaced that opcode with
  450.   "lda.x rD,rS1[rS2]" as per the version 3.0 88110 spec.
  451. - Corrected "nint.[sdx]" to be "nint.s[sdx]" and "int.[sdx]" to be "int.s[sdx]"
  452.   which was just wrong in the GNU assembler (trnc was previous corrected but
  453.   flaged as an 88110 versrion 3 change but that was incorrect as the assembler
  454.   was just wrong (even for the 88100)).
  455. - Corrected "mov.s xD,xS2" to be "mov xD,xS2" as per the version 3.0 88110 spec.
  456. - Removed the old (version 2.0 of the 88110) opcodes: "mov.t xrD,rD2" and
  457.   "mov.t rD,xrS2" which used blank instead of .s for single.
  458. - Removed the old (version 2.0 of the 88110) opcodes: "trnc.t rD,xrs2" and
  459.   "trnc.t rD,rS2" (where t is the type of the result) which used only the type
  460.   of the result and implied the .s for single.
  461. - Removed the "ppack.8.b", "ppack.8.h", and "ppack.16.b" opcodes from the m88k
  462.   opcode table.  These operations are undefined.
  463.  
  464. Changes for the 3.0 release (the -35 compiler release):
  465. - Fixed a bug in parse_bf() when expressions were added expressions that did
  466.   not start with a digit (for example a '(', '+', '-', '~' or '!') were not
  467.   recognized.
  468. - Changed the action for .abort to print the remaining line as part of the
  469.   error message.  Feature request by the OS group.
  470. - Added an option [,alignment] expression to the end of the .lcomm directive
  471.   which aligns the symbol to the power of 2 alignment expression (same as the
  472.   .align directive).  This is ifdef'ed NeXT in s_lcomm() in read.c .
  473. - Changed which directives are allowed on which machines
  474.     .word    68k and i860 only (machine specific) NOT 88k
  475.     .long    68k and i860 only NOT 88k
  476.     .quad    68k only
  477.     .octa    68k only
  478.     .float    68k and i860 only NOT 88k
  479.   These changes are in read.c, m68k.c and i860.c .  Feature request by the OS
  480.   group and removal of .quad and .octa for the i860 approved by the NeXT
  481.   Dimension group.
  482. - Added the directive .elseif .  This involed a bit of reworking the .if, .else
  483.   and .endif stuff in read.c .  Feature request by the OS group.
  484. - Fixed a bug that would allow you to use the macro in a macro definition
  485.   and cause the assember to core dump.  A limit, MAX_MACRO_DEPTH of 20, is
  486.   used to avoid this.
  487. - Added the directives .macros_on .macros_off.  This is to allow macros to be
  488.   turned off, which allows macros to override a machine instruction and still
  489.   use the machine instruction.  This is in read.c and toggles the variable 
  490.   macros_on in s_macros_on() and s_macros_off() which is tested in
  491.   parse_a_buffer().  Feature request by the OS group.
  492. - Added s_abs() in read.c to implement ".abs symbol,exp" which set symbol to 1
  493.   or 0 depending on if the expression is an absolute expression.  This is
  494.   intended for use in macros.  Feature request by the OS group.
  495. - Added s_reg() to m88k.c to implement ".greg symbol,exp" and ".xreg symbol,exp"
  496.   which set symbol to 1 or 0 depending on if the expression is a general
  497.   register or extended register respectfully.  These are intended for use in
  498.   macros.  Feature request by the OS group.
  499. - Added $n in expand_macro() in read.c to substitute the number of actual
  500.   arguments for the macro.  Feature request by the OS group.
  501. - Changed the code for setting the line separator's (character for multiple
  502.   statements on a line) in do_scrub_begin() in app.c .  The character '/'
  503.   tried to be a separator for the 88k but code down stream prevented it from
  504.   working so it was removed and the 88k does not allow multiple statements on
  505.   a line.  Also removed the NeXT ifdef for the ':' character which also did
  506.   not work.
  507.  
  508. Changes for the 3.0 release (the -34 compiler release):
  509. - Fixed a bug that for all floating-point branches it did not generate a
  510.   relocation entry.  The fix is in md_estimate_size_before_relax() in m68k.c
  511.   where the case of 'TAB(FBRANCH,SZ_UNDEF)' was not handled in the first
  512.   switch and code to generate the relocation entry (a call to add_fix) was
  513.   not done.  This is ifdef'ed NeXT.
  514. - Fixed a bug for branches that use displacements to absolute addresses which
  515.   produced a displacement off by -4.  This is ifdef'ed NeXT in m68_ip() in
  516.   m68k.c in the second main switch statement that sets the bits in the
  517.   instruction for the 'B' case.  There are two ifdef's, one for 'g' sub case
  518.   (normal branches) and one for the 'c' sub case (floating-point branches).
  519. - Disallow all floating-point packed immediates for the 68k assembler because
  520.   the gen_to_words() routine in atof-ieee.c does not produce the correct 68k
  521.   packed decimal format.  This simply disallows this but does not fix it.
  522.   So "fmovep #0r1.0,fp0" will no longer assemble instead of assemble wrong.
  523.   This is ifdef'ed PACKED_IMMEDIATE in m68k-opcode.h and m68k.c in m68_ip().
  524.   (internal bug #5)
  525. - Fixed a bug in the assembler which matched the "fmoveml #1,fpc" where the
  526.   immediate #1 cause an internal FATAL error because it can't decode the mode
  527.   "*s".  The fix is in m68_ip() in m68k.c where the case for 's' was ifdef'ed
  528.   NeXT in just like the long case.  This is legal but the instruction
  529.   "fmoveml #1,fpc/fpi" is not and the assembler STILL accepts it.
  530.   (internal bug #4).
  531. - Fixed a bug in the assembler which matched the "movec    sfc,#1" where the
  532.   immediate #1 cause an internal FATAL error because it can't decode the mode
  533.   "#j". The fix in m68_ip() in m68k.c in the loop to install the operand bits
  534.   for the '#' case was missing the second sub case for 'j' that check the
  535.   range of the value and installed the operand.  If the immediate is a variable
  536.   my guess this will still fail but in a different way.
  537.   (internal bug #3).
  538. - Fixed a bug that caused the assembler to call abort with no error message
  539.   when assembling "andiw #0x8001,fpir/fpcr/fpsr".  In get_num() in m68k.c
  540.   the case for a SEG_PASS1 was missing from the switch statement from the
  541.   type of the expression() call.  It was ifdef'ed NeXT in and handled like
  542.   SEG_UNKNOWN and a bunch of others that just print out it can't handle the
  543.   expression.
  544. STILL BROKEN!
  545.   (internal bug #2).
  546. - Fixed a bug that the operand of the form "zpc@(0)" was trying to use the
  547.   pc@(16) (AOFF) form which does not allow the base register to be suppressed
  548.   which is what zpc is.  So this now uses the pc@(bd,Xn) form (AINDX).  The
  549.   bug caused "zpc@(0)" to generate garbage, namely "d1".  The change is in 
  550.   m68k_ip_op() in m68k.c and ifdef'ed NeXT with a comment like above.
  551.   (internal bug #1).
  552. - Ifdef'ed out the turning operands into PC relative in m68_ip() in m68k.c (this
  553.   is a 1.36 feature) because it breaks scattered loading.
  554. - Fixed a bug in the 1.36 version of GAS where the table of fmovem instructions
  555.   were reordered.  See the comment in m68k-opcode.h with the header "REGISTER 
  556.   LIST BUG:".  The fix was to put the list back in the previous order.  There
  557.   is a design bug here that needs to be fixed.
  558. - Fixed a bug where the .align directives were not propagated into the section
  559.   headers of the object file.  A new routine, set_section_align() in Mach_O.c,
  560.   is called from s_align() in read.c .
  561. - Put the change in atof-ieee() in atof-ieee.c that creates infinities on
  562.   overflows.  This fixes bug #13409.
  563. - Picked up a change in i860_ip() in i860.c from the NDTools-6 version.
  564.   Having to do with constant offset alignments.
  565. - Added expressions to the width and <offset> bit field instructions.  Since the
  566.   parameter syntax is width<offset> and offset may be a two character 'cmp' bit
  567.   designator, the width expression may not contain the character '<' and the
  568.   offset expression must start with a digit.
  569. - Changed "mov.t xrD,rD2" and "mov.t rD,xrS2" to use .s for single instead
  570.   of blank. (version 3.0 of 88110 spec).
  571. - Changed "trnc.t rD,xrs2" and "trnc.t rD,rS2" (where t is the type of the 
  572.   result) to use .st where the s is for single and t is the type of the result.
  573.   (version 3.0 of 88110 spec).
  574. - Changed the pflusha instruction to pflusha030 and pflusha040 because there is
  575.   no way to tell them apart.
  576. - Added automatic creation of stabs for assembly code debugging with -g.  The
  577.   comment that explains in detail how this is done is in read_a_source_file()
  578.   in read.c, The other changes are in make_stab_for_symbol() in symbols.c,
  579.   s_include(), s_line() in read.c, and md_assemble() in m68k.c and m88k.c also
  580.   two static declarations were removed from input-scrub.c.  These changes are
  581.   marked with pairs of:
  582.     #ifdef NeXT    /* generate stabs for debugging assembly code */
  583.     ...
  584.     #endif NeXT    /* generate stabs for debugging assembly code */
  585. - Added the MMU instructions for the 030 and 040 (ifdef'ed BUILTIN_MMUS) and
  586.   turned off the m68851 define for that set of MMU instructions.  The reason to
  587.   turn it off is because of the register names it must recognize (see bug #7525
  588.   why we don't want to do this).  This change is not ifdef'ed NeXT because it
  589.   is very intertwined with the 68851 stuff.  Also with this change the "MMU
  590.   status register" correct name of "mmusr" was added but the old name of "psr"
  591.   was retained for compatiblity because of assembler code that might use it.
  592. - Added installsrc, installIBMsrc and installGNUsrc targets to the Makefile.
  593. - Bug #8331, feature request for hex immediate bit-patterns for floating-point
  594.   immediates.  Added the constant radix 0b... like 0x... except that it would be
  595.   assumed to be a "bignum" and then a binary bit pattern for a hex immediate.
  596.   This effected the routines operand() in expr.c, get_num() in m68k.c and
  597.   m68_ip() in m68k.c .  All of these are ifdef'ed NeXT with the comment
  598.   /* fix for bug #8331 */ .
  599. - Bug #13017, this is where ".fill x,3,x" would cause the assembler to call
  600.   abort because the repeat size is 3 bytes.  This is now dissallowed in s_fill()
  601.   in read.c and only repeat sizes of 0,1,2 and 4 are allowed.
  602. - Bug #11209,  this is where if the file system fills up or something and the
  603.   file can't be closed the object file was left and would confuse later
  604.   make(1)'s because the object file would be present but would then just hand
  605.   this off to the link editor and it would complain about a bad object file.
  606.   The fix in output_file_close() in output-file.c was to remove the file in this
  607.   case because it might be bad.
  608. - Bug #8920, where s file containing just "bra L1" would produce a bad object
  609.   file because the undefined local lable L1 was not defined is fixed.  The fix
  610.   is in write_object_file() in write.c (and one line in write_Mach_O() in
  611.   Mach-O.c to test bad_error).  The undefined local symbols are printed with an
  612.   error message in this case and then the object file is not written.
  613. - Bug #8918, where a line of the form "# 40 MP1 = M + 1" gets confused with a
  614.   line of the form "# 1 "hello.c" 1" and causes a bug that ignores the rest of
  615.   the file.  This was fixed in app.c when in state 4 (after putting out a .line,
  616.   put out digits) and then not finding an expected '"' for the name of the file
  617.   it ignores the rest of the line but forgets to set the state to 0 (begining of
  618.   a line).  This is ifdef'ed NeXT.
  619. - Bug #7525 (second part), where "bfffo d0{#2,#32},d1" would not work with the
  620.   field width of 32 is now fixed.  (I'm not sure exactly what the fix was it
  621.   probably came from the 1.36 version of GNU).
  622. - Bug #5384, where if a ".globl foo" precedes "foo=1" foo does not end up global
  623.   has been verfied to be fixed (I'm not sure exactly what the fix was it
  624.   probably came from the 1.36 version of GNU).
  625. - Changed the default alignment of sections to 3 (8) for RISC machines from 2
  626.   (4) in both write.c and MachO.c.
  627. - Print a warning for -R (make data text) to used .const and not put the data
  628.   in the text.
  629. - Cleaned up Mach-O.c and read.c by changing/adding message_refs where
  630.   selector_refs was used.
  631. --- Changes to merge in John Anderson's (DJA) version of GAS ---
  632. - added relational binary operators (<, ==, >, <= and >=) and modified the
  633.   precedence to conform to 'C'.  The code is marked with pairs of:
  634.     #ifdef NeXT    /* added relational ops, changed precedence to be same as C */
  635.     ...
  636.     #endif NeXT    /* added relational ops, changed precedence to be same as C */
  637.   and is contained in the file expr.c and is the DJA version with a few bug
  638.   fixes to make it work.  Found a logic bug when "<>" was used as an operator
  639.   it was recognized as a "<".  This "operator" appears in the WriteNow source
  640.   so I added "<>" as a form of "!=".
  641. - added logical negation unary operator (!).  The code is marked with pairs of:
  642.     #ifdef NeXT    /* logical negation feature */
  643.     ...
  644.     #endif NeXT    /* logical negation feature */
  645.   and is contained in the file expr.c and is exactly the DJA version.
  646. - added code to try to make expresions absolute.  The code is marked with
  647.   pairs of:
  648.     #ifdef NeXT    /* feature to try to make expressions absolute */
  649.     ...
  650.     #endif NeXT    /* feature to try to make expressions absolute */
  651.   and is contained in the files expr.c and m68k.c (the code is exactly the DJA
  652.   version).
  653. - added the .dump/.load feature (this is based on top of the .include and
  654.   .macro features).  The code is marked with pairs of:
  655.     #ifdef NeXT    /* the .dump/.load feature */
  656.     ...
  657.     #endif NeXT    /* the .dump/.load feature */
  658.   and is in read.c (and one line in symbols.c) and is the DJA version.  Fixed
  659.   a bug in write_symbol() in read.c where the symbol's n_type field needed to
  660.   be and'ed with the N_TYPE macro before checking for equal to N_ABS.
  661.   not checked
  662. - added the conditional assembly feature (pseudo ops .if .else .endif) and the
  663.   macro feature (pseudo ops .macro and .endmacro).  This is all contined read.c
  664.   and required a major rewrite of the main parsing routine read_a_source_file().
  665.   This was replaced by three routines read_a_source_file(), parse_a_buffer() and
  666.   parse_line_comment().  Since the their was no way to ifdef the old code it was
  667.   removed.  Where possible the conditional assembly feature code is marked with
  668.   pairs of:
  669.     #ifdef NeXT    /* the conditional assembly feature (.if, .else, and .endif) */
  670.     ...
  671.     #endif NeXT    /* the conditional assembly feature (.if, .else, and .endif) */
  672.   and the macro feature code is marked with pairs of:
  673.     #ifdef NeXT    /* the .macro feature */
  674.     ...
  675.     #endif NeXT    /* the .macro feature */
  676.   All of these changes are in read.c and except for the rewrite
  677.   read_a_source_file() the changes are the DJA version.
  678. - added the .include "filename" pseudo op.  This is marked with pairs of:
  679.     #ifdef NeXT    /* .include feature */
  680.     ...
  681.     #endif NeXT    /* .include feature */
  682.   the code in in read.c, as.c, app.c, as.h and input-scrub.c.  Except for the
  683.   code in app.c and the typedef scrub_context_data in as.h (related to the
  684.   major changes in the app.c code from the DJA version) it is exactly what
  685.   was in the DJA version.  Fixed a bug in input_file_open() in input-file.c
  686.   where it was doing a setbuffer() call using a staticly allocated buffer for
  687.   all the file's in read.  This was changed to use a dynamicly allocated buffer
  688.   when processing an include file so the buffer does not get reused by include
  689.   files.
  690.  
  691. Changes for the 3.0 release (the -33 compiler release):
  692. - Fixed trap*.w and trap*.l to take one immediate operand of word or long
  693.   (this was just wrong in GAS).
  694. --- Changes to merged in the 1.36 version of GAS ---
  695. app.c: (1.36 version picked up)
  696.   - This deals with the "# <number> <filename> <garbage>" in the state
  697.     machine (the NeXT fix in s_line() was much cleaner).
  698.   - Picked up the 1.36 version.  The only odd difference is that ':' was
  699.     ifdef'ed OUT in the 1.36 version and IN the the NeXT 1.28 version.
  700.     #ifdef DONTDEF <- 1.36
  701.     #ifndef DONTDEF <- NeXT 1.28
  702.         lex [':']        |= LEX_IS_LINE_SEPERATOR;
  703.     #endif
  704.     I did the NeXT thing in fear of breaking something.  Done with:
  705.     #if defined(DONTDEF) || defined(NeXT)
  706. append.c: (1.36 version picked up)
  707.   - Only Copyright comment changed
  708. as.c: (1.36 version picked up)
  709.   - The machine specific command line options have been moved to routines
  710.     named md_parse_option() in the machine specific files.
  711.   - The handling of assembly errors has changed from using as_warn() to the
  712.     new routine as_bad() which if called sets bad_error and will not produce
  713.     an output file if that gets set (see the file messages.c for
  714.     definitions).
  715.   - Handling of signals has changed to an array of signal numbers and a
  716.     routine that catches them and prints out the signal number.
  717. messages.c: (1.36 version picked up)
  718.   - The addition of the routine as_bad() and the variable bad_error.  If
  719.     as_bad() is called then bad_error gets set and the output file does not
  720.     get produced (see main() in as.c).
  721. as.h: (1.36 version picked up)
  722.   - The following macros had ()'s added around their parameters:
  723.     #define bzero(s,n) memset((s),0,(n))
  724.     #define bcopy(from,to,n) memcpy((to),(from),(n))
  725. atof-generic.c: (1.36 version picked up)
  726.   - Macro for alloca ifdef'ed __GNUC__ added:
  727.     #ifdef __GNUC__
  728.     #define alloca __builtin_alloca
  729.     #else
  730.     #ifdef sparc
  731.     #include <alloca.h>
  732.     #endif
  733.     #endif
  734.   - Macros for bzero and index ifdef'ed USG added:
  735.     #ifdef USG
  736.     #define bzero(s,n) memset(s,0,n)
  737.     #define index strchr
  738.     #endif
  739.   - The strings "nan", "inf" or "infinity" (in either case) are recognized
  740.     first and NaN's get the sign set to 0, +infinity gets the sign set to
  741.     'P' and -infinity gets the sign set to 'N' (see flonum.h).  They used to
  742.     be caught at the end and the strings "Infinity", "infinity", "NaN",
  743.     "nan", "SNan", or "snan" had been recognized and some note about
  744.     see atof-m68k.c was there (this file was removed and atof-ieee.c was
  745.     added).
  746.   - A loop was added to strip leading '0' characters:
  747.     while(number_of_digits_after_decimal &&
  748.          first_digit[number_of_digits_before_decimal +
  749.              number_of_digits_after_decimal] == '0')
  750.         --number_of_digits_after_decimal;
  751.     After they were picked up.
  752.   - Looks like the extra precision was move into two extra littlenums worth
  753.     in the implementation of converting digit strings into flonum's.
  754. flonum-const.c:  (1.36 version picked up)
  755.   - Comment changes.
  756. flonum-copy.c: (1.36 version picked up)
  757.   - Copyright comment changed.
  758. flonum-mult.c: (1.36 version picked up)
  759.   - Added a check if the signs of the two numbers are one of '+' or  '-' it
  760.     is an error and returns zero.  This happens with infinities as the sign
  761.     is set to 'P' or 'M' or NaNs and the sign is set to zero ('\0' or 0).
  762.   - Also some extra term in an if statement:
  763.     146c141
  764.     <       if (significant || P<0)
  765.     ---
  766.     >       if (significant)
  767.     I did figure out what it was.
  768. flonum.h: (1.36 version picked up)
  769.   - Comment about NaN and infinities was added:
  770.     /* JF:  A sign value of 0 means we have been asked to assemble NaN
  771.        A sign value of 'P' means we've been asked to assemble +Inf
  772.        A sign value of 'N' means we've been asked to assemble -Inf
  773.      */
  774. atof-ieee.c: (1.36 version picked up)
  775.   - Replaces atof-m68k.c
  776. bignum-copy.c: (1.36 version picked up)
  777.   - The addtion of the explit return type of 'int' was added to the routine
  778.     bignum_copy().
  779.   - Copyright comment changed
  780. bignum.h: (1.36 version picked up)
  781.   - The commented out extra digits of LOG_TO_BASE_2_OF_10 were uncommented.
  782.     the comment above this was that this was done to get around a problem
  783.     in GCC (I'm assuming that has been fixed).
  784.      < #define LOG_TO_BASE_2_OF_10 (3.3219280948873623478703194294893901758651)
  785.      ---
  786.      > #define LOG_TO_BASE_2_OF_10 (3.321928
  787.                    /* 0948873623478703194294893901758651 */)
  788.   - Copyright comment changed.
  789. expr.c: (1.36 version picked up with Mach_O and NeXT ifdef's merged in)
  790.   - Copyright comment changed and top comment removed.
  791.   - A hack was changed with respect to the variable generic_bignum[].
  792.     The comment explains:
  793.      /* Seems atof_machine can backscan through generic_bignum and hit
  794.     whatever happens to be loaded before it in memory.  And its way
  795.     too complicated for me to fix right.  Thus a hack.  JF:  Just make
  796.     generic_bignum bigger, and never write into the early words, thus
  797.     they'll always be zero.  I hate Dean's floating-point code.  Bleh.
  798.       */
  799.   - This varable and comment was added but no one uses it.  See flonum.h
  800.     for how NaNs and infinities are handled.
  801.     /* If nonzero, we've been asked to assemble nan, +inf or -inf */
  802.     int generic_floating_point_magic;
  803.   - Changes to allow d$ where d is a digit has been added ifdef'ed
  804.     SUN_ASM_SYNTAX.  But according to the Sun assembler manual, page 10
  805.     section 2.4, the local labels are n$ where n is any integer (I wounder
  806.     if it really supports negitive integers).  There is also code in expr.c,
  807.     symbols.c and read.c to support this.
  808. expr.h: (1.36 version picked up)
  809.   - Copyright comment changed.
  810. frags.h: (1.36 version picked up)
  811.   - Copyright comment changed.
  812. hash.c: (1.36 version picked up with error() calls ifdef NeXT to as_fatal)
  813.   - Copyright comment changed and two /* in comments changed to / *
  814.   - A change from:
  815.     newsize = handle->hash_stat[STAT_SIZE] <<= 1;
  816.     to 
  817.     handle->hash_stat[STAT_SIZE] <<= 1;
  818.     newsize = handle->hash_stat[STAT_SIZE];
  819.     in hash_grow();
  820. hash.h: (1.36 version picked up)
  821.   - Copyright comment changed.
  822.   - The following line removed:
  823.     static char * hash_grow(); /* error text (internal)  */
  824. hex-value.c: (1.36 version picked up)
  825.   - Copyright comment changed.
  826.   - The following routine was added:
  827.     #ifdef VMS
  828.     dummy2()
  829.     {
  830.     }
  831.     #endif
  832. input-file.c: (1.36 version picked up)
  833.   - Copyright comment changed.
  834.   - The commented out declaration was removed (but not the comment out code)
  835.     /* static int    file_handle;    /* <0 === not open */
  836.   - The explict declaration of the pre prameter was added to the routine
  837.     input_file_open().
  838.   - The explict declaration of the routine do_scrub_next_char() was added
  839.     inside the routine input_file_give_next_buffer() in a local scope.
  840. input-file.h: (1.36 version picked up)
  841.   - Copyright comment changed.
  842. input-scrub.c: (1.36 version picked up)
  843.   - Copyright comment changed.
  844.   - The macro AFTER_STRING was changed from:
  845.     #define AFTER_STRING (" ")    /* bcopy of 0 chars might choke. */
  846.     to:
  847.     #define AFTER_STRING ("\0")    /* bcopy of 0 chars might choke. */
  848.   - The varables used by the ifdef'ed DONTDEF code was removed (why not just
  849.     also ifdef'ed?):
  850.     char *p;
  851.     char *out_string;
  852.     int out_length;
  853.     static char *save_buffer = 0;
  854.     extern int preprocess;
  855. m68k-opcode.h: (1.36 version merged in)
  856.   - Copyright comment changed.
  857.   - The bras and bsrs were ifdef'ed NeXT to not use word displacements.
  858.   - some reordering of the movem and fmovem type instructions.
  859.   - all m68851 stuff pulled in (comments and opcodes), pmmu.h was removed.
  860. m68k.c: (1.36 version merged in)
  861.   - Copyright comment changed
  862.   - Lots of changes related to the DBCC and DBCC68000 with jumps to jumps (see
  863.     GAS 1.36 version change log).
  864.   - The characters 'e' and 'E' were added to FLT_CHARS[]
  865.   - In the md_relax_table the long branches (BRANCH,FBRANCH & PCREL) had their
  866.     forward and backward reach changed by 2 where (the 2 was removed from the
  867.     expression).
  868.   - Constants for the BCC68000 and DBCC branch types were added as well as
  869.     entries in the md_relax_table.
  870.   - The .proc pseudo op was added
  871.   - The register defines for m68851 were added to m68k.c and pmmu.h was removed.
  872.   - Fixed a bunch of the macros like add_fix which did NOT have ()'s around the
  873.     parameters which was the source of a nasty bug NeXT tracked down.
  874.   - The routine m68k_reg_parse() takes something of the form fp0: and turns
  875.     the ':'  into a ',' .
  876.   - A fix to handling big numbers (greater than 32 bits) as a floating-point
  877.     bit pattern was made to put the bits out in the correct order.  The loop
  878.     was changed from:
  879.     for(wordp=generic_bignum;offs(opP->con1)--;wordp++)
  880.     to:
  881.     for(wordp=generic_bignum+offs(opP->con1)-1;offs(opP->con1)--;--wordp)
  882.   - The the routine md_atof() was changed to use atof_ieee() from atof_m68k().
  883.   - Picked up the md_parse_option() routine.
  884.  
  885.   - The NeXT made change to allow hex immediates for floating-point (which
  886.     broke decimal immediates like #1 and did not work for doubles) was removed.
  887.     Also see bug #8331 in bug tracker.
  888.     This change is in the routine m68_ip() (which converts a string into a
  889.     68k instruction) in the code for handling immediates which are some
  890.     type of floating point number that is not a SEG_BIG.
  891.     This next #if 0 #endif pair comments out these two lines:
  892.                     int_to_gen(nextword);
  893.                     gen_to_words(words,baseo,(long int)outro);
  894.     and replaces it with this line:
  895.                 /* modified by mself to support hex immediates. */
  896.                     *(int *)words = nextword;
  897.     The effect is that the non SEG_BIG expression (which is just an integer,
  898.     not a floating point value) is not converted to a float but just used
  899.     as a bit pattern for the floating point number.  This fails for doubles
  900.     since some random bits left in the local array words[] get stuffed into
  901.     the 64 bit double value and of course breaks the common case of #1 for
  902.     decimal numbers.
  903.  
  904.   - The NeXT use of atof_m68k was removed in the case of getting a floating
  905.     point immediate and the code to call gen_to_words() was put back.
  906.   - The NeXT change of #if 0'ing out the line: (I don't know why):
  907.         gen_to_words(words,2,8L);/* These numbers are magic! */
  908.     was removed the the #if removed and the code left in.
  909. obstack.c: (1.36 version picked up)
  910.   - Lots of changes but diffed with the same file in the cc directory (which
  911.     is based on 1.36) it looks very close to the same.  Since the NeXT 2.0
  912.     compiler uses it it is picked up here on faith.
  913. obstack.h: (1.36 version picked up)
  914.   - Lots of changes but diffed with the same file in the cc directory (which
  915.     is based on 1.36) it looks very close to the same.  Since the NeXT 2.0
  916.     compiler uses it it is picked up here on faith.
  917. output-file.c: (1.36 version picked up with NeXT and Mach_O ifdef's put in)
  918.   - Copyright comment changed.
  919.   - The NeXT ifdef is to unlink the file before doing a create on it.
  920.   - The Mach_O ifdef is for the routine output_write().
  921. pmmu.h: removed (1.36 has this stuff moved into m68k-opcode.h and m68k.c)
  922. read.c: (1.36 version picked up with NeXT, Mach_O and I860 ifdefs added)
  923.   - Copyright comment changed.
  924.   - There is a differing set of changes related to the bumping of the line
  925.     counters with respect to #NO_APP and #APP.  One in the 1.28 version
  926.     ifdef'ed NeXT and the other in the 1.36 version.  The 1.36 set of
  927.     changes were picked up.
  928.   - A bunch of changes to the s_set routine (not use in the NeXT compiler
  929.     suite).
  930. read.h: (1.36 version picked up)
  931.   - Copyright comment changed.
  932. strstr.c: (1.36 version picked up with NeXT ifdef code added)
  933.   - Only Copyright comment changed
  934.   - The routine strstrn() apperently was added by NeXT and is used in read.c
  935.     for searching for "#NO_APP\n".
  936. struc-symbol.h: (1.36 version picked up with NeXT ifdef code added)
  937.   - Only Copyright comment changed
  938.   - The ifdef NeXT code is to the sy_other macro to refer to the n_sect
  939.     field instead of the n_other field.
  940. subsegs.c: (1.36 version picked up)
  941.   - Only Copyright comment changed
  942. subsegs.h: (1.36 version picked up)
  943.   - Only Copyright comment changed
  944. symbols.c: (1.36 version picked up with Mach_O ifdef code added)
  945.   - Only Copyright comment changed
  946.   - Changes to allow d$ where d is a digit has been added ifdef'ed
  947.     SUN_ASM_SYNTAX.  But according to the Sun assembler manual, page 10
  948.     section 2.4, the local labels are n$ where n is any integer (I wounder
  949.     if it really supports negitive integers).  There is also code in expr.c,
  950.     symbols.c and read.c to support this.
  951.   - The ifdef Mach_O code is to set the n_sect field.
  952. symbols.h: (1.36 version picked up)
  953.   - Only Copyright comment changed
  954. version.c: (1.36 version picked up)
  955.   - The comments were removed and place in a file ChangeLog
  956. write.c: (1.36 version picked up with NeXT, M68K, Mach_O and I860 ifdefs added)
  957. write.h: (1.36 version picked up with the NeXT ifdef added)
  958. xmalloc.c: (1.36 version picked up with NeXT ifdef code added)
  959.   - Only Copyright comment changed
  960.   - The NeXT ifdefs are changing the call to error() to as_fatal() so the
  961.     macro -Derror=as_fatal does not have to be used (since it could
  962.     substitue in places where it shouldn't.
  963. xrealloc.c: (1.36 version picked up with NeXT ifdef code added)
  964.   - Only Copyright comment changed
  965.   - The NeXT ifdefs are changing the call to error() to as_fatal() so the
  966.     macro -Derror=as_fatal does not have to be used (since it could
  967.     substitue in places where it shouldn't.
  968.  
  969. --- Changes to merged in the i860 version of GAS by NeXT Dimension team ---
  970.     (NDTools-4)
  971.   - i860.h:
  972.     This contained the i860 relocation stuff.  This was moved into reloc.h
  973.     Also there was a bug in the GNU version of ld that relocated the
  974.     RELOC_HIGHADJ wrong.  The adjustment was always done out of the
  975.     assembler and should have been taken out and put back everytime.
  976.     This is now the case in the NeXT Mach-O link editor in i860_reloc.c .
  977.  
  978.   - I860 changes to read.c:
  979.     big_cons(), get_known_segmented_expression() and stringer() no longer static
  980.  
  981.     Mike changed s_file() and s_line() to handle the cpp line directive nesting
  982.     level by adding discard_rest_of_line() to it.  The complier group's version
  983.     just recognized the extra digits in s_file().  The compiler group's version
  984.      was retained and Mike's changes were left out.
  985.  
  986.     The i860 has it's own align syntax and the "align" pseudo-op is ifdef'ed out
  987.     for the i860 (what is this symtax?).
  988.  
  989.     The i860 has the "org" and "quad" pseudo-op's ifdef'ed out.
  990.  
  991.     The as_fatal() call in pobegin() has "... (%s)", errtxt ); added to it.
  992.  
  993.     An Intel "lable::" crock, which also makes the symbol global
  994.  
  995.     The fix_new() call in cons() has an extra RELOC_VANILLA argument added to it
  996.     that is ifdef'ed I860.  This also requires i860.h to be included which
  997.     defines RELOC_VANILLA to be added at line 37:
  998.     #if defined(I860)
  999.     #include <i860.h>
  1000.     #endif
  1001.  
  1002.   - I860 changes to write.c:
  1003.     Added at line 50 (for the NO_RELOC relocation r_type)
  1004.     #if defined(I860)
  1005.     #include "i860.h"
  1006.     #endif
  1007.  
  1008.     The variable next_object_file_charP is not static for the i860 (ifdef'ed
  1009.     I860).
  1010.  
  1011.     fix_new has an extra prameter r_type (ifdef'ed I860) and it is set in to the
  1012.     fixP struct via:
  1013.     fixP->fx_r_type = r_type;
  1014.     also ifdef'ed I860.
  1015.  
  1016.     In write_object_file() after the relax segment calls the text alignment is
  1017.     forced to 32 byte alignment, the data and bss to 16 byte alignment.  The
  1018.     code for text at line 316 is:
  1019.      /* Check/force alignment here! */
  1020.     #if defined(I860)
  1021.       text_siz = (text_siz + 0x1F) & (~0x1F);/* Keep 32 byte alignment (most
  1022.                             restrictive) */
  1023.       text_last_frag->fr_address = text_siz; /* and pad the last fragment.*/
  1024.     #endif
  1025.     for data at line 388 is:
  1026.     #if defined(I860)
  1027.           data_siz += (16 - (data_siz % 16)) % 16; /* Pad data seg to
  1028.                               preserve alignment */
  1029.           data_last_frag->fr_address = data_siz;   /* to quad-word
  1030.                               boundries */
  1031.     #endif
  1032.     and for bss at line 361 is:
  1033.     #if defined(I860)
  1034.       local_bss_counter=(local_bss_counter+0xF)&(~0xF); /* Pad BSS to
  1035.                             preserve alignment */
  1036.     #endif
  1037.  
  1038.     The call to fix_new() in write_object_file() has an extra parameter added
  1039.     to it, NO_RELOC, which is ifdef'ed I860.  At line 522:
  1040.     #if defined(I860)
  1041.           fix_new(lie->frag,lie->word_goes_here - lie->frag->fr_literal,2,
  1042.               lie->add,lie->sub,lie->addnum,0,NO_RELOC);
  1043.     #else
  1044.           fix_new(lie->frag,lie->word_goes_here - lie->frag->fr_literal,2,
  1045.               lie->add,lie->sub,lie->addnum,0);
  1046.     #endif
  1047.  
  1048.     In write_object_file() a bunch of checks were added.  Just before emitting
  1049.     relocations at line 675:
  1050.     know(next_object_file_charP==
  1051.     (the_object_file+(N_TXTOFF(the_exec)+the_exec.a_text+the_exec.a_data)));
  1052.     Just before emiting the symbols at line 684:
  1053.     know(next_object_file_charP == (the_object_file + N_SYMOFF(the_exec)) );
  1054.     Just before emiting the strings at line 710:
  1055.     know(next_object_file_charP == (the_object_file + N_STROFF(the_exec)) );
  1056.  
  1057.     In fixup_segment() the switch statement for immediate displacement types for
  1058.     case 0 is ifdef'ed I860 with this change (at line 1209):
  1059.     #if defined(I860)
  1060.           fixP->fx_addnumber = add_number;
  1061.           /*
  1062.            * fixup_segment is expected to return a count of the number of 
  1063.            * relocation_info structures needed for an object module.
  1064.            * Two specific relocation types encode only the high half
  1065.            * of an address, and so are followed by a second relocation_info
  1066.            * structure which encodes the low half.  We allow for this
  1067.            * by bumping seg_reloc_count an extra time here.
  1068.            *
  1069.            * The extra item is generated in emit_relocations().
  1070.            */
  1071.           if ( fixP->fx_addsy && 
  1072.             (fixP->fx_r_type==RELOC_HIGH ||
  1073.              fixP->fx_r_type==RELOC_HIGHADJ))
  1074.           {
  1075.         ++seg_reloc_count;
  1076.           }
  1077.           md_number_to_imm (place, add_number, size,fixP,this_segment_type);
  1078.     #else
  1079.           md_number_to_imm (place, add_number, size);
  1080.     #endif
  1081.     and for case 1 the comment was added (at line 1232):
  1082.         case 1:        /* Not used in i860 version */
  1083.  
  1084.     In emit_relocations() the following line was ifdef'ed in the other two were
  1085.     else'ed out (at line 1276):
  1086.     #if defined(I860)
  1087.           ri . r_type        = fixP -> fx_r_type;
  1088.     #else /* I860 */
  1089.             /* These two 'cuz of NS32K */
  1090.           ri . r_bsr        = fixP -> fx_bsr;
  1091.           ri . r_disp        = fixP -> fx_im_disp;
  1092.     #endif /* I860 */
  1093.  
  1094.     In emit_relocations() at the end of the loop processing the fixS structures
  1095.     the following lines were added to handle split relocations (at line 1425):
  1096.     #if defined(I860)
  1097.       /* Whenever we have a relocation item using the high half of an
  1098.        * address, we also emit a relocation item describing the low
  1099.        * half of the address, so the linker can reconstruct the address
  1100.        * being relocated in a reasonable manner.
  1101.        *
  1102.        * We set r_extern to 0, so other apps won't try to use r_symbolnum
  1103.        * as a symbol table indice.  We OR in some bits in bits 16-23 of
  1104.        * r_symbolnum so it is guaranteed to be outside the range we use
  1105.        * for non-external types to denote what segment the relocation is in.
  1106.        */
  1107.       if ( fixP->fx_r_type == RELOC_HIGH ||
  1108.            fixP->fx_r_type == RELOC_HIGHADJ )
  1109.       {
  1110.           ri.r_length    = nbytes_r_length [fixP->fx_size];
  1111.           ri.r_pcrel    = fixP->fx_pcrel;
  1112.           ri.r_address    = fixP -> fx_frag->fr_address + fixP->fx_where
  1113.                         - segment_address_in_file;
  1114.         ri.r_extern    = 0;
  1115.         ri.r_type    = RELOC_PAIR;
  1116.         /* Hide the low half of the addr in r_symbolnum.  More
  1117.            overloading...*/
  1118.         ri.r_symbolnum    = (fixP->fx_addnumber & 0xFFFF) | 0x7F0000;
  1119.         md_ri_to_chars((char *) &ri, ri); 
  1120.         append(&next_object_file_charP, (char *)&ri,
  1121.                (unsigned long)sizeof(ri));
  1122.       }
  1123.     #endif
  1124.  
  1125. --- Changes made to do the merges of 1.36 and i860 versions ---
  1126. - Removed the cpp macro "error" which was set on the compiler line to 
  1127.   -Derror=as_fatal and changed the 4 uses in hash.c, xmalloc.c and xrealloc.c
  1128.   to just use as_fatal.
  1129. - Added the cpp macro M68K for 68k specific ifdef that are needed (like in
  1130.   Mach-O.c).  This is instead of the "default case" without a target processor
  1131.   macro meaning that it is the 68k case.  This is set in the Makefile as the
  1132.   target processor that the assembler is for in the make macro COPTS.
  1133. - Changed the only use of the cpp macro CROSS in output-file.c to use NeXT to
  1134.   get rid of this macro.  The line of code that is ifdef'ed is is the unlink of
  1135.   "name" in output_file_create().
  1136. - Removed a.out.h and letting the one in ../include get used which is a merge
  1137.   of the original and includes NeXT's files (nlist.h and reloc.h).
  1138. - Removed the file atom.c since Mach-O.c replaces it (also removed all the
  1139.   code in write.c that used it).
  1140. - Removed all machine specific files except for the target processors that
  1141.   NeXT uses.  The remaining code that used this stuff has been ifdef'ed where
  1142.   needed to preserved the code in the files we use.
  1143. - Removed the files gdb.c, gdb-file.c, gdb-symbols.c, gdb-blocks.c and
  1144.   gdb-lines.c and ifdef'ed DONTDEF the code in as.c, read.c and write.c that
  1145.   used this stuff since the GNU 1.36 version of GAS did the same.
  1146. - Removed the files m-68k.h, m-sun3.h, m-hpux and m-generic and ifndef'ed the
  1147.   include of m-68k.h out of m-68k.c.
  1148. - Removed the files atof-m68k.c atof-m68k-assist.s since they are no longer
  1149.   used (see the change below for the -27 compiler release).  And replaced the
  1150.   the file atof-m68k.c with the 1.36 atof-ieee.c .
  1151.  
  1152. The 2.0 Release (the -32 compiler release)
  1153.  
  1154. Changes for the Warp ?? release (the -27 compiler release):
  1155. - Fixed m68_ip() to handle hex immediate operands to floating point insn's.
  1156.   Now fadds #0xffffffff,fp0 works correctly.  The fix only works for .s, not
  1157.   for .d or .x.  This orignally worked, but was broken by NeXT's mods to
  1158.   atof-m68k.c. (mself)
  1159. - Added new 68040 floating-point instructions to m68k-opcode.h (mself)
  1160. - Changed the name of the the section generated by the .objc_selector_refs
  1161.   directive from __selector_refs to __message_refs and set the flags field of
  1162.   this section to S_LITERAL_POINTERS.  This change requires a link editor that
  1163.   knows how to handle a S_LITERAL_POINTERS section.
  1164. - Changed m68k.c to use the reguar atof (actually strtod) instead of using
  1165.   atof-m68k.c and atof-m68k-assist.s, since these instructions will be
  1166.   emulated on th '040. (mself)
  1167.  
  1168. Changes for the Warp ?? release (the -26 compiler release):
  1169. - Added the file Mach-O.c and the ablity to have a subset of a fixed number of
  1170.   sections.  All changes ifdef'ed MACH_O.  This removes atom.c (ifdef'ed out).
  1171.   New sections include const, literal4, literal8, 11 new objc sections, etc.
  1172.   Basicly a lot of changes.
  1173.  
  1174. Changes for the Warp 3 (OS update) release (the -25 compiler release):
  1175. - Added scattered relocation entries to the assembler in emit_relocation() in
  1176.   write.c (see extensive comments in there and in <reloc.h>).
  1177. - Changed fixup_segment() in write.c and md_estimate_size_before_relax() in
  1178.   m68k.c to make branches to lables that persist on output to be long in length
  1179.   and have a relocation entry (to make scattered loading in the link editor
  1180.   work).  This was done by using the value of 3 in fx_pcrel (see the comment in
  1181.   write.h) for force this to happen.
  1182.  
  1183. Changes for the Warp ?? release (the -24 compiler release):
  1184. - Fixed the bug that would not assemble the following instruction:
  1185.     L2:movl #1,@(_down:l,d7:l:4)
  1186.   The fix was a bug in the macro use in m68k.c for add_fix() which the macro
  1187.   did not put ()'s around it's arguments (bugs 5207 and 5270).
  1188. - Fixed the bug with cpp processed assembler files (bug 4280).  The new syntax
  1189.   of the cpp output now includes an optional number after the file name, for
  1190.   example: `# 1 "x.c" 2' the 2 is the new number.  This was done by changing
  1191.   the routine s_file() in read.c which recognizes the .file directive (that the
  1192.   assembler's preprecessor inserts) to optionally recognize this new number.
  1193. - Changed the section alignment of the text section to 2 byte alignment so that
  1194.   scattered loading will work (the branch table of the shlibs will not move).
  1195.  
  1196. Changes for the 2.0 impulse X.X release (the -23 compiler release):
  1197. - Now is linked with libsys.
  1198.  
  1199. Changes for the 2.0 impulse X.X release (the -22 compiler release):
  1200. - Allow symbol names to appear in ""'s .  This is so that the symbol names for
  1201.   methods can be "+[Class(category) method:name:]" and tools will not have to
  1202.   go through the objective-C section to get these names. Changes how
  1203.   get_symbol_end() works and how the callers of it use it.
  1204.  
  1205. Changes for the 2.0 impulse X.X release (the -19 compiler release):
  1206. - as is no longer installed as as-<version_number> to match the rest of the
  1207.   project.
  1208. - Updated atom.c to the changes to CPU_TYPE and CPU_SUBTYPE with the changes to
  1209.   <sys/machine.h>
  1210.  
  1211. Changes for the 0.91 release (the -10 compiler release):
  1212. * s.stone fixed a bug in `#APP', `#NO_APP' that affected read.c & strstr.c.
  1213. + Fixed a bug in converting to Mach-O object files with the new sections
  1214.   for the objective-C runtime.  The bug was if a local relocation item refered
  1215.   to a symbol plus an offset the incorrect section number could be assigned if
  1216.   the value of the symbol plus offset was in a different section than the value
  1217.   of the symbol.  This is an un fixable bug in atom(1) but fixed in here by
  1218.   moving the assignment of the section number into the r_symbolnum field into
  1219.   the assembler and using just the symbol's value (not plus the offset) to pick
  1220.   the section number.  The fix is in write.c in emit_relocation() (plus a call
  1221.   to a new function get_objc_section_bounds() before calling emit_relocation).
  1222. + Fixed a bug where a file had no symbols and the result was a Mach-O file.
  1223.   What would happen was a 4 (the size of the string table) was written at offset
  1224.   0 in the output file (overwriting the magic number).  Also did some major
  1225.   clean up of atom.c and removed all the garbage that did not apply (about half
  1226.   of what was there).
  1227. + Added the .reference pseudo op to read.c.  This was added for the new
  1228.   objective-C runtime to use so that archive semantaic could be maintained but
  1229.   no globals (that 'C' could use) are created.
  1230. + Fixed the exponent overflow handling in atof-m68k.c to not print a warning
  1231.   (ifdef NeXT) and to get the right answer (a bzero of the 'words' as added,
  1232.   and corrected the reversed sign for infinities).
  1233.  
  1234. New notes go at the TOP of this file.
  1235.