riscv / sail-riscv

Sail RISC-V model
https://lists.riscv.org/g/tech-golden-model
Other
465 stars 168 forks source link

Remove int_power and use built-in 2 ^ #527

Closed Timmmm closed 2 months ago

Timmmm commented 3 months ago

Sail has built-in support for 2 ^, and this is the only exponent we use so there's no need for the more generic int_power. Additionally the type of int_power is both way looser than 2 ^ (which is understood at the type level), and actually wrong, e.g. it will let you do 3 ^ -1 and give the result as 3.

Note I had to add spaces because this was required until a very recent Sail version - see https://github.com/rems-project/sail/issues/657

github-actions[bot] commented 3 months ago

Test Results

712 tests  ±0   712 :white_check_mark: ±0   0s :stopwatch: ±0s   6 suites ±0     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit f0448b9a. ± Comparison against base commit 05b845c9.