mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 603560 Workaround for Solaris Studio compiler, it failed to compile static const int x = { 1 }; r=edwsmith,nnethercote
--HG-- extra : convert_revision : c4f9bb1b1fd4816604d86045806423025f8e6e4e
This commit is contained in:
parent
7eda06e559
commit
dc409701ce
@ -61,7 +61,12 @@ namespace nanojit
|
||||
#if defined(NJ_USE_UINT32_REGISTER)
|
||||
#define REGNUM(r) (r)
|
||||
|
||||
#elif defined(DEBUG)
|
||||
#elif defined(DEBUG) || defined(__SUNPRO_CC)
|
||||
// Always use struct declaration for 'Register' with
|
||||
// Solaris Studio C++ compiler, because it has a bug:
|
||||
// Scalar type can not be initialized by '{1}'.
|
||||
// See bug 603560.
|
||||
|
||||
struct Register {
|
||||
uint32_t n; // the register number
|
||||
};
|
||||
|
@ -1137,15 +1137,6 @@ namespace nanojit
|
||||
btr RegAlloc::free[ecx], eax // free &= ~rmask(i)
|
||||
mov r, eax
|
||||
}
|
||||
#elif defined __SUNPRO_CC
|
||||
// Workaround for Sun Studio bug on handler embeded asm code.
|
||||
// See bug 544447 for detail.
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=544447
|
||||
asm(
|
||||
"bsf %1, %%edi\n\t"
|
||||
"btr %%edi, (%2)\n\t"
|
||||
"movl %%edi, %0\n\t"
|
||||
: "=a"(r) : "d"(set), "c"(®s.free) : "%edi", "memory" );
|
||||
#else
|
||||
asm(
|
||||
"bsf %1, %%eax\n\t"
|
||||
|
Loading…
x
Reference in New Issue
Block a user