Commit 92c262aa93

Koakuma <koachan@protonmail.com>
2022-03-13 14:25:25
stage2 sparcv9: Add initial toU32 function for serialization
1 parent a212d59
Changed files (1)
src
arch
sparcv9
src/arch/sparcv9/bits.zig
@@ -444,4 +444,8 @@ pub const Instruction = union(enum) {
         opf_low: u6,
         rs2: u5,
     },
+
+    pub fn toU32(self: Instruction) u32 {
+        return @bitCast(u32, self);
+    }
 };