aboutsummaryrefslogtreecommitdiff
path: root/src/armv7
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-09-11 17:05:03 +0000
committeriximeow <me@iximeow.net>2026-09-11 17:05:03 +0000
commit3d645f4fd918af427e4b3ade56057966f4ac894f (patch)
tree6d53d1dee50a6608ae068572865ce7267038ff5a /src/armv7
parent0eb1d9d89c78c6a5b0f49951b233a8ad63b62f5b (diff)
fix some lingering warnings
Diffstat (limited to 'src/armv7')
-rw-r--r--src/armv7/display.rs2
-rw-r--r--src/armv7/thumb.rs10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/armv7/display.rs b/src/armv7/display.rs
index d8d67a2..ba89f50 100644
--- a/src/armv7/display.rs
+++ b/src/armv7/display.rs
@@ -1554,7 +1554,7 @@ mod buffer_sink {
/// into.
///
/// SAFETY: callers must print at most one instruction into this handle.
- unsafe fn write_handle(&mut self) -> yaxpeax_arch::display::InstructionTextSink {
+ unsafe fn write_handle(&mut self) -> yaxpeax_arch::display::InstructionTextSink<'_> {
self.content.clear();
// Safety: `content` was just cleared, so writing begins at the start of the buffer.
// `content`is large enough to hold a fully-formatted instruction (see
diff --git a/src/armv7/thumb.rs b/src/armv7/thumb.rs
index b59754c..e8b050a 100644
--- a/src/armv7/thumb.rs
+++ b/src/armv7/thumb.rs
@@ -1,3 +1,7 @@
+// names from the manual are like, `Rt`, `CRd`, etc, which are not typical snake
+// case and provoke style warnings.
+#![allow(non_snake_case)]
+
use yaxpeax_arch::Arch;
use crate::armv7::{
@@ -4467,7 +4471,7 @@ fn decode_table_a6_30(decoder: &InstDecoder, inst: &mut Instruction, instr2: Bit
// MCR, MCR2 (A8-477)
inst.opcode = Opcode::MCR(coproc, opc1, opc2, is_2);
inst.operands = [
- Operand::Reg(Reg::from_u8(CRd)),
+ Operand::Reg(Reg::from_u8(Rt)),
Operand::CReg(CReg::from_u8(CRn)),
Operand::CReg(CReg::from_u8(CRm)),
Operand::Nothing,
@@ -4475,10 +4479,10 @@ fn decode_table_a6_30(decoder: &InstDecoder, inst: &mut Instruction, instr2: Bit
} else {
// MRC, MRC2 (A8-493)
inst.opcode = Opcode::MRC(coproc, opc1, opc2, is_2);
- let dest = if CRd == 0b1111 {
+ let dest = if Rt == 0b1111 {
Operand::StatusRegMask(StatusRegMask::APSR_NZCV)
} else {
- Operand::Reg(Reg::from_u8(CRd))
+ Operand::Reg(Reg::from_u8(Rt))
};
inst.operands = [
dest,