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