Skip to content

Commit 4d8d260

Browse files
authored
Merge pull request riscv#316 from Myrausman/repo_structure
Restructured codebase
2 parents d9e9069 + 383cbca commit 4d8d260

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+5
-7
lines changed

Makefile

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ PK_H := ../riscv-pk/machine/encoding.h
44
ENV_H := ../riscv-tests/env/encoding.h
55
OPENOCD_H := ../riscv-openocd/src/target/riscv/encoding.h
66
INSTALL_HEADER_FILES := $(ISASIM_H) $(PK_H) $(ENV_H) $(OPENOCD_H)
7+
PSEUDO_FLAG := $(if $(PSEUDO),-pseudo,)
78

8-
ifdef PSEUDO
9-
PSEUDO_FLAG := -pseudo
10-
else
11-
PSEUDO_FLAG :=
12-
endif
139

1410
default: everything
1511

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_a renamed to extensions/rv_a

File renamed without changes.

rv_c renamed to extensions/rv_c

File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_d renamed to extensions/rv_d

File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_f renamed to extensions/rv_f

File renamed without changes.
File renamed without changes.

rv_h renamed to extensions/rv_h

File renamed without changes.

rv_i renamed to extensions/rv_i

File renamed without changes.

rv_m renamed to extensions/rv_m

File renamed without changes.

rv_q renamed to extensions/rv_q

File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_s renamed to extensions/rv_s

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_v renamed to extensions/rv_v

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

rv_zk renamed to extensions/rv_zk

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

shared_utils.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ def process_pseudo_instructions(
457457
logging.debug(f"Processing pseudo line: {line}")
458458
ext, orig_inst, pseudo_inst, line_content = pseudo_regex.findall(line)[0]
459459
ext_file = find_extension_file(ext, opcodes_dir)
460-
460+
# print("ext_file",ext_file)
461461
validate_instruction_in_extension(orig_inst, ext_file, file_name, pseudo_inst)
462462

463463
name, single_dict = process_enc_line(f"{pseudo_inst} {line_content}", file_name)
@@ -514,6 +514,7 @@ def find_extension_file(ext: str, opcodes_dir: str):
514514
ext_file = f"{opcodes_dir}/unratified/{ext}"
515515
if not os.path.exists(ext_file):
516516
log_and_exit(f"Extension {ext} not found.")
517+
# print(ext_file)
517518
return ext_file
518519

519520

@@ -574,7 +575,7 @@ def create_inst_dict(
574575
if include_pseudo_ops is None:
575576
include_pseudo_ops = []
576577

577-
opcodes_dir = os.path.dirname(os.path.realpath(__file__))
578+
opcodes_dir = os.path.dirname(os.path.realpath(__file__)) + "/extensions"
578579
instr_dict: InstrDict = {}
579580

580581
file_names = [
@@ -603,6 +604,7 @@ def create_inst_dict(
603604
)
604605

605606
logging.debug("Collecting imported instructions")
607+
606608
for file_name in file_names:
607609
logging.debug(f"Parsing File: {file_name} for imported instructions")
608610
lines = read_lines(file_name)

0 commit comments

Comments
 (0)