-
Notifications
You must be signed in to change notification settings - Fork 3
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
[RISCV] Porting riscv-p-ext
.
#4
Conversation
gcc/config/riscv/riscv-c.cc
Outdated
@@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License | |||
along with GCC; see the file COPYING3. If not see | |||
<http://www.gnu.org/licenses/>. */ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file does not need to be altered.
When you add sub-extendsion in riscv-common.cc, the marco like __riscv_zbpbo
will be generated.
@@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License | |||
along with GCC; see the file COPYING3. If not see | |||
<http://www.gnu.org/licenses/>. */ | |||
|
|||
#include "config/riscv/riscv-opts.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one doesn't need to
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the clang-format add it automatically. I should delete it.
@@ -8,7 +8,8 @@ riscv-builtins.o: $(srcdir)/config/riscv/riscv-builtins.cc $(CONFIG_H) \ | |||
$(DIAGNOSTIC_CORE_H) $(OPTABS_H) $(RISCV_BUILTINS_H) \ | |||
$(srcdir)/config/riscv/riscv-ftypes.def \ | |||
$(srcdir)/config/riscv/riscv-vector-builtins-types.def \ | |||
$(srcdir)/config/riscv/riscv-modes.def | |||
$(srcdir)/config/riscv/riscv-modes.def \ | |||
$(srcdir)/config/riscv/riscv-builtins-rvp.def |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you included it in riscv-builtin.cc, no need to add here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line is for that if riscv-builtins-rvp.def
has been modified, the make
tool should be able to detect this modification and rebuild it.
@Liaoshihua Thanks for your review, I will make some changes to the patch later tonight. |
AVAIL (zbpbo, TARGET_ZBPBO) | ||
AVAIL (zbpbo32, TARGET_ZBPBO && !TARGET_64BIT) | ||
AVAIL (zbpbo64, TARGET_ZBPBO &&TARGET_64BIT) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A uniform format is recommended here. For example, “AVAIL (zpn64, TARGET_ZPN && TARGET_64BIT)”
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, clang-format
action missing...
|
||
int64_t f0 (int64_t x0, int64_t x1){ | ||
|
||
return __rv_sadd64(x0, x1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
riscv c api format changed to __riscv_
riscv-non-isa/riscv-c-api-doc#31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure should to follow the spec of p-ext format (https://github.com/riscv/riscv-p-spec/blob/master/P-ext-proposal.adoc#73-add64-64-bit-addition) or the one on this page(riscv-non-isa/riscv-c-api-doc#31) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave it as it is for now, and wait for the new p-ext proposal to come out before deciding
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about it now. Maybe as a existed format, should follow the spec.
f60ecca
to
e016063
Compare
e016063
to
fa991fe
Compare
video :
https://www.bilibili.com/video/BV1nQ4y1W7h9/
https://www.bilibili.com/video/BV1oM411X7eQ/
testsuites generating scripts: https://github.com/TuringKi/riscv-p-ext-spec-insn-parse
build steps:
rv32
=== gcc Summary === # of expected passes 725
rv64
=== gcc Summary === # of expected passes 992