Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

rebuilding NASM 0.98.39 (without MMX/3DNOW/686/SSE) (Developers)

posted by Rugxulo Homepage, Usono, 23.03.2020, 04:27

> > The 486 and 586 didn't add much (not counting MMX, 3DNow!), so I felt I
> > should keep those. But everything else (Cyrix, MMX, 3DNow!, P6, IA64
> > [JMPE], SSE[123]) I deleted. I also had to use "-d" (merge duplicate
>
> (P6 has a highly useful cmov that reduces branching, and is a substitute
> for a branch instruction and a mov. IIRC it is 3 bytes and replaces a one
> byte branch and two bytes mov. (in both cases + size of imm), equal size,
> better performance)

I don't remember the encoding details. I thought CMOV was smaller?? But it's never faster (AFAIK), and it's harder to patch out. I did exchange a few emails with CWS (years ago) about maybe adding [F]CMOV* emulation to DJGPP's EMU387, but he only barely gave me a hint (SIGILL?) and didn't worry about it (among many other things). I don't blame him, but it was barely frustrating for me (at the time, less so nowadays). DOSBox doesn't support anything beyond Pentium (default is fast 486 DX2), so no CMOV there. (Not usually a problem there specifically, though.) It is annoying when DJGPP/GCC builds are 686+ only for no obvious advantage.

The whole point of recompiling was to have an 8086-hosted build of NASM since their old build was 186 (and didn't work under 8086tinyplus). Even the TinyAsm guy lamented that. (His is 8086-only target! ... in NASM syntax.) Old NASM 0.97 worked but ran out of memory easily (too many output formats compiled in). OpenWatcom compiled 0.98.39 okay as Large model, but TC++ wouldn't fit (Huge only), DGROUP overflow, until I trimmed a bunch of instructions. Then it would fit in Large, but I'm not aware of any obvious speedups or improvements there otherwise. (Those two previous .EXEs had all instructions, up through SSE3. So only this "lite" one omits some stuff.)

I did double-check for you. Not counting Cyrix (irrelevant to me, for this particular .EXE), P6 only is 35 instructions. So it's only an extra 2 kb of code space used, so it probably wouldn't have hurt to include here, especially with "cpu 8086" directives to warn unwary users. Heck, this wouldn't fit at all in Large without "-d" (merge duplicate strings), even without P6. But I don't have TDUMP in this TC++ 1.01 freeware. OW's WDUMP didn't work, and WDIS didn't show anything obvious from quick glance. Presumably the OW build is better overall.

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 269 users online (0 registered, 269 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum