Conversation
I am working on C support and it started being very awkward to have to add things like funct4 and funct6 when the bits overlap and the some of the fields are used differently or not used at all by different encodings. By passing the match the go assembler can do a simple bitwise or. This was also changed to emit go fmt-ed code from the start as go fmt now refuse to run due to the internal import. Here is the matching CL on go's side https://go-review.googlesource.com/c/go/+/637940
|
Can another user of the Go target look at this and provide feedback? |
|
CC @4a6f656c @markdryan as Go riscv64 maintainers |
|
I would be surprising to have any user of the go target because it import private packages that are only found in the go compiler:
|
I expect that the only consumer is Go itself, however this needs a lot more discussion and review upstream, before a change of this nature is made. |
|
To copy my rational from https://go-review.googlesource.com/c/go/+/637940?tab=comments Among multiples my biggest issue is funct3, I am adding support for CI, CSS, CIW, CL, CS, CB and CJ which use bits 13 to 15, however this script always generate funct3 as bits 12 to 14 because this is what R encoding uses. Passing So at this point I started writing a primitive disassembler in this script to figure out where funct3 must be decoded from. The existing code also does not follow go's programing conventions, returning a pointer here is uncommon and eat performance uselessly. Given this whole process is confusing and serves no purpose I think it is better to remove it rather than to fix it for CI, CSS, CIW, CL, CS, CB and CJ. |
I am working on C support and it started being very awkward to have to add things like funct4 and funct6 when the bits overlap and the some of the fields are used differently or not used at all by different encodings.
By passing the match the go assembler can do a simple bitwise or. This was also changed to emit go fmt-ed code from the start as go fmt now refuse to run due to the internal import.
Here is the matching CL on go's side https://go-review.googlesource.com/c/go/+/637940