This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ld $r15, #tsk1 | |
ld $r13, 1 | |
thr $r13 | |
sch $r13 | |
esw | |
tsk0: | |
in $r0, 0 | |
out 0, $r0 | |
jmp #tsk0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/ir.c b/src/ir.c | |
index 0dc2a53..b779e3c 100644 | |
--- a/src/ir.c | |
+++ b/src/ir.c | |
@@ -1236,7 +1236,7 @@ void ssa_search_definers(struct ir_var* var, struct ir_basic_block* original_bb, | |
struct ir_basic_block* parent = parent_node->val; | |
// We make sure we haven't already checked this parent to avoud infinite recursion | |
// We also make sure that we only check parents that come before the original basic block in the control flow to avoid checking siblings | |
- if (!list_contains(checked, &parent->id, ir_equal_bb_id) && parent->id <= original_bb->id) | |
+ if (!list_contains(checked, &parent->id, ir_equal_bb_id)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const ChildProcess = std.ChildProcess; | |
const File = std.fs.File; | |
pub fn main() !void { | |
const args = std.os.argv; | |
if (args.len != 3) { | |
std.debug.warn("Usage: {} <elf file> <map file>\n", args[0][0..strlen(args[0])]); | |
return; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
var f: std.fs.File = undefined; | |
pub fn main() !void { | |
f = try std.fs.File.openRead("zig-cache/bin/iso/boot/pluto.elf"); | |
const S = struct { | |
const SStream = std.io.SeekableStream(anyerror, anyerror); | |
const IStream = std.io.InStream(anyerror); | |
var sstream = SStream{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pluto.elf.big: file format ELF32-i386 | |
architecture: i386 | |
start address: 0x00102000 | |
Sections: | |
Idx Name Size VMA LMA Type | |
0 00000000 0000000000000000 0000000000000000 | |
1 .rodata.boot 00002000 0000000000100000 0000000000100000 DATA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pluto.elf.small: file format ELF32-i386 | |
architecture: i386 | |
start address: 0x00102000 | |
Sections: | |
Idx Name Size VMA LMA Type | |
0 00000000 0000000000000000 0000000000000000 | |
1 .rodata.boot 00002000 0000000000100000 0000000000100000 DATA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const fmt = std.fmt; | |
const Parser = struct { | |
input: []const u8, | |
ch: u8, | |
len: usize, | |
fn parse_factor(self: *Parser) !f64 { | |
if (self.ch == '1') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
→ /snap/bin/zig build (feature/paging | ~2) | |
error: FileNotFound | |
/snap/zig/425/lib/zig/std/os.zig:1276:25: 0x236d16 in ??? (build) | |
posix.EEXIST => return error.PathAlreadyExists, | |
^ | |
/snap/zig/425/lib/zig/std/os.zig:1292:5: 0x236c38 in ??? (build) | |
return makeDirPosixC(&dir_path_c); | |
^ | |
/snap/zig/425/lib/zig/std/os.zig:1252:9: 0x2355c4 in ??? (build) | |
return makeDirPosix(dir_path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import re | |
# Usage: python3 trace.py <path to gdb backtrace> <function to start analysing from> | |
# The function to start analysing from can be any function name that appears in the backtrace, such as "assert" or "std.special.panic" | |
trace_path = sys.argv[1] | |
start_func = sys.argv[2] | |
regex = r"#\d+\s+0x[a-f0-9]+ in ([a-zA-Z0-9_.(,)]+) \(([a-zA-Z0-9_]+=.+)*\) at ([\/a-zA-Z0-9_\.]+):(\d+)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// build.zig | |
const Builder = @import("std").build.Builder; | |
pub fn build(b: *Builder) void { | |
const exe = b.addExecutable("exe", "import-build.zig"); | |
b.default_step.dependOn(&exe.step); | |
} | |
//import-build.zig | |
const build = @import("@build"); |
NewerOlder