Skip to content

Commit

Permalink
Add arc32 target for nSIM
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahab Vahedi authored and temap committed Dec 15, 2021
1 parent e20da74 commit f06d923
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 13 deletions.
33 changes: 22 additions & 11 deletions dejagnu/baseboards/arc-sim-nsimdrv.exp
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,30 @@ if [ string match arceb-* $target_triplet ] {
}

# Select processor family. Also set nsim_isa_sat, which is mandatory for GCC.
if { [check_target_arc64] } {
if { [check_target_arc64_64] } {
lappend nsim_flags \
-prop=nsim_isa_family=arc64 \
-p nsim_isa_family=arc64 \
-p nsim_isa_div_rem_option=2 \
-p nsim_isa_mpy_option=9 \
-p nsim_isa_mpy64=1 \
-p nsim_isa_div64_option=1 \
-p nsim_isa_has_fp=1 \
-p nsim_isa_fp_vec_option=1 \
-p nsim_isa_fp_hp_option=1 \
-p nsim_isa_fp_dp_option=1 \
-p nsim_isa_fp_div_option=1 \
-p nsim_isa_fp_num_regs=32
-p nsim_isa_mpy_option=9 \
-p nsim_isa_mpy64=1 \
-p nsim_isa_div64_option=1 \
-p nsim_isa_has_fp=1 \
-p nsim_isa_fp_vec_option=1 \
-p nsim_isa_fp_hp_option=1 \
-p nsim_isa_fp_dp_option=1 \
-p nsim_isa_fp_div_option=1 \
-p nsim_isa_fp_num_regs=32 \
-p nsim_isa_unaligned_option=1
} elseif { [check_target_arc64_32] } {
lappend nsim_flags \
-p nsim_isa_family=av3hs \
-p nsim_isa_pc_size=32 \
-p nsim_isa_addr_size=32 \
-p nsim_isa_swap_option=1 \
-p nsim_isa_bitscan_option=1 \
-p nsim_isa_div_rem_option=2 \
-p nsim_isa_mpy_option=9 \
-p nsim_isa_unaligned_option=1
} elseif { [check_target_arc700] } {
# GCC requires multiplier for ARC 700.
lappend nsim_flags \
Expand Down
9 changes: 7 additions & 2 deletions dejagnu/tool-extra.exp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,13 @@ proc compile_quarkse_em_nsim_apex { } {
}

# Return 1 if we compile for ARC64
proc check_target_arc64 { } {
return [check_target_arc "__ARC64__"]
proc check_target_arc64_64 { } {
return [check_target_arc "__ARC64_ARCH64__"]
}

# Return 1 if we compile for ARC64
proc check_target_arc64_32 { } {
return [check_target_arc "__ARC64_ARCH32__"]
}

# Return 1 if we compile for ARCv2 HS
Expand Down

0 comments on commit f06d923

Please sign in to comment.