Closed
Bug 491751
Opened 17 years ago
Closed 17 years ago
compiler error in jsregexp.cpp on Mac OS X 10.6 (10A335), gcc-4.2, target x86-64
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: jaas, Unassigned)
Details
Attachments
(2 files)
There appears to be a compiler error when compiling "jsregexp.cpp" using gcc4.2 on Mac OS X 10.6 (10A335) and targeting x86-64 (no cross compile).
c++ -o jsregexp.o -c -fvisibility=hidden -DOSTYPE=\"Darwin10.0.0d7\" -DOSARCH=Darwin -DEXPORT_JS_API -DJS_USE_SAFE_ARENA -I/Users/josh/src/mozilla/ff_192_debug/js/src -I. -I./../../dist/include -I./../../dist/include/js -I/Users/josh/src/mozilla/ff_192_debug/objdir-debug/dist/include/nspr -I/sdk/include -I/Users/josh/src/mozilla/ff_192_debug/js/src -fPIC -fno-rtti -fno-exceptions -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Wno-long-long -fno-strict-aliasing -fpascal-strings -fno-common -fshort-wchar -pthread -pipe -DDEBUG -D_DEBUG -DDEBUG_josh -DTRACING -g -DMOZILLA_CLIENT -include ./mozilla-config.h -Wp,-MD,.deps/jsregexp.pp /Users/josh/src/mozilla/ff_192_debug/js/src/jsregexp.cpp
{standard input}:21790:suffix or operands invalid for `call'
The bad asm line is "call *%esi" at line 21790 in the function "MatchRegExp".
I have filed Apple bug 6862969 on this.
Comment 3•17 years ago
|
||
Is this bug asking for us to change something in there? What change would you propose?
Comment 4•17 years ago
|
||
Code is coming from here. Somehow JS_NO_FASTCALL is set in the build.
#if defined(JS_NO_FASTCALL)
#define NJ_NO_FASTCALL
#if defined(AVMPLUS_IA32)
#define SIMULATE_FASTCALL(lr, state_ptr, frag_ptr, func_addr) \
asm volatile( \
"call *%%esi" \
: "=a" (lr) \
: "c" (state_ptr), "d" (frag_ptr), "S" (func_addr) \
: "memory", "cc" \
);
#endif /* defined(AVMPLUS_IA32) */
#endif /* defined(JS_NO_FASTCALL) */
Comment 5•17 years ago
|
||
Also, note that we don't have a 64-bit backend right now in the TM tree as we are switching from our old code to the new 64-bit x86 nanojit code. I will try to land the new backend shortly after 3.5 is wrapped up.
(In reply to comment #3)
> Is this bug asking for us to change something in there? What change would you
> propose?
I am not asking anything in particular, maybe there is something we can do, maybe there isn't, but either way we need to track the failure.
->Invalid
The problem was that the guessed target for darwin is based on the kernel architecture, not the default application binary target (on most hardware the 10.6 kernel is 32-bit but the default binary architecture is 64-bit). That being the case, we targetted IA32 nanojit incorrectly when doing a 64-bit build. If you specify the correct target manually it works, we'll have to fix the target guessing. I've discussed doing that with Ted, we'll calculate based on gcc's default arch instead of the kernel.
--target=x86_64-apple-darwin8.0.0
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•