Closed Bug 502549 Opened 16 years ago Closed 14 years ago

xptcall port for Symbian

Categories

(Core :: XPCOM, defect)

All
Symbian
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: m_kato, Assigned: m_kato)

References

Details

Attachments

(1 file, 1 obsolete file)

Enable xptcall code for Symbain. - Symbian emulator is x86 arch (work as Windows application). This uses CodeWarrior for x86. - Symbian ARM uses GCC or ARM RVCT. But current code is for gcc only.
Attached patch patch v1 for winscw (obsolete) — Splinter Review
Comment on attachment 386944 [details] [diff] [review] patch v1 for winscw This is WINSCW (Symbian emulator) only
Attachment #386944 - Flags: review?(benjamin)
Was this code copied from an existing file? If so, why do we need a new copy of the file, instead of just building the existing copy? Does the x86 ABI for symbian differ from both the GCC and MSVC ABI?
(In reply to comment #3) > Was this code copied from an existing file? If so, why do we need a new copy of > the file, instead of just building the existing copy? Does the x86 ABI for > symbian differ from both the GCC and MSVC ABI? This is copy and modified. if I can add "#ifdef __SYMBIAN32__" to Linux ARM code and Windows code, I modify it. Symbian emulator is same as Windows ABI. Sybmian ARM is same of ARM EABI. (same as *nix).
Attachment #386944 - Flags: review?(benjamin)
Comment on attachment 386944 [details] [diff] [review] patch v1 for winscw I'd prefer that, yes. Re-request review on this patch if it's impractical.
Attached patch patch v2Splinter Review
Attachment #386944 - Attachment is obsolete: true
Attachment #388011 - Flags: review?(benjamin)
Attachment #388011 - Flags: review?(benjamin) → review-
Comment on attachment 388011 [details] [diff] [review] patch v2 I'm not convinced we really want a md/symbian directory. Could we just put the logic in md/unix? >diff --git a/xpcom/reflect/xptcall/src/md/symbian/Makefile.in b/xpcom/reflect/xptcall/src/md/symbian/Makefile.in >+ifeq ($(OS_TARGET),WINSCW) >+CPPSRCS = ../win32/xptcinvoke.cpp ../win32/xptcstubs.cpp >+else >+CPPSRCS = ../unix/xptcinvoke_arm.cpp ../unix/xptcstubs_arm.cpp >+endif relative paths in CPPSRCS will confuse the dependency system. Instead do: ifeq ($(OS_TARGET),WINSCW)) vpath %.cpp $(srcdir)/../win32 CPPSRCS += xptcinvoke.cpp xptcstubs.cpp else vpath %.cpp $(srcdir)/../unix CPPSRCS += xptcinvoke_arm.cpp xptcstubs_arm.cpp endif >diff --git a/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp b/xpcom/reflect/xptcall/src/md/win32/xptcstubs.cpp > // these macros get expanded (many times) in the file #included below >+#ifdef __SYMBIAN32__ >+#define STUB_ENTRY(n) \ >+nsresult nsXPTCStubBase::Stub##n() \ >+{ __asm mov ecx, n __asm jmp SharedStub } >+#else > #define STUB_ENTRY(n) \ > __declspec(naked) nsresult __stdcall nsXPTCStubBase::Stub##n() \ > { __asm mov ecx, n __asm jmp SharedStub } >- >+#endif /* __SYMBIAN32__ */ > #else This duplication seems weird. Does your compiler really not support __declspec(naked)? If so, create a NAKED macro which expands to __declspec(naked) for win32 and nothing for symbian. Use NS_STDCALL for __stdcall expansion. >+#ifdef __SYMBIAN32__ >+#define SENTINEL_ENTRY(n) \ >+nsresult nsXPTCStubBase::Sentinel##n() \ >+{ \ >+ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ >+ return NS_ERROR_NOT_IMPLEMENTED; \ >+} >+#else > #define SENTINEL_ENTRY(n) \ > nsresult __stdcall nsXPTCStubBase::Sentinel##n() \ > { \ > NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ > return NS_ERROR_NOT_IMPLEMENTED; \ > } >+#endif /* __SYMBIAN32__ */ Use NS_STDCALL instead of a two-part block here as well.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: