asmacros.h (757) | asmacros.h (1321) |
---|---|
1#define ALIGN_DATA .align 2 /* 4 byte alignment, zero filled */ 2#define ALIGN_TEXT .align 2,0x90 /* 4-byte alignment, nop filled */ 3#define SUPERALIGN_TEXT .align 4,0x90 /* 16-byte alignment (better for 486), nop filled */ 4 5#define GEN_ENTRY(name) ALIGN_TEXT; .globl name; name: 6#define NON_GPROF_ENTRY(name) GEN_ENTRY(_/**/name) 7 | 1#define ALIGN_DATA .align 2 /* 4 byte alignment, zero filled */ 2#define ALIGN_TEXT .align 2,0x90 /* 4-byte alignment, nop filled */ 3#define SUPERALIGN_TEXT .align 4,0x90 /* 16-byte alignment (better for 486), nop filled */ 4 5#define GEN_ENTRY(name) ALIGN_TEXT; .globl name; name: 6#define NON_GPROF_ENTRY(name) GEN_ENTRY(_/**/name) 7 |
8/* These three are place holders for future changes to the profiling code */ 9#define MCOUNT_LABEL(name) 10#define MEXITCOUNT 11#define FAKE_MCOUNT(caller) 12 |
|
8#ifdef GPROF 9/* 10 * ALTENTRY() must be before a corresponding ENTRY() so that it can jump 11 * over the mcounting. 12 */ 13#define ALTENTRY(name) GEN_ENTRY(_/**/name); MCOUNT; jmp 2f 14#define ENTRY(name) GEN_ENTRY(_/**/name); MCOUNT; 2: 15/* --- 9 unchanged lines hidden (view full) --- 25#else 26/* 27 * ALTENTRY() has to align because it is before a corresponding ENTRY(). 28 * ENTRY() has to align to because there may be no ALTENTRY() before it. 29 * If there is a previous ALTENTRY() then the alignment code is empty. 30 */ 31#define ALTENTRY(name) GEN_ENTRY(_/**/name) 32#define ENTRY(name) GEN_ENTRY(_/**/name) | 13#ifdef GPROF 14/* 15 * ALTENTRY() must be before a corresponding ENTRY() so that it can jump 16 * over the mcounting. 17 */ 18#define ALTENTRY(name) GEN_ENTRY(_/**/name); MCOUNT; jmp 2f 19#define ENTRY(name) GEN_ENTRY(_/**/name); MCOUNT; 2: 20/* --- 9 unchanged lines hidden (view full) --- 30#else 31/* 32 * ALTENTRY() has to align because it is before a corresponding ENTRY(). 33 * ENTRY() has to align to because there may be no ALTENTRY() before it. 34 * If there is a previous ALTENTRY() then the alignment code is empty. 35 */ 36#define ALTENTRY(name) GEN_ENTRY(_/**/name) 37#define ENTRY(name) GEN_ENTRY(_/**/name) |
38#define MCOUNT |
|
33 34#endif 35 36#ifdef DUMMY_NOPS /* this will break some older machines */ 37#define FASTER_NOP 38#define NOP 39#else 40#define FASTER_NOP pushl %eax ; inb $0x84,%al ; popl %eax 41#define NOP pushl %eax ; inb $0x84,%al ; inb $0x84,%al ; popl %eax 42#endif 43 | 39 40#endif 41 42#ifdef DUMMY_NOPS /* this will break some older machines */ 43#define FASTER_NOP 44#define NOP 45#else 46#define FASTER_NOP pushl %eax ; inb $0x84,%al ; popl %eax 47#define NOP pushl %eax ; inb $0x84,%al ; inb $0x84,%al ; popl %eax 48#endif 49 |