|
sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
|
Variables | |
| OBJDUMP = sys.argv[1] | |
| dict | BRANCHES |
| dict | JUMPS = {"j", "jal", "jr", "jalr", "b", "bal", "eret", "syscall", "break"} |
| out = subprocess.run([OBJDUMP, "-d", elf], capture_output=True, text=True).stdout | |
| sections | |
| ins = [] | |
| func = m.group(2) | |
| member = line.split(":")[0] | |
| m = re.match(r"^([0-9a-f]+) <(.+)>:$", line) | |
| int | hazards = 0 |
| dict | index = {a: i for i, (a, _, _, _) in enumerate(ins)} |
| t = re.search(r"([0-9a-f]+) <", args) | |
| target = int(t.group(1), 16) | |
| tuple | n = (addr - target) // 4 + 2 |
| body = ins[index[target]:i] | |
| slot = ins[i + 1] | |
Usage: shortloop_scan.py <objdump> <elf or .a>... Lists R5900 short-loop erratum hazards in EE code: a conditional branch back over 6 or fewer instructions (branch and delay slot included), no other branch or jump inside, and a delay slot that is not a nop.
| shortloop_scan.body = ins[index[target]:i] |
Definition at line 51 of file shortloop_scan.py.
| dict shortloop_scan.BRANCHES |
Definition at line 12 of file shortloop_scan.py.
| shortloop_scan.func = m.group(2) |
Definition at line 18 of file shortloop_scan.py.
| int shortloop_scan.hazards = 0 |
Definition at line 36 of file shortloop_scan.py.
| dict shortloop_scan.index = {a: i for i, (a, _, _, _) in enumerate(ins)} |
Definition at line 38 of file shortloop_scan.py.
| list ins = [] |
Definition at line 18 of file shortloop_scan.py.
| dict shortloop_scan.JUMPS = {"j", "jal", "jr", "jalr", "b", "bal", "eret", "syscall", "break"} |
Definition at line 14 of file shortloop_scan.py.
| shortloop_scan.m = re.match(r"^([0-9a-f]+) <(.+)>:$", line) |
Definition at line 27 of file shortloop_scan.py.
| shortloop_scan.member = line.split(":")[0] |
Definition at line 18 of file shortloop_scan.py.
| tuple shortloop_scan.n = (addr - target) // 4 + 2 |
Definition at line 48 of file shortloop_scan.py.
| shortloop_scan.OBJDUMP = sys.argv[1] |
Definition at line 11 of file shortloop_scan.py.
| shortloop_scan.out = subprocess.run([OBJDUMP, "-d", elf], capture_output=True, text=True).stdout |
Definition at line 17 of file shortloop_scan.py.
| shortloop_scan.sections |
Definition at line 18 of file shortloop_scan.py.
| shortloop_scan.slot = ins[i + 1] |
Definition at line 54 of file shortloop_scan.py.
| shortloop_scan.t = re.search(r"([0-9a-f]+) <", args) |
Definition at line 42 of file shortloop_scan.py.
| shortloop_scan.target = int(t.group(1), 16) |
Definition at line 45 of file shortloop_scan.py.