jsnum: Workaround for fstcw until Clang will support it

RESOLVED WORKSFORME

Status

()

Core
JavaScript Engine
RESOLVED WORKSFORME
8 years ago
8 years ago

People

(Reporter: Nomis101, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

8 years ago
If you build FF/TB with Clang in i386, than it stops with the below error. This is an integrated assembler bug, but for llvm with very low priority. So a workaround would be nice, until llvm will support it. As you can read in Comment 2:
> A work around would be to use a "wait" instruction before the "fnstcw"
> instruction, which is the same as the "fstcw".
http://llvm.org/bugs/show_bug.cgi?id=7557#c2

The error is:
/Volumes/Developer/temp/src/mozilla/js/src/jscntxt.h:2213:14: warning: 
      unknown pragma ignored [-Wunknown-pragmas]
# pragma GCC visibility pop
             ^
/Volumes/Developer/temp/src/mozilla/js/src/jsnum.cpp:673:9: error: 
      unrecognized instruction
    asm("fstcw %0" : "=m" (control) : );
        ^
<inline asm>:1:2: note: instantated into assembly here
        fstcw 26(%esp)
        ^
/Volumes/Developer/temp/src/mozilla/js/src/jsnum.cpp:673:9: error: 
      unrecognized instruction
    asm("fstcw %0" : "=m" (control) : );
        ^
<inline asm>:1:2: note: instantated into assembly here
        fstcw 42(%esp)
        ^
5 warnings and 2 errors generated.
make[4]: *** [jsnum.o] Error 1
make[4]: *** Waiting for unfinished jobs....
4 warnings generated.
2 warnings generated.
2 warnings generated.
5 warnings generated.
2 warnings generated.
2 warnings generated.
2 warnings generated.
make[3]: *** [libs_tier_js] Error 2
make[2]: *** [tier_js] Error 2
make[1]: *** [default] Error 2
make: *** [build] Error 2
(Reporter)

Comment 1

8 years ago
This should now be fixed in clang since r115015 (didn't test it):
http://llvm.org/bugs/show_bug.cgi?id=7557#c5
So we don't need a workaround anymore.
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.