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