non-portable comment syntax in .s files

RESOLVED FIXED in 4.8.8

Status

P2
normal
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: nlewycky, Assigned: wtc)

Tracking

other
4.8.8
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
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
(Reporter)

Comment 1

8 years ago
Created attachment 502948 [details] [diff] [review]
proposed patch

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.
(Assignee)

Comment 2

8 years ago
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
Last Resolved: 8 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → 4.8.8
(Reporter)

Comment 3

8 years ago
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!
(Assignee)

Comment 4

8 years ago
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
(Assignee)

Updated

8 years ago
OS: Windows CE → Linux

Comment 5

8 years ago
Is this going to be merged back into mozilla-central?
(Assignee)

Comment 6

8 years ago
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.

Comment 8

8 years ago
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.