Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

March 2021 Bump #6

Merged
merged 145 commits into from
Jun 9, 2021
Merged

March 2021 Bump #6

merged 145 commits into from
Jun 9, 2021

Conversation

zitaofang
Copy link
Member

kito-cheng and others added 30 commits September 25, 2019 16:56
Check write permission to install path before build anything
These wrappers are still necessary on non-GNU platforms; glibc
makefile rules invoke `sed' directly with GNU extensions.
Some implementations of rm(1) are stricter about the ordering of option
and non-option arguments as specified in POSIX.
Add option to specify source tree of each component
The --with-headers argument must point to the `include' subdirectory.
Fix default LINUX_HEADERS_SRCDIR path
Backport following patches:
- RISC-V: Fix bad insn splits with paradoxical subregs.
- RISC-V: Fix more splitters accidentally calling gen_reg_rtx.
- Fix for PR rtl-optimization/89795
Use items rather than iteritems for python 3 compatible
Add a Vagrantfile contributed by Dylan McNamee.
Bump gcc to including fix for PR91860
Document Software Collection devtools package for Centos and RHEL.
This is a partial fix for pull request #530, allowing people to use
-mno-fdiv for library compiles.
Add configure options to set target C and C++ compiler flags.
Bump gcc to include fix for issue #530.
Also, support all gcc checking options instead of just yes and release.
Also, fix copy-and-paste error in cmodel support refering to gcc checking.
Don't enable gcc checking by default.
I'm not sure what's going on here, but as far as I can tell we're optimizing
this while the test suite thinks we shouldn't be able to.

Signed-off-by: Palmer Dabbelt <[email protected]>
Add a pr69728 optimization success to the whitelist
kito-cheng and others added 22 commits January 4, 2021 11:22
 - So that we can build and clone in parallel.
 - It's too new to use, that require git 2.26+
Automatically download sub-module on-demand and add branch info.
This patch helps improve GitHub Action scripts.
 * Make CI happy again after d3dfbee.
 * Simplify the logic of GH Action scripts using 'matrix'.
 * Add new precompile process for rv32/64-elf toolchain.
[CI] Improve GitHub Action scripts.
1. repository activity check
2. change to build.yaml
3. assets layout
4. matrix action build
5. run daily too & build on PR
6. upload all assets to release
7. Only run nightly
Add new precompile process for rv32/64-elf toolchain: @higuoxing
Otherwise, this code breaks if riscv-gnu-toolchain is itself a
submodule of another project. In that case the git config for this
tree will be $(srcdir)/../.git/modules/riscv-gnu-toolchain/config.
Use `git rev-parse` to find .git dir
@alonamid alonamid requested a review from a0u June 2, 2021 20:02
@a0u
Copy link
Member

a0u commented Jun 3, 2021

Could you explain why renaming vsetvl to hvsetvl is needed this time? The collision with the V extension has not been problematic before unless one is attempting to mix Hwacha and RVV code, as the -march string should be sufficient to disambiguate which instruction the assembler ought to emit in each situation.

While there is a naming conflict with the generated MATCH_VSETVL/MASK_VSETVL macros, this can be fixed in esp-opcodes and is orthogonal to what mnemonic the assembler accepts and what the disassemblers from binutils and spike print.

I'm fine with this change if @colinschmidt is, but we should not be breaking source compatibility if it is not functionally necessary.

@zitaofang
Copy link
Member Author

Could you explain why renaming vsetvl to hvsetvl is needed this time? The collision with the V extension has not been problematic before unless one is attempting to mix Hwacha and RVV code, as the -march string should be sufficient to disambiguate which instruction the assembler ought to emit in each situation.

While there is a naming conflict with the generated MATCH_VSETVL/MASK_VSETVL macros, this can be fixed in esp-opcodes and is orthogonal to what mnemonic the assembler accepts and what the disassemblers from binutils and spike print.

I'm fine with this change if @colinschmidt is, but we should not be breaking source compatibility if it is not functionally necessary.

Actually the conflicting names are creating problem in Spike. The vsetvl instruction definition in hwacha/opcodes_hwacha.h in that repo is causing the build system to override the upstream (RVV) implementation during build if we don't change the name. The build system will generate a source file containing the handler for every instruction, and Hwacha's vsetvl.c will overwrite RVV's implementation, causing link errors. If you want to reproduce this error, check out this commit: ucb-bar/esp-isa-sim@1969ab2.

I mentioned this to @colinschmidt in Slack DM back in March, and he said we can rename the instruction to solve this conflict and try to control the impact on other sources file. And I think if we are changing instruction name in Spike, we should also try to keep its name the same across the entire toolchains to avoid problems. It would just be a search/replace for the code anyway.

@a0u
Copy link
Member

a0u commented Jun 3, 2021

Actually the conflicting names are creating problem in Spike. The vsetvl instruction definition in hwacha/opcodes_hwacha.h in that repo is causing the build system to override the upstream (RVV) implementation during build if we don't change the name. The build system will generate a source file containing the handler for every instruction, and Hwacha's vsetvl.c will overwrite RVV's implementation, causing link errors. If you want to reproduce this error, check out this commit: ucb-bar/esp-isa-sim@1969ab2.

But the fix can be isolated to esp-isa-sim and need not involve esp-opcodes at all. Only the header file has to be renamed, not the instruction itself. The rest of the toolchain is not affected since the instruction encoding remains the same.

diff --git a/hwacha/hwacha_disasm.cc b/hwacha/hwacha_disasm.cc
index d2f4947..d7c091e 100644
--- a/hwacha/hwacha_disasm.cc
+++ b/hwacha/hwacha_disasm.cc
@@ -278,7 +278,7 @@ std::vector<disasm_insn_t*> hwacha_t::get_disasms()
     insns.push_back(new disasm_insn_t(name, match_##code, mask_##code | (extra), __VA_ARGS__));
 
   DISASM_INSN("vsetcfg", vsetcfg, 0, {&npregs, &nxregs});
-  DISASM_INSN("vsetvl", vsetvl, 0, {&xrd, &xrs1});
+  DISASM_INSN("vsetvl", vsetvlh, 0, {&xrd, &xrs1});
   DISASM_INSN("vgetcfg", vgetcfg, 0, {&xrd});
   DISASM_INSN("vgetvl", vgetvl, 0, {&xrd});
 
diff --git a/hwacha/insns/vsetvl.h b/hwacha/insns/vsetvlh.h
similarity index 100%
rename from hwacha/insns/vsetvl.h
rename to hwacha/insns/vsetvlh.h
diff --git a/hwacha/opcodes_hwacha.h b/hwacha/opcodes_hwacha.h
index ab73e46..d6ec06a 100644
--- a/hwacha/opcodes_hwacha.h
+++ b/hwacha/opcodes_hwacha.h
@@ -9,7 +9,7 @@ DECLARE_INSN(vgetvl, 0x200400b, 0xfffff07f)
 DECLARE_INSN(vmca, 0x600202b, 0xfff0707f)
 DECLARE_INSN(vmcs, 0x400202b, 0xff80707f)
 DECLARE_INSN(vsetcfg, 0x200b, 0x7fff)
-DECLARE_INSN(vsetvl, 0x600b, 0xfff0707f)
+DECLARE_INSN(vsetvlh, 0x600b, 0xfff0707f)
 DECLARE_INSN(vuncfg, 0x400000b, 0xffffffff)
 DECLARE_INSN(vxcptaux, 0x200402b, 0xfffff07f)
 DECLARE_INSN(vxcptcause, 0x402b, 0xfffff07f)

In any case, even if hvsetvl is now the official mnemonic, esp-binutils should still accept vsetvl as an alias to avoid breaking existing Hwacha code outside of esp-tests.

@zitaofang
Copy link
Member Author

I see. I will try to minimize the changes and hopefully get it done tomorrow or Thursday. I am doing internship right now and might not have a lot of time working on this,

Copy link
Member

@a0u a0u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. CI appears to have encountered a transient error with the submodule clone.

@alonamid alonamid merged commit 296fc50 into master Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.