logo       

Re: Dredging up bugs...: msg#00023

lang.nasm.devel

Subject: Re: Dredging up bugs...

Frank Kotler wrote:
"H. Peter Anvin" wrote:

Urk. I just found not just one, but two bugs, related to the same file.

The bugs are:

#1. The optimizer doesn't converge; it will run an arbitrary number of
passes (if you let it, it'll run 1000 passes.)


I can get it to assemble using "-O3", by defining "HEXDATE" and
"DATE_STR" on the command line - not from the makefile. I suspect a
problem with the way Nasm is picking up (or not) those defines from the
Makefile(?). Nasm barfs up that "phase error" message as a "bonus" if
*anything* goes wrong (a "mini-bug"). I don't think the optimizer
actually fails to converge.


That's different from what I'm seeing. I have run this from the command line as well as from the Makefile and am seeing the same behaviour.

What *does* make it work, however, is to change FILENAME_MAX and FILENAME_MAX_LG2 from equ's to %defines. If I assemble with -O0, it complains that these are used before they are defined, which is incorrect.


#2. The sequencing of passes when this happens is such that a list file
is never produced.

H.P.Recktenwald had a "patch" to emit a list file no matter what... As I
recall, it involved not setting "terminate_after_phase"... emitted a bad
output file, too. Just removing "remove(listname)" at line 295 of nasm.c
seems *not* to do it, as I recall. Was a long time ago I looked at it.


In my case it emits an output file, but I have no way of knowing if it is any good.

-hpa


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise