mirror of
https://github.com/italicsjenga/gba.git
synced 2024-12-23 10:51:30 +11:00
make the inliner checker into a generic asm checker.
This commit is contained in:
parent
5de0f5e9f2
commit
eb5995bf1d
2
dump.bat
2
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
|
||||
|
|
2
dump.sh
2
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
|
||||
|
|
17
examples/asm_scratch.rs
Normal file
17
examples/asm_scratch.rs
Normal file
|
@ -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 {}
|
||||
}
|
|
@ -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 {}
|
||||
}
|
Loading…
Reference in a new issue