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] = {
4848};
4949
5050void 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" );
5455}
5556
5657int putchar (int c ) {
Original file line number Diff line number Diff line change @@ -48,9 +48,10 @@ __attribute((section(".vectors"))) void *vector_table[114] = {
4848};
4949
5050void 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" );
5455}
5556
5657int putchar (int c ) {
You can’t perform that action at this time.
0 commit comments