Skip to content

Commit

Permalink
Sort imported instruction/register files before processing. (#57)
Browse files Browse the repository at this point in the history
If not done builds are not reproducible.
  • Loading branch information
Rot127 authored Apr 4, 2022
1 parent 366ec26 commit 7363e59
Show file tree
Hide file tree
Showing 3 changed files with 447 additions and 451 deletions.
4 changes: 2 additions & 2 deletions LLVMImporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def update_hex_arch(self):
"SysRegs64",
]
reg_dir = "./import/registers/" if not self.test_mode else "../import/registers/"
for filename in os.listdir(reg_dir):
for filename in sorted(os.listdir(reg_dir)):
if filename.split(".")[-1] != "json":
continue
with open(reg_dir + filename) as f:
Expand All @@ -211,7 +211,7 @@ def update_hex_arch(self):

instr_count = 0
insn_dir = "./import/instructions/" if not self.test_mode else "../import/instructions/"
for filename in os.listdir(insn_dir):
for filename in sorted(os.listdir(insn_dir)):
if filename.split(".")[-1] != "json":
continue
instn_name = filename.replace(".json", "")
Expand Down
Loading

0 comments on commit 7363e59

Please sign in to comment.