Rev 534 | Rev 622 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 534 | Rev 581 | ||
|---|---|---|---|
| Line 40... | Line 40... | ||
| 40 | /** halt the simulator */ |
40 | /** halt the simulator */ |
| 41 | #define ___halt() asm volatile ( "\t.word\t0x28\n"); |
41 | #define ___halt() asm volatile ( "\t.word\t0x28\n"); |
| 42 | /** simulator enters interactive mode */ |
42 | /** simulator enters interactive mode */ |
| 43 | #define ___intmode() asm volatile ( "\t.word\t0x29\n"); |
43 | #define ___intmode() asm volatile ( "\t.word\t0x29\n"); |
| 44 | 44 | ||
| - | 45 | /** Return current IP address */ |
|
| - | 46 | static inline __address * _get_ra() |
|
| - | 47 | { |
|
| - | 48 | __address *ip; |
|
| - | 49 | ||
| - | 50 | __asm__ volatile ( |
|
| - | 51 | "mov %%31, %0" |
|
| - | 52 | : "=r" (ip) |
|
| - | 53 | ); |
|
| - | 54 | return ip; |
|
| - | 55 | } |
|
| - | 56 | #define CALLER(first_arg) (_get_ra()) |
|
| - | 57 | ||
| - | 58 | ||
| 45 | #endif |
59 | #endif |