mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/avr8_common: Clean up cpu_print_last_inscrution()
This commit is contained in:
parent
7313a1c28c
commit
417bc949ab
@ -180,13 +180,14 @@ static inline void __attribute__((always_inline)) cpu_print_last_instruction(voi
|
||||
uint8_t lo;
|
||||
uint16_t ptr;
|
||||
|
||||
__asm__ volatile ("in __tmp_reg__, __SP_H__ \n\t"
|
||||
"mov %0, __tmp_reg__ \n\t"
|
||||
: "=g" (hi));
|
||||
|
||||
__asm__ volatile ("in __tmp_reg__, __SP_L__ \n\t"
|
||||
"mov %0, __tmp_reg__ \n\t"
|
||||
: "=g" (lo));
|
||||
__asm__ volatile (
|
||||
"in %[hi], __SP_H__ \n\t"
|
||||
"in %[lo], __SP_L__ \n\t"
|
||||
: [hi] "=r"(hi),
|
||||
[lo] "=r"(lo)
|
||||
: /* no inputs */
|
||||
: /* no clobbers */
|
||||
);
|
||||
ptr = hi << 8 | lo;
|
||||
printf("Stack Pointer: 0x%04x\n", ptr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user