Skip to content

Commit

Permalink
seal5/backends/riscv_intrinsics/writer.py: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Dec 19, 2024
1 parent 6bf2007 commit 656919f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion seal5/backends/riscv_intrinsics/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def build_target(arch: str, intrinsic: IntrinsicDefn):

def build_target_new(arch: str, intrinsic: IntrinsicDefn, prefix: Optional[str] = "__builtin_riscv"):
if prefix != "__builtin_riscv":
# Use: let Spellings = ["__builtin_riscv_" # NAME];
raise NotImplementedError("Clang builtin custom prefix")
ret_str = "void"
if intrinsic.ret_type:
Expand All @@ -177,7 +178,7 @@ def build_target_new(arch: str, intrinsic: IntrinsicDefn, prefix: Optional[str]
prototype_str = f"{ret_str}({args_str})"
features = [arch]
features_str = "|".join(features)
target = f'def {intrinsic.intrinsic_name} : RISCVBuiltin<"{prototype_str}", "{features_str}">;'
target = f'def {arch}_{intrinsic.intrinsic_name} : RISCVBuiltin<"{prototype_str}", "{features_str}">;'

return target

Expand Down

0 comments on commit 656919f

Please sign in to comment.