lowRISC / lowrisc-toolchains

UNSUPPORTED INTERNAL toolchain builds
30 stars 14 forks source link

bitmanipulation instructions in release 20200323-1 #12

Closed gautschimi closed 4 years ago

gautschimi commented 4 years ago

I tried to use the newest release of the toolchain (lowrisc-toolchain-gcc-rv32imc-20200323-1.tar.xz) and assumed that there are no bitmanipulation instructions. but when I linked the libraries I've seen that there are some "pack" instructions in some functions e.g. in __udivdi3.

I think the bit manipulation support is not yet in the master branch of ibex. is it intendet that these instructions are already in the toolchain release?

would it be possible to provide the libraries for the different flavors of the core or to provide multiple releases? e.g. two sets of libraries/releases: one with rv32imcb and another with rv32imc

imphil commented 4 years ago

Yes, these instructions are intended to be in the toolchain, as per #9.

However, you shouldn't get them unless you specify the b flag in march, e.g. -march=rv32imcb. How do you call your compiler?

imphil commented 4 years ago

I wonder how that applies to libgcc and other libraries ... @lenary @luismarques

lenary commented 4 years ago

Ah, I see the issue.

The toolchain should be built with CT_ARCH_ARCH=rv32imc, but the patches should be applied to GCC and binutils.

This will mean GCC and binutils will still be able to compile when passed -march=rv32imcb but the default libraries won't contain B extension instructions, I believe.

I will prepare a patch now.

gautschimi commented 4 years ago

I agree with @lenary

I'm using the 20191101-1 release for now. works well

thanks for the fast reply!

lenary commented 4 years ago

Yeah, just use the previous release until we cut a new one.