--- pmc.h (revision 214857) +++ pmc.h (local) @@ -584,11 +584,30 @@ * PMC commands */ +#define PAD_(t) (sizeof(register_t) <= sizeof(t) ? \ + 0 : sizeof(register_t) - sizeof(t)) + +#if BYTE_ORDER == LITTLE_ENDIAN +#define PADL_(t) 0 +#define PADR_(t) PAD_(t) +#else +#define PADL_(t) PAD_(t) +#define PADR_(t) 0 +#endif + struct pmc_syscall_args { + char code_l_[PADL_(uint32_t)]; uint32_t pmop_code; /* one of PMC_OP_* */ + char code_r_[PADR_(uint32_t)]; + char data_l_[PADL_(void*)]; void *pmop_data; /* syscall parameter */ + char data_r_[PADR_(void*)]; }; +#undef PAD_ +#undef PADL_ +#undef PADR_ + /* * Interface to processor specific s1tuff */