File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
utils/embedded-test-support Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ __attribute((section(".vectors"))) void *vector_table[114] = {
48
48
};
49
49
50
50
void qemu_exit () {
51
- register uintptr_t a asm("r0" ) = 0x18 ;
52
- register uintptr_t b asm("r1" ) = 0x20026 ;
53
- __asm__ volatile ("BKPT #0xAB" : : "r" (a ), "r" (b ));
51
+ __asm__ volatile ("mov r0, #0x18" );
52
+ __asm__ volatile ("movw r1, #0x0026" );
53
+ __asm__ volatile ("movt r1, #0x2" ); // construct 0x20026 in r1
54
+ __asm__ volatile ("bkpt #0xab" );
54
55
}
55
56
56
57
int putchar (int c ) {
Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ __attribute((section(".vectors"))) void *vector_table[114] = {
48
48
};
49
49
50
50
void qemu_exit () {
51
- register uintptr_t a asm("r0" ) = 0x18 ;
52
- register uintptr_t b asm("r1" ) = 0x20026 ;
53
- __asm__ volatile ("BKPT #0xAB" : : "r" (a ), "r" (b ));
51
+ __asm__ volatile ("mov r0, #0x18" );
52
+ __asm__ volatile ("movw r1, #0x0026" );
53
+ __asm__ volatile ("movt r1, #0x2" ); // construct 0x20026 in r1
54
+ __asm__ volatile ("bkpt #0xab" );
54
55
}
55
56
56
57
int putchar (int c ) {
You can’t perform that action at this time.
0 commit comments