nasm/Wishlist
H. Peter Anvin eba20a73f2 NASM 0.98p3
2002-04-30 20:53:55 +00:00

268 lines
11 KiB
Text

NASM Wishlist
=============
Numbers on right hand side are version numbers that it would be nice to
have this done by. ? means I haven't looked at it yet.
- Create a binary RDF tools distribution. Should probably be distributed 0.98
seperately.
- Check misc/ide.cfg into RCS as Watcom IDE enhancement thingy. 0.98
(nop@dlc.fi)
- Package the Linux Assembler HOWTO. 0.98
- AMD 3dNow extensions need documenting. 0.98
- prototypes of lrotate don't match in test/*. Fix. 0.98
- Build djgpp binaries for 0.98 onwards. Look into PMODE/W as a stub 0.98
- it might be a lot better than CWSDPMI. It's in PMW133.ZIP.
- Fix `%error' giving error messages twice. 0.99
Not especially important, as changes planned for 1.1x below will make
the preprocessor be only called once.
- Sort out problems with OBJ: 0.99
* TLINK32 doesn't seem to like SEGDEF32 et al. So for that, we
should avoid xxx32 records wherever we can.
* However, didn't we change _to_ using xxx32 at some stage? Try
to remember why and when.
* Apparently Delphi's linker has trouble with two or more
globals being defined inside a PUBDEF32. Don't even know if it
_can_ cope with a PUBDEF16.
* Might need extra flags. *sigh*
- Symbol table output may possibly be useful. 0.99
Ken Martwick (kenm@efn.org) wants the following format:
labelname type offset(hex) repetition count
Possibly include xref addresses after repetition count?
- There are various other bugs in outelf.c that make certain kinds 0.99
of relocation not work. See zbrown.asm. Looks like we may have to do
a major rewrite of parts of it. Compare some NASM code output with
equivalent GAS code output. Look at the ELF spec. Generally fix things.
- NASM is currently using a kludge in ELF that involves defining 0.99
a symbol at a zero absolute offset. This isn't needed, as the
documented solution to the problem that this solves is to use
SHN_UNDEF.
- Debug information, in all formats it can be usefully done in. 0.99
* including line-number record support.
* "George C. Lindauer" <gclind01@starbase.spd.louisville.edu>
wants to have some say in how this goes through.
* Andrew Crabtree <andrewc@rosemail.rose.hp.com> wants to help out.
- Think about a line-continuation character. 0.99
- Consider allowing declaration of two labels on the same line,
syntax 'label1[:] label2[:] ... instruction'. Need to investigate
feasibility. 0.99
- Quoting of quotes by doubling them, in string and char constants. 0.99
- Two-operand syntax for SEGMENT/SECTION macro to avoid warnings 0.99
of ignored section parameters on reissue of __SECT__.
Or maybe skip the warning if the given parameters are identical to
what was actually stored. Investigate.
- Apparently we are not missing a PSRAQ instruction, because it
doesn't exist. Check that it doesn't exist as an undocumented
instruction, or something stupid like that. 0.99
- Any assembled form starting 0x80 can also start 0x82. ndisasm 1.00
should know this. New special code in instruction encodings,
probably.
- Pointing an EQU at an external symbol now generates an error. There 1.05
may be a better way of handling this; we should look into it.
Ideally, the label mechanism should be changed to cope with one
label being declared relative to another - that may work, but could be
a pain to implement (or is it? it may be easy enough that you just
need to declare a new offset in the same segment...) This should be done
before v1.0 is released. There is a comment regarding this in labels.c,
towards the end of the file, which discusses ways of fixing this.
- nested %rep used to cause a panic. Now a more informative error 1.10
message is produced. This problem whould be fixed before v1.0.
See comment in switch() statement block for PP_REP in do_directive()
in preproc.c (line 1585, or thereabouts)
- Contribution: zgraeme.tar contains improved hash table routines ?
contributed by Graeme Defty <graeme@HK.Super.NET> for use in the
label manager.
- Contribution: zsyntax.zip contains a syntax-highlighting mode for ?
NASM, for use with the Aurora text editor (??).
- Contribution: zvim.zip contains a syntax-highlighting mode for ?
NASM, for use with vim.
- Contribution: zkendal1.zip and zkendal2.zip contain Kendall ?
Bennett's (<KendallB@scitechsoft.com>) alternative syntax stuff,
providing an alternative syntax mode for NASM which allows a macro
set to be written that allows the same source files to be
assembled with NASM and TASM.
- Add the UD2 instruction. ?
- Add the four instructions documented in 24368901.pdf (Intel's own ?
document).
- Some means of avoiding MOV memoffs,EAX which apparently the 1.10?
Pentium pairing detector thinks modifies EAX. Similar means of
choosing instruction encodings where necessary.
- The example of ..@ makes it clear that a ..@ label isn't just ?
local, but doesn't make it clear that it isn't just global either.
- hpa wants an evaluator operator for ceil(log2(x)). ?
- Extra reloc types in ELF: R_386_16 type 20, PC16 is 21, 8 is 22, PC8 is 23.
Add support for the 16s at least. ?
- Lazy section creation or selective section output, in COFF/win32 ?
at least and probably other formats: don't bother to emit a section
if it contains no data. Particularly the default auto-created
section. We believe zero-length sections crash at least WLINK (in
win32).
- Make the flags field in `struct itemplate' in insns.h a long ?
instead of an int.
- Implement %ifref to check whether a single-line macro has ever been ?
expanded since (last re) definition. Or maybe not. We'll see.
- add pointer to \k{insLEAVE} and \k{insENTER} in chapters about ?
mixed-language programming.
- Some equivalent to TASM's GLOBAL directive, ie something which ?
defines a symbol as external if it doesn't end up being defined
but defines it as public if it does end up being defined.
- Documentation doesn't explain about C++ name mangling. ?
- see if BITS can be made to do anything sensible in obj (eg set the ?
default new-segment property to Use32).
- OBJ: coalesce consecutive offset and segment fixups for the same ?
location into full-32bit-pointer fixups. This is apparently
necessary because some twazzock in the PowerBASIC development
team didn't deign to support the OMF spec the way the rest of the
world sees it.
- Allow % to be separated from the rest of a preproc directive, for ?
alternative directive indentation styles.
- __DATE__, __TIME__, and text variants of __NASM_MAJOR__ and ?
__NASM_MINOR__.
- Warn on TIMES combined with multi-line macros. TIMES gets applied 1.00
to first line only - should bring to users' attention.
- Re-work the evaluator, again, with a per-object-format fixup 1.10
routine, so as to be able to cope with section offsets "really"
being pure numbers; should be able to allow at _least_ the two
common idioms
TIMES 510-$ DB 0 ; bootsector
MOV AX,(PROG_END-100H)/16 ; .COM TSR
Would need to call the fixup throughout the evaluator, and the
fixup would have to be allowed to return UNKNOWN on pass one if it
had to. (_Always_ returning UNKNOWN on pass one, though a lovely
clean design, breaks the first of the above examples.)
- Preprocessor identifier concatenation? 1.10
- Arbitrary section names in `bin'. ?
Is this necessary? Is it even desirable?
- Ability to read from a pipe. Obviously not useful under dos, so 1.10
memory problems with storing entire input file aren't a problem
either.
Related topic: file caching under DOS/32 bit... 1.10?
maybe even implement discardable buffers that get thrown away
when we get a NULL returned from malloc(). Only really useful under
DOS. Think about it.
Another related topic: possibly spool out the pre-processed 1.10?
stuff to a file, to avoid having to re-process it. Possible problems
with preprocessor values not known on pass 1? Have a look...
Or maybe we can spool out a pre-parsed version...? 1.10
Need to investigate feasibility. Does the results from the parser
change from pass 1 to pass 2? Would it be feasible to alter it so that
the parser returns an invariant result, and this is then processed
afterwards to resolve label references, etc?
- Subsection support? ?
- A good ALIGN mechanism, similar to GAS's. GAS pads out space by 1.10?
means of the following (32-bit) instructions:
8DB42600000000 lea esi,[esi+0x0]
8DB600000000 lea esi,[esi+0x0]
8D742600 lea esi,[esi+0x0]
8D7600 lea esi,[esi+0x0]
8D36 lea esi,[esi]
90 nop
It uses up to two of these instructions to do up to 14-byte pads;
when more than 14 bytes are needed, it issues a (short) jump to
the end of the padded section and then NOPs the rest. Come up with
a similar scheme for 16 bit mode, and also come up with a way to
use it - internal to the assembler, so that programs using ALIGN
don't knock over preprocess-only mode.
Also re-work the macro form so that when given one argument in a
code section it calls this feature.
- Possibly a means whereby FP constants can be specified as ?
immediate operands to non-FP instructions.
* Possible syntax: MOV EAX,FLOAT 1.2 to get a single-precision FP
constant. Then maybe MOV EAX,HI_FLOAT 1.2 and MOV EAX,LO_FLOAT
1.2 to get the two halves of a double-precision one. Best to
ignore extended-precision in case it bites.
* Alternatively, maybe MOV EAX,FLOAT(4,0-4,1.2) to get bytes 0-4
(ie 0-3) of a 4-byte constant. Then HI_FLOAT is FLOAT(8,4-8,x)
and LO_FLOAT is FLOAT(8,0-4,x). But this version allows two-byte
chunks, one-byte chunks, even stranger chunks, and pieces of
ten-byte reals to be bandied around as well.
- A UNION macro might be quite cool, now that ABSOLUTE is sane ?
enough to be able to handle it.
- An equivalent to gcc's ## stringify operator, plus string ?
concatenation, somehow implemented without undue ugliness, so as
to be able to do `%include "/my/path/%1"' in a macro, or something
similar...
- Actually _do_ something with the processor, privileged and 1.10
undocumented flags in the instruction table. When this happens,
consider allowing PMULHRW to map to either of the Cyrix or AMD
versions?
- Maybe NEC V20/V30 instructions? ?
- Yet more object formats.
* Possibly direct support for .EXE files? 1.10
- Symbol map in binary format. Format-specific options... 1.10?
- REDESIGN: Think about EQU dependency, and about start-point 1.20?
specification in OBJ. Possibly re-think directive support.
- Think about a wrapper program like gcc? Possibly invent a _patch_ 2.00?
for gcc so that it can take .asm files on the command line?
- If a wrapper happens, think about adding an option to cause the ?
resulting executable file to be executed immediately, thus
allowing NASM source files to have #!... (probably silly)
- Multi-platform support? If so: definitely Alpha; possibly Java ?
byte code; probably ARM/StrongARM; maybe Sparc; maybe Mips; maybe
Vax. Perhaps Z80 and 6502, just for a laugh?
- Consider a 'verbose' option that prints information about the resulting ?
object file onto stdout.