/* *Ourregistersarealwaysunsignedlongs,whetherwe'rea32bit *processor64bit,oneithera64bitor32bitkernel. * *Thismacroreliesonelf_regs[i]havingtherighttypetotruncateto, *eitheru32oru64.Itdefinesthebodyoftheelf_core_copy_regs *function,eitherthenativeonewithelf_gregset_telf_regsor *the32-bitonewithelf_gregset_t32elf_regs.
*/ #define PPC_ELF_CORE_COPY_REGS(elf_regs, regs) \ int i, nregs = min(sizeof(*regs) / sizeof(unsignedlong), \
(size_t)ELF_NGREG); \ for (i = 0; i < nregs; i++) \
elf_regs[i] = ((unsignedlong *) regs)[i]; \
memset(&elf_regs[i], 0, (ELF_NGREG - i) * sizeof(elf_regs[0]))
/* Common routine for both 32-bit and 64-bit native processes */ staticinlinevoid ppc_elf_core_copy_regs(elf_gregset_t elf_regs, struct pt_regs *regs)
{
PPC_ELF_CORE_COPY_REGS(elf_regs, regs);
} #define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
/* ELF_HWCAP yields a mask that user programs can use to figure out what instructionsetthiscpusupports.Thiscouldbedoneinuserspace,
but it's not easy, and we've already done it here. */ # define ELF_HWCAP (cur_cpu_spec->cpu_user_features) # define ELF_HWCAP2 (cur_cpu_spec->cpu_user_features2)
/* This yields a string that ld.so will use to load implementation specificlibrariesforoptimization.Thisismorespecificin
intent than poking at uname or /proc/cpuinfo. */
#define ELF_PLATFORM (cur_cpu_spec->platform)
/* While ELF_PLATFORM indicates the ISA supported by the platform, it *maynotaccuratelyreflecttheunderlyingbehaviorofthehardware *(asinthecaseofrunninginPower5+compatibilitymodeona *Power6machine).ELF_BASE_PLATFORMallowsld.sotoloadlibraries *thataretunedfortherealhardware.
*/ #define ELF_BASE_PLATFORM (powerpc_base_platform)
#ifdef __powerpc64__ # define ELF_PLAT_INIT(_r, load_addr) do { \
_r->gpr[2] = load_addr; \
} while (0) #endif/* __powerpc64__ */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.