Back out f59bb340e3e6 (bug 826481) for Android build bustage

CLOSED TREE
This commit is contained in:
Phil Ringnalda 2014-02-18 20:34:10 -08:00
parent 781eb8d055
commit 13d7caaae9
34 changed files with 46 additions and 38 deletions

View File

@ -15,3 +15,5 @@
#define SYMBOL_UNDERSCORE
#endif
#define ATTRIBUTE_USED __attribute__ ((__used__))

View File

@ -11,7 +11,7 @@
/* Prototype specifies unmangled function name and disables unused warning */
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)
__asm__("PrepareAndDispatch") ATTRIBUTE_USED;
__asm__("PrepareAndDispatch") __attribute__((used));
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)

View File

@ -28,7 +28,7 @@ const uint32_t FPR_COUNT = 8;
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
uint64_t * args, uint64_t * gpregs, double *fpregs)
{

View File

@ -12,9 +12,21 @@
#error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
#endif
#ifdef __GNUC__
/* This tells gcc3.4+ not to optimize away symbols.
* @see http://gcc.gnu.org/gcc-3.4/changes.html
*/
#define DONT_DROP_OR_WARN __attribute__((used))
#else
/* This tells older gccs not to warn about unused vairables.
* @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
*/
#define DONT_DROP_OR_WARN __attribute__((unused))
#endif
/* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args) asm("_PrepareAndDispatch")
ATTRIBUTE_USED;
DONT_DROP_OR_WARN;
#ifdef __ARM_EABI__
#define DOUBLEWORD_ALIGN(p) ((uint32_t *)((((uint32_t)(p)) + 7) & 0xfffffff8))

View File

@ -7,7 +7,7 @@
#include "xptcprivate.h"
nsresult ATTRIBUTE_USED
nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
#define PARAM_BUFFER_COUNT 16

View File

@ -24,7 +24,7 @@
static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args) asm("_PrepareAndDispatch")
DONT_DROP_OR_WARN;
static nsresult ATTRIBUTE_USED
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
#define PARAM_BUFFER_COUNT 16

View File

@ -16,7 +16,7 @@
/* Implement shared vtbl methods. */
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
{

View File

@ -17,7 +17,7 @@
/* Implement shared vtbl methods. */
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
uint64_t* intargs, uint64_t* floatargs, uint64_t* restargs)
{

View File

@ -11,7 +11,7 @@
/* Prototype specifies unmangled function name and disables unused warning */
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)
__asm__("PrepareAndDispatch") ATTRIBUTE_USED;
__asm__("PrepareAndDispatch") __attribute__((used));
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args)

View File

@ -9,7 +9,7 @@
#include "xptiprivate.h"
extern "C" {
nsresult ATTRIBUTE_USED
nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
#define PARAM_BUFFER_COUNT 16

View File

@ -9,7 +9,7 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
static nsresult ATTRIBUTE_USED
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
uint32_t* a_gpr, uint64_t *a_fpr, uint32_t *a_ov)
{

View File

@ -9,7 +9,7 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
static nsresult ATTRIBUTE_USED
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
uint64_t* a_gpr, uint64_t *a_fpr, uint64_t *a_ov)
{

View File

@ -15,7 +15,7 @@
* Args contains a0-3 and then the stack.
* Because a0 is 'this', we want to skip it
*/
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
args++; // always skip over a0

View File

@ -20,7 +20,7 @@
* they are stored on the stack at address "args".
*
*/
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint64_t* args,
uint64_t *gprData, double *fprData)
{

View File

@ -12,7 +12,7 @@
#endif
extern "C" {
static nsresult ATTRIBUTE_USED
static nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
#define PARAM_BUFFER_COUNT 16

View File

@ -14,7 +14,7 @@
#error "This code is for HP-PA RISC 32 bit mode only"
#endif
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex,
uint32_t* args, uint32_t* floatargs)
{

View File

@ -32,7 +32,7 @@
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
#include <stdio.h>
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self,
uint64_t methodIndex,
uint64_t* args,

View File

@ -16,7 +16,7 @@
The args pointer has been set to the start of the parameters BEYOND the ones
arriving in registers
*/
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args, uint32_t *gprData, double *fprData)
{
typedef struct {

View File

@ -15,7 +15,7 @@
The args pointer has been set to the start of the parameters BEYOND the ones
arriving in registers
*/
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args, uint64_t *gprData, double *fprData)
{

View File

@ -31,7 +31,7 @@
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self,
uint32_t methodIndex,
uint32_t* args,

View File

@ -27,7 +27,7 @@
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self,
uint32_t methodIndex,
uint32_t* args,

View File

@ -28,7 +28,7 @@
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self,
uint32_t methodIndex,
uint32_t* args,

View File

@ -35,7 +35,7 @@
* http://developer.apple.com/documentation/DeveloperTools/Conceptual/
* MachORuntime/PowerPCConventions/chapter_3_section_1.html */
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(
nsXPTCStubBase *self,
uint32_t methodIndex,

View File

@ -11,7 +11,7 @@
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args)
{

View File

@ -9,7 +9,7 @@
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{

View File

@ -9,7 +9,7 @@
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{

View File

@ -10,7 +10,7 @@
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{

View File

@ -11,7 +11,7 @@
#if defined(sparc) || defined(__sparc__)
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint64_t methodIndex, uint64_t* args)
{

View File

@ -30,7 +30,7 @@ const uint32_t FPR_COUNT = 8;
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
uint64_t * args, uint64_t * gpregs, double *fpregs)
{

View File

@ -30,7 +30,7 @@ const uint32_t FPR_COUNT = 8;
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
uint64_t * args, uint64_t * gpregs, double *fpregs)
{

View File

@ -30,7 +30,7 @@ const uint32_t FPR_COUNT = 8;
// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
// and then the method gets called.
extern "C" nsresult ATTRIBUTE_USED
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
uint64_t * args, uint64_t * gpregs, double *fpregs)
{

View File

@ -9,7 +9,7 @@
#include "xptcprivate.h"
#include "xptiprivate.h"
nsresult ATTRIBUTE_USED
nsresult
PrepareAndDispatch(nsXPTCStubBase* self, uint32_t methodIndex, uint32_t* args)
{
#define PARAM_BUFFER_COUNT 16

View File

@ -16,7 +16,7 @@
# error xptcstubs_x86_64_gnu.cpp being used unexpectedly
#endif
extern "C" nsresult __attribute__((__used__))
extern "C" nsresult
PrepareAndDispatch(nsXPTCStubBase * self, uint32_t methodIndex,
uint64_t * args, uint64_t * gprData, double *fprData)
{

View File

@ -58,10 +58,4 @@ public:
#undef STUB_ENTRY
#undef SENTINEL_ENTRY
#if defined(__clang__) || defined(__GNUCC__)
#define ATTRIBUTE_USED __attribute__ ((__used__))
#else
#define ATTRIBUTE_USED
#endif
#endif /* xptcprivate_h___ */