summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md5
-rw-r--r--Cargo.toml4
-rw-r--r--src/arm32/address/mod.rs1
-rw-r--r--src/arm32/condition/mod.rs6
-rw-r--r--src/arm32/instruction/mod.rs1
-rw-r--r--src/arm32/mod.rs4
-rw-r--r--src/arm32/register/mod.rs4
-rw-r--r--src/lib.rs7
8 files changed, 30 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6573e5f..867bfbc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,11 @@
This is the changelog of Pollex.
See `"README.md"` for more information.
+## 0.1.2
+
+* Update project description
+* Add documentation
+
## 0.1.1
* Set documentation link
diff --git a/Cargo.toml b/Cargo.toml
index 8d92aa4..a7d182c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,9 +1,9 @@
[package]
name = "pollex"
-version = "0.1.1"
+version = "0.1.2"
authors = ["Gabriel Bjørnager Jensen"]
edition = "2021"
-description = "Arms and thumbs."
+description = "Arm instruction manipulator."
documentation = "https://docs.rs/pollex/"
readme = "README.md"
homepage = "https://crates.io/crates/pollex"
diff --git a/src/arm32/address/mod.rs b/src/arm32/address/mod.rs
index fa3488c..067cc20 100644
--- a/src/arm32/address/mod.rs
+++ b/src/arm32/address/mod.rs
@@ -23,6 +23,7 @@ use crate::arm32::Register;
use core::fmt::Display;
+/// An addressing mode.
pub enum Address {
ArithmeticShiftRightImmediate { source: Register, shift: u32 },
diff --git a/src/arm32/condition/mod.rs b/src/arm32/condition/mod.rs
index 5d595f9..f8d81ba 100644
--- a/src/arm32/condition/mod.rs
+++ b/src/arm32/condition/mod.rs
@@ -21,6 +21,12 @@
use core::fmt::Display;
+/// A condition code.
+///
+/// Most Arm32 instructions embed a condition code.
+///
+/// Any 4-bit values is always a valid condition code *except* `0b1111`, which sometimes denotes a different instruction altogether
+/// In most cases, it is invalid, however..
#[derive(Clone, Copy, Eq, Ord, PartialEq, PartialOrd)]
#[repr(u8)]
pub enum Condition {
diff --git a/src/arm32/instruction/mod.rs b/src/arm32/instruction/mod.rs
index d10aa6d..1e1971d 100644
--- a/src/arm32/instruction/mod.rs
+++ b/src/arm32/instruction/mod.rs
@@ -26,6 +26,7 @@ mod display;
use crate::arm32::Condition;
+/// An Arm32 instruction.
pub enum Instruction {
Branch { condition: Condition, immediate: i32 },
diff --git a/src/arm32/mod.rs b/src/arm32/mod.rs
index 6727a9c..e73980a 100644
--- a/src/arm32/mod.rs
+++ b/src/arm32/mod.rs
@@ -19,6 +19,10 @@
// fero General Public License along with Pollex.
// If not, see <https://www.gnu.org/licenses/>.
+//! Arm32-related facilities.
+//!
+//! This includes T variants of Arm32.
+
use crate::use_mod;
use_mod!(pub address);
use_mod!(pub condition);
diff --git a/src/arm32/register/mod.rs b/src/arm32/register/mod.rs
index bd8ba0d..366ab16 100644
--- a/src/arm32/register/mod.rs
+++ b/src/arm32/register/mod.rs
@@ -21,6 +21,10 @@
use core::fmt::Display;
+/// An Arm register.
+///
+/// Registers are number `R<N>`, where *N* denotes a decimal number from (0) to (15).
+/// Some registers have aliases, such as `r15|pc`.
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd)]
#[repr(u8)]
pub enum Register {
diff --git a/src/lib.rs b/src/lib.rs
index d925125..9da66f9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -19,6 +19,13 @@
// fero General Public License along with Pollex.
// If not, see <https://www.gnu.org/licenses/>.
+//! Arm instruction manipulator.
+//!
+//! This library is meant to be used by assemblers and disassembler, emulators, etc.
+//! That is to leverage encoding and decoding of instructions.
+//!
+//! The goal of this project is to fully implement all Arm32 instruction set architectures, and, hopefully, Arm64 architectures as well.
+
#![no_std]
extern crate alloc;