Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sparc64/include/asm.h
Show All 35 Lines | |||||
#ifndef _MACHINE_ASM_H_ | #ifndef _MACHINE_ASM_H_ | ||||
#define _MACHINE_ASM_H_ | #define _MACHINE_ASM_H_ | ||||
#define __ASM__ | #define __ASM__ | ||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
#ifdef PIC | #ifdef __PIC__ | ||||
#define PIC_PROLOGUE(r1, r2) \ | #define PIC_PROLOGUE(r1, r2) \ | ||||
sethi %hi(_GLOBAL_OFFSET_TABLE_-4), r1 ; \ | sethi %hi(_GLOBAL_OFFSET_TABLE_-4), r1 ; \ | ||||
rd %pc, r2 ; \ | rd %pc, r2 ; \ | ||||
or r1, %lo(_GLOBAL_OFFSET_TABLE_+4), r1 ; \ | or r1, %lo(_GLOBAL_OFFSET_TABLE_+4), r1 ; \ | ||||
add r2, r1, r2 | add r2, r1, r2 | ||||
#define SET(name, r1, r2) \ | #define SET(name, r1, r2) \ | ||||
set name, r2 ; \ | set name, r2 ; \ | ||||
ldx [r1 + r2], r2 | ldx [r1 + r2], r2 | ||||
▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines |