Closed Bug 624868 Opened 15 years ago Closed 15 years ago

non-portable comment syntax in .s files

Categories

(NSPR :: NSPR, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nlewycky, Assigned: wtc)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.45 Safari/534.13 Build Identifier: version 4.8.3 The comments in nspr/v4_8_3/pr/src/md/unix/os_Linux_x86.s, os_Linux_x86_64.s, os_SunOS_x86.s and os_SunOS_x86_64.s Reproducible: Always
Attached patch proposed patchSplinter Review
the comments in those files use an undocumented single-'/' comment format. The attached patch changes the all to use the *also undocumented* but at least intentional // format. This makes a difference because LLVM's assembler supports the // format comments but not / comments. See http://sourceware.org/bugzilla/show_bug.cgi?id=12390 for the matching bug in binutils.
Thanks for the patch. What's the documented comment format for .s files? The C style /* */ format? Patch checked in on the NSPR trunk (NSPR 4.8.8). Checking in os_Linux_x86.s; /cvsroot/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86.s,v <-- os_Linux_x86.s new revision: 3.10; previous revision: 3.9 done Checking in os_Linux_x86_64.s; /cvsroot/mozilla/nsprpub/pr/src/md/unix/os_Linux_x86_64.s,v <-- os_Linux_x86_64.s new revision: 1.5; previous revision: 1.4 done Checking in os_SunOS_x86.s; /cvsroot/mozilla/nsprpub/pr/src/md/unix/os_SunOS_x86.s,v <-- os_SunOS_x86.s new revision: 3.12; previous revision: 3.11 done Checking in os_SunOS_x86_64.s; /cvsroot/mozilla/nsprpub/pr/src/md/unix/os_SunOS_x86_64.s,v <-- os_SunOS_x86_64.s new revision: 1.4; previous revision: 1.3 done
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.8.8
Yep, it's /* and */ as listed in http://sourceware.org/binutils/docs-2.21/as/Comments.html#Comments . I really think they should add // to the docs since it's obvious (to me) that they want to support C-style comments (/* and */) and // is part of C99... Thanks for committing the patch!
Thanks for the URL. So for these x86 and x86-64 files, we can also use '#' to start line comments. I hope // will be added to the docs.
OS: Linux → Windows CE
OS: Windows CE → Linux
Is this going to be merged back into mozilla-central?
Every checkin in NSPR's CVS repository will be merged into mozilla-central.
Ehsan, Mozilla's Hg NSPR repository is a downstream copy of Mozilla's CVS NSPR repository.
Thanks for the clarification. Is there any bug for tracking the merge that I need to get myself CC'ed on?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: