ranlib: fix it
[odcctools-svp.git] / as / notes
blob5cba8f102d1ded9d10a530790cd8819cd18a99f8
1 TODO for coalesced symbols:
2 - Should external relocation entries for defined coalesced symbols only be
3   created with -dynamic and not -static?
5 TODO:
6 - Add MacOS line termination \r .
8 Known bugs:
9 - The assembly line:
10         bl ""foo""
11   causes the symbol name "" to be used.
12 - cmpwi seems to be the same as cmpi for PowerPC.
13 - Can't optimize because of compiler bug #50416 prevents line 235 in symbols.c
14   from working (currently has #pragma CC_OPT_OFF and  #pragma CC_OPT_RESUME
15   around that routine).
16 - The m88k instruction "tb0 0,r0,undef" trashes the instruction because of
17   the undefined.
18 - 68k does not handle packed immediates (the tables have been changed to dis-
19   allow this) because there is no routine to convert a flonum to a 68k packed
20   form.
21 - The logical operators && and || are not implemented.
23 Bugs to be fixed:
24 - The m68k "jmp @(_foo)" is not legal and needs to be flaged.
25 - The PowerPC extended branch mnemonic like beqlrl need to take a CRFONLY or
26   a number shifted over by 2 (like the fcmpu instruction).
28 Changes for the 5.25 release (the cctools-697 release):
30 Changes for the 5.25 release (the cctools-689 release):
31 - Fixed a place that needed force_cpusubtype_ALL tested in md_assemble() in
32   arm.c . Radar bug #5817558.
33 - Added support for the special assembly time constant expression of the diff-
34   erence of two symbols defined in the same section then divided by exactly 2.
35   - Added the field X_sectdiff_divide_by_two to the expressionS typedef in
36     expr.h .
37   - In expr() in expr.c added code to look for an expression with a SEG_DIFFSECT
38     and a left side with an SEG_ABSOLUTE X_add_number == 2 and a O_divide right
39     side and if so set the new X_sectdiff_divide_by_two field.
40   - Added the field fx_sectdiff_divide_by_two to the struct fix.
41   - Changed cons() in read.c to save the fix for a SEG_DIFFSECT and to copy the
42     the new X_sectdiff_divide_by_two field from the expression to the new
43     fx_sectdiff_divide_by_two field in the fix.
44   - In fixup_section() in layout.c added code to test the news
45     fx_sectdiff_divide_by_two field and if so divide the value by 2.  And check
46     to see that the expression is an assembly time constant.
48 Changes for the 5.25 release (the cctools-686 release):
49 - Changed arm_relax_frag() in arm.c to take a section number for the section it
50   is operating on.  That is in turn now passed to relax_branch() in arm.c and
51   in there if the symbol that is being branched to is not for that section it
52   returns 4 for the size of the instruction.
53 - In md_apply_fix() for BFD_RELOC_THUMB_PCREL_BRANCH25 the fx_r_type type is
54   set to BFD_RELOC_THUMB_PCREL_BRANCH23 so it can be output as a known
55   relocation type (ARM_THUMB_RELOC_BR22).
57 Changes for the 5.25 release (the cctools-685 release):
58 - Changed relaxed_symbol_addr() in arm.c to also add in
59   fragp->fr_symbol->sy_nlist.n_value when calculating the addr.  Without this
60   it can some times get "branch out of range" errors since it appears this
61   to have the address of the symbol from the start of the fragment.
62 - Changed the check in md_assemble() in arm.c for "width suffixes are invalid
63   in ARM mode" to allow them with unified syntax.
64 - Changed the arm APPLE LOCAL trap instruction opcode entry in arm.c from this:
65         CE(trap,        7ffdefe,  0, (), noargs),
66   to this:
67         TUE(trap,      7ffdefe, defe, 0, (), noargs, noargs),
68   which allows it to work with thumb mode.
69 - Changed relax_section() in layout.c in two plaves #ifdef'ed ARM.  In the first
70   look it now sets frag's relax_marker field to zero.  In the "Do relax" loop
71   it flips the relax_marker field with an "^= 1".  This is to fix a problem in
72   relaxed_symbol_addr() so it knows to add the stretch amount to the addr it
73   is returning.
74 - Added a second call to as_file_and_line() in frag_var() in frags.c which was
75   #ifdef ARM at the top of the file to set the fr_file and fr_line fields of
76   the current frag before creating a new frag.  This is needed because as the
77   line number of the last instruction which is the "relaxable" instruction is
78   the line number that is needed (not the first one).  So when relax_section()
79   calls arm_relax_frag() which calls md_convert_frag() it will call
80   fix_new_exp() and fix_new_internal() so a new fix may be created after all
81   code is read for the last instruction in the frag.  So md_convert_frag()
82   copies the fr_file and fr_line fields of the frag into the fx_file and fx_line
83   fields of the fix so line numbers can be reported.
85 Changes for the 5.25 release (the cctools-684 release):
86 - Changed relaxed_symbol_addr() in arm.c to not use the hack ported
87   S_GET_VALUE() as at that point the symbol does not have the value set.  The
88   code was #ifdef NOTYET to use fragp->fr_symbol->sy_frag->fr_address to get
89   the address from the symbol's frag.  The hack ported S_GET_VALUE() routine
90   was removed from symbols.[ch].
91 - Changed relax_addsub() where it had a memcpy() hack in place of the
92   #ifdef NOTYET out call to bfd_get_16() to a call to a call to 
93   md_chars_to_number() to retrive the old thumb opcode into op that
94   output_relax_insn() put into the frag.
95 - Added a call to as_file_and_line() in frag_var() in frags.c which was #ifdef
96   ARM to set the fr_file and fr_line fields of the frag.  This is needed because
97   when relax_section() calls arm_relax_frag() which calls md_convert_frag()
98   it will call fix_new_exp() and fix_new_internal() so a new fix will be created
99   after all code is read.  So md_convert_frag() copies the fr_file and fr_line
100   fields of the frag into the fx_file and fx_line fields of the fix so line
101   numbers can be reported.
103 Changes for the 5.25 release (the cctools-683 release):
104 - Fixed a bug in fix_new_arm() in arm.c after the call to fix_new_exp() before
105   the default: case label as missing a break; statement.
106 - Fixed a bug in relax_section() in layout.c for the "Do relax" loop where
107   the call to arm_relax_frag() should have set the variable growth not
108   incremented.  The "+=" was change to just an assignment, "=".
110 Changes for the 5.25 release (the cctools-682 release):
111 - Changed relax_section() in layout.c for the "Do relax" loop and #ifdef'ed
112   ARM the rs_machine_dependent case to call arm_relax_frag().
113 - Changed md_convert_frag() where it had a memcpy() hack in place of the
114   #ifdef NOTYET out call to bfd_get_16() to a call to a call to 
115   md_chars_to_number() to retrive the old thumb opcode into old_op that
116   output_relax_insn() put into the frag.
118 Changes for the 5.25 release (the cctools-681 release):
119 - Removed all __OPEN_SOURCE__ references in Makefile, notes, as.c, layout.c, 
120   messages.c, symbols.c, write_object.c, frags.h and symbols.h .
121 - Fixed a bug in the table entries for the pextrq and pinsrq instructions as
122   they should have had Size64 to force the REX.W byte.
123 - Fixed a bug in the table entries for the i386 SSE4.1 instruction insertps
124   where it had the second parameter as a general register not a xmm register.
125   The change was in i386-opcode.h to change Reg32 and Reg64 to RegXMM.
126   Radar bug #5650346.
127 - Changed output_relax_insn() in arm.c to just used the undefined symbol instead
128   of calling make_expr_symbol() if the expression is a just an undefined symbol
129   and no subtract symbol.
131 Changes for the 5.25 release (the cctools-680 release):