Bug 660335 - Backing out e0cf03a641cf and a968740930d3 due to red.

This commit is contained in:
Justin Lebar 2011-06-08 15:51:41 -04:00
parent ecb6df75dd
commit 6bb6857304
2 changed files with 2 additions and 34 deletions

View File

@ -163,34 +163,6 @@
#define NS_CONSTRUCTOR_FASTCALL
#endif
/**
* NS_DEFINE_ALIGNED lets you define a variable aligned to a given number of
* bytes.
*
* For instance,
*
* NS_DEFINE_ALIGNED(PRUint32, foo, 16);
*
* defines a variable |foo| of type PRUint32 which lives on a 16-byte (128-bit)
* boundary.
*
* This currently only works on GCC and MSVC. On other compilers, we simply
* don't align.
*/
#if defined(__GNUC__)
#define NS_DEFINE_ALIGNED(type, name, alignment) \
type name __attribute__((aligned (alignment)))
#elif defined(_MSC_VER) && (_MSC_VER >= 1300)
#define NS_DEFINE_ALIGNED(type, name, alignment) \
__declspec(align(alignment)) type name
#else
#define NS_DEFINE_ALIGNED(type, name, alignment) \
type name
#endif
/*
* NS_DEFCALL undoes the effect of a global regparm/stdcall setting
* so that xptcall works correctly.

View File

@ -52,12 +52,11 @@
struct nsID {
/**
* @name Identifier values. Align these to start at an 8-byte (64-bit)
* boundary so we can use 64-bit loads in nsID::Equals.
* @name Identifier values
*/
//@{
NS_DEFINE_ALIGNED(PRUint32, m0, 8);
PRUint32 m0;
PRUint16 m1;
PRUint16 m2;
PRUint8 m3[8];
@ -106,9 +105,6 @@ struct nsID {
//@}
};
// Ensure that we didn't accidentally change the size of nsID.
PR_STATIC_ASSERT(sizeof(nsID) == 16);
/*
* Class IDs
*/