Rev 871 | Rev 1124 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 871 | Rev 1078 | ||
---|---|---|---|
Line 29... | Line 29... | ||
29 | #ifndef __ia64_FADDR_H__ |
29 | #ifndef __ia64_FADDR_H__ |
30 | #define __ia64_FADDR_H__ |
30 | #define __ia64_FADDR_H__ |
31 | 31 | ||
32 | #include <arch/types.h> |
32 | #include <arch/types.h> |
33 | 33 | ||
34 | static __address FADDR(void (* fptr)(void)); |
- | |
35 | - | ||
36 | /** |
34 | /** |
37 | * |
35 | * |
38 | * Calculate absolute address of function |
36 | * Calculate absolute address of function |
39 | * referenced by fptr pointer. |
37 | * referenced by fptr pointer. |
40 | * |
38 | * |
41 | * @param fptr Function pointer. |
39 | * @param fptr Function pointer. |
42 | * |
40 | * |
43 | */ |
41 | */ |
44 | inline __address FADDR(void (* fptr)(void)) { |
42 | static inline __address FADDR(void (* fptr)()) { |
45 | __address faddr; |
43 | __address faddr; |
46 | 44 | ||
47 | /*Deprecated assembler version*/ |
- | |
48 | /* |
- | |
49 | __asm__( |
- | |
50 | "ld8 %0 = [%1]\n\t" |
- | |
51 | : "=r" (faddr) |
- | |
52 | : "r" (fptr) |
- | |
53 | ); |
- | |
54 | */ |
- | |
55 | - | ||
56 | faddr = *((__address *)(fptr));; |
45 | faddr = *((__address *)(fptr));; |
57 | return faddr; |
46 | return faddr; |
58 | } |
47 | } |
59 | 48 | ||
60 | #endif |
49 | #endif |