NASM 0.98.03
[nasm.git] / Wishlist
blob4fbcbcf0035a6b192040e7e5c2756e47a3ab1a8c
1 NASM Wishlist
2 =============
4 Numbers on right hand side are version numbers that it would be nice to
5 have this done by. ? means I haven't looked at it yet.
7 - Create a binary RDF tools distribution. Should probably be distributed 0.98
8   seperately.
10 - Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy.         0.98
11   (nop@dlc.fi)
13 - Package the Linux Assembler HOWTO.                                    0.98
15 - 3DNow!, SSE and other extensions need documenting.                    0.98
16   hpa: Does it really make sense to have a whole instruction set
17   reference packaged with the assembler?
19 - prototypes of lrotate don't match in test/*. Fix.                     0.98
21 - Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub    0.98
22   - it might be a lot better than CWSDPMI. It's in PMW133.ZIP.
24 - %undef operator that goes along with %define                          DONE
26 - Fix `%error' giving error messages twice.                             0.99
27   Not especially important, as changes planned for 1.1x below will make
28   the preprocessor be only called once.
30 - Sort out problems with OBJ:                                           0.99
31   * TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we
32     should avoid xxx32 records wherever we can.
33   * However, didn't we change _to_ using xxx32 at some stage? Try
34     to remember why and when.
35   * Apparently Delphi's linker has trouble with two or more
36     globals being defined inside a PUBDEF32. Don't even know if it
37     _can_ cope with a PUBDEF16.
38   * Might need extra flags. *sigh*
40 - Symbol table output may possibly be useful.                           0.99
41   Ken Martwick (kenm@efn.org) wants the following format:
42         labelname       type    offset(hex)     repetition count
43   Possibly include xref addresses after repetition count?
45 - There are various other bugs in outelf.c that make certain kinds      0.99
46   of relocation not work. See zbrown.asm. Looks like we may have to do
47   a major rewrite of parts of it. Compare some NASM code output with
48   equivalent GAS code output. Look at the ELF spec. Generally fix things.
50 - NASM is currently using a kludge in ELF that involves defining        0.99
51   a symbol at a zero absolute offset. This isn't needed, as the
52   documented solution to the problem that this solves is to use
53   SHN_UNDEF.
55 - Debug information, in all formats it can be usefully done in.         0.99
56   * including line-number record support.
57   * "George C. Lindauer" <gclind01@starbase.spd.louisville.edu>
58     wants to have some say in how this goes through.
59   * Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out.
61 - Think about a line-continuation character.                            0.99
63 - Consider allowing declaration of two labels on the same line,
64   syntax 'label1[:] label2[:] ... instruction'. Need to investigate
65   feasibility.                                                          0.99
67 - Quoting of quotes by doubling them, in string and char constants.     0.99
69 - Two-operand syntax for SEGMENT/SECTION macro to avoid warnings        0.99
70   of ignored section parameters on reissue of __SECT__.
71   Or maybe skip the warning if the given parameters are identical to
72   what was actually stored. Investigate.                                
74 - Apparently we are not missing a PSRAQ instruction, because it
75   doesn't exist.  Check that it doesn't exist as an undocumented
76   instruction, or something stupid like that.                           0.99
78 - Any assembled form starting 0x80 can also start 0x82. ndisasm         1.00
79   should know this. New special code in instruction encodings,
80   probably.
82 - Pointing an EQU at an external symbol now generates an error. There   1.05
83   may be a better way of handling this; we should look into it.
84   Ideally, the label mechanism should be changed to cope with one
85   label being declared relative to another - that may work, but could be
86   a pain to implement (or is it? it may be easy enough that you just
87   need to declare a new offset in the same segment...) This should be done
88   before v1.0 is released. There is a comment regarding this in labels.c,
89   towards the end of the file, which discusses ways of fixing this.
91 - nested %rep used to cause a panic. Now a more informative error       1.10
92   message is produced. This problem whould be fixed before v1.0.
93   See comment in switch() statement block for PP_REP in do_directive()
94   in preproc.c (line 1585, or thereabouts)
96 - Contribution: zgraeme.tar contains improved hash table routines       ?
97   contributed by Graeme Defty <graeme@HK.Super.NET> for use in the
98   label manager.
100 - Contribution: zsyntax.zip contains a syntax-highlighting mode for     ?
101   NASM, for use with the Aurora text editor (??).
103 - Contribution: zvim.zip contains a syntax-highlighting mode for        ?
104   NASM, for use with vim.
106 - Contribution: zkendal1.zip and zkendal2.zip contain Kendall           ?
107   Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff,
108   providing an alternative syntax mode for NASM which allows a macro
109   set to be written that allows the same source files to be
110   assembled with NASM and TASM.
112 - Add the UD2 instruction.                                              DONE
114 - Add the four instructions documented in 24368901.pdf (Intel's own     DONE
115   document).
117 - Some means of avoiding MOV memoffs,EAX which apparently the           1.10?
118   Pentium pairing detector thinks modifies EAX. Similar means of
119   choosing instruction encodings where necessary.
121 - The example of ..@ makes it clear that a ..@ label isn't just         ?
122   local, but doesn't make it clear that it isn't just global either.
124 - hpa wants an evaluator operator for ceil(log2(x)).                    ?
126 - Extra reloc types in ELF: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23.
127   Add support for the 16s at least.                                     ?
130 - Lazy section creation or selective section output, in COFF/win32      ?
131   at least and probably other formats: don't bother to emit a section
132   if it contains no data. Particularly the default auto-created
133   section. We believe zero-length sections crash at least WLINK (in
134   win32).
136 - Make the flags field in `struct itemplate' in insns.h a long          ?
137   instead of an int.
139 - Implement %ifref to check whether a single-line macro has ever been   ?
140   expanded since (last re) definition. Or maybe not. We'll see.
142 - add pointer to \k{insLEAVE} and \k{insENTER} in chapters about        ?
143   mixed-language programming.
145 - Some equivalent to TASM's GLOBAL directive, ie something which        ?
146   defines a symbol as external if it doesn't end up being defined
147   but defines it as public if it does end up being defined.
149 - Documentation doesn't explain about C++ name mangling.                ?
151 - see if BITS can be made to do anything sensible in obj (eg set the    ?
152   default new-segment property to Use32).
154 - OBJ: coalesce consecutive offset and segment fixups for the same      ?
155   location into full-32bit-pointer fixups. This is apparently
156   necessary because some twazzock in the PowerBASIC development
157   team didn't deign to support the OMF spec the way the rest of the
158   world sees it.
160 - Allow % to be separated from the rest of a preproc directive, for     ?
161   alternative directive indentation styles.
163 - __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and           ?
164   __NASM_MINOR__.
166 - Warn on TIMES combined with multi-line macros. TIMES gets applied     1.00
167   to first line only - should bring to users' attention.
169 - Re-work the evaluator, again, with a per-object-format fixup          1.10
170   routine, so as to be able to cope with section offsets "really"
171   being pure numbers; should be able to allow at _least_ the two
172   common idioms
173      TIMES 510-$ DB 0            ; bootsector
174      MOV AX,(PROG_END-100H)/16   ; .COM TSR
175   Would need to call the fixup throughout the evaluator, and the
176   fixup would have to be allowed to return UNKNOWN on pass one if it
177   had to. (_Always_ returning UNKNOWN on pass one, though a lovely
178   clean design, breaks the first of the above examples.)
180 - Preprocessor identifier concatenation?                                1.10
182 - Arbitrary section names in `bin'.                                     ?
183   Is this necessary? Is it even desirable?
184   hpa: Desirable, yes.  Necessary?  Probably not, but there are
185   definitely cases where it becomes quite useful.
187 - Ability to read from a pipe. Obviously not useful under dos, so       1.10
188   memory problems with storing entire input file aren't a problem
189   either.
191   Related topic: file caching under DOS/32 bit...                       1.10?
192   maybe even implement discardable buffers that get thrown away
193   when we get a NULL returned from malloc(). Only really useful under
194   DOS. Think about it.
196   Another related topic: possibly spool out the pre-processed           1.10?
197   stuff to a file, to avoid having to re-process it. Possible problems
198   with preprocessor values not known on pass 1? Have a look...
200   Or maybe we can spool out a pre-parsed version...?                    1.10
201   Need to investigate feasibility. Does the results from the parser
202   change from pass 1 to pass 2? Would it be feasible to alter it so that
203   the parser returns an invariant result, and this is then processed
204   afterwards to resolve label references, etc?
206 - Subsection support?                                                   ?
208 - A good ALIGN mechanism, similar to GAS's. GAS pads out space by       1.10?
209   means of the following (32-bit) instructions:
210           8DB42600000000    lea esi,[esi+0x0]
211           8DB600000000      lea esi,[esi+0x0]
212           8D742600          lea esi,[esi+0x0]
213           8D7600            lea esi,[esi+0x0]
214           8D36              lea esi,[esi]
215           90                nop
216   It uses up to two of these instructions to do up to 14-byte pads;
217   when more than 14 bytes are needed, it issues a (short) jump to
218   the end of the padded section and then NOPs the rest. Come up with
219   a similar scheme for 16 bit mode, and also come up with a way to
220   use it - internal to the assembler, so that programs using ALIGN
221   don't knock over preprocess-only mode.
222     Also re-work the macro form so that when given one argument in a
223   code section it calls this feature.
225 - Possibly a means whereby FP constants can be specified as             ?
226   immediate operands to non-FP instructions.
227   * Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP
228     constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT
229     1.2 to get the two halves of a double-precision one. Best to
230     ignore extended-precision in case it bites.
231   * Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4
232     (ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x)
233     and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte
234     chunks, one-byte chunks, even stranger chunks, and pieces of
235     ten-byte reals to be bandied around as well.
237 - A UNION macro might be quite cool, now that ABSOLUTE is sane          ?
238   enough to be able to handle it.
240 - An equivalent to gcc's ## stringify operator, plus string             ?
241   concatenation, somehow implemented without undue ugliness, so as
242   to be able to do `%include "/my/path/%1"' in a macro, or something
243   similar...
245 - Actually _do_ something with the processor, privileged and            1.10
246   undocumented flags in the instruction table. When this happens,
247   consider allowing PMULHRW to map to either of the Cyrix or AMD
248   versions?
249   hpa: The -p option to ndisasm now uses this to some extent.
251 - Maybe NEC V20/V30 instructions?                                       ?
252   hpa: What are they?  Should be trivial to implement.
254 - Yet more object formats.
255   * Possibly direct support for .EXE files?                             1.10
257 - Symbol map in binary format. Format-specific options...               1.10?
259 - REDESIGN: Think about EQU dependency, and about start-point           1.20?
260   specification in OBJ. Possibly re-think directive support.
262 - Think about a wrapper program like gcc? Possibly invent a _patch_     2.00?
263   for gcc so that it can take .asm files on the command line?
265 - If a wrapper happens, think about adding an option to cause the       ?
266   resulting executable file to be executed immediately, thus
267   allowing NASM source files to have #!... (probably silly)
269 - Multi-platform support? If so: definitely Alpha; possibly Java        ?
270   byte code; probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe
271   Vax. Perhaps Z80 and 6502, just for a laugh?
273 - Consider a 'verbose' option that prints information about the         ?
274   resulting object file onto stdout.
276 - Line numbers in the .lst file don't match the line numbers in the     ?
277   input.  They probably should, rather than the current matching
278   of the post-preprocessor line numbers.