diff --git a/dump.bat b/dump.bat index c62a600..642ee3b 100644 --- a/dump.bat +++ b/dump.bat @@ -1,3 +1,3 @@ cargo build --examples --verbose arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/hello >target/dump-hello.txt -arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/instruction_inline >target/dump-instruction_inline.txt +arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/asm_scratch >target/dump-asm_scratch.txt diff --git a/dump.sh b/dump.sh index 0ed55ce..f3ce352 100755 --- a/dump.sh +++ b/dump.sh @@ -1,4 +1,4 @@ #!/bin/sh cargo build --examples --verbose arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/hello >target/dump-hello.txt -arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/instruction_inline >target/dump-instruction_inline.txt +arm-none-eabi-objdump --headers --disassemble --demangle --architecture=armv4t --no-show-raw-insn -Mreg-names-std target/thumbv4t-none-eabi/debug/examples/asm_scratch >target/dump-asm_scratch.txt diff --git a/examples/asm_scratch.rs b/examples/asm_scratch.rs new file mode 100644 index 0000000..dfa1c77 --- /dev/null +++ b/examples/asm_scratch.rs @@ -0,0 +1,17 @@ +#![no_std] +#![no_main] +#![allow(unused_imports)] + +//! Scratch space for checking the asm output of stuff. + +use gba::prelude::*; + +#[panic_handler] +fn panic_handler(_: &core::panic::PanicInfo) -> ! { + loop {} +} + +#[no_mangle] +extern "C" fn main() -> ! { + loop {} +} diff --git a/examples/instruction_inline.rs b/examples/instruction_inline.rs deleted file mode 100644 index cfd295e..0000000 --- a/examples/instruction_inline.rs +++ /dev/null @@ -1,24 +0,0 @@ -#![no_std] -#![no_main] - -use gba::prelude::*; - -#[panic_handler] -fn panic_handler(_: &core::panic::PanicInfo) -> ! { - loop {} -} - -//#[inline(always)] -#[instruction_set(arm::a32)] -fn make_3rd_bg_pal_entry_black() { - let x: u16; - unsafe { core::arch::asm!("movs {}, #0", out(reg) x) }; - BG_PALETTE.index(3).write(Color(x)); -} - -#[no_mangle] -#[instruction_set(arm::t32)] -extern "C" fn main() -> ! { - make_3rd_bg_pal_entry_black(); - loop {} -}