mirror of
https://github.com/kmc7468/cs420.git
synced 2026-11-04 00:00:29 +09:00
Add .zero directive
This commit is contained in:
1 parent
1483614cad
commit
87a17b2bb9
2 files changed
+3
No files matched your search
@@ -95,6 +95,8 @@ pub enum Directive {
|
|||||||
Word(u32),
|
Word(u32),
|
||||||
/// .quad value
|
/// .quad value
|
||||||
Quad(u64),
|
Quad(u64),
|
||||||
|
/// .zero bytes
|
||||||
|
Zero(usize),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Directive {
|
impl Directive {
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ impl WriteString for Directive {
|
|||||||
Self::Half(value) => format!(".half\t{:#x?}", value),
|
Self::Half(value) => format!(".half\t{:#x?}", value),
|
||||||
Self::Word(value) => format!(".word\t{:#x?}", value),
|
Self::Word(value) => format!(".word\t{:#x?}", value),
|
||||||
Self::Quad(value) => format!(".quad\t{:#x?}", value),
|
Self::Quad(value) => format!(".quad\t{:#x?}", value),
|
||||||
|
Self::Zero(bytes) => format!(".zero\t{:#x?}", bytes),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user