This repository was archived by the owner on May 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
RISCV: Add vector psabi checking. #376
Open
yanzhang-dev
wants to merge
7
commits into
riscvarchive:rvv-submission-v1
Choose a base branch
from
yanzhang-dev:yanzhang/vector-psabi
base: rvv-submission-v1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2c68135
RISCV: Add vector psabi checking.
211f26b
fix: disable the warning on attribute vector_size.
1004381
fix: code style.
f9bafb8
fix: need to split the words with space.
cb6ae98
fix: pass the right field type and other comments.
33484c5
fix: address comments.
a6c96b8
fix: disable intrinsic warning.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -671,14 +671,18 @@ typedef struct { | |
|
||
/* Number of floating-point registers used so far, likewise. */ | ||
unsigned int num_fprs; | ||
|
||
bool rvv_psabi_warning; | ||
} CUMULATIVE_ARGS; | ||
|
||
/* Initialize a variable CUM of type CUMULATIVE_ARGS | ||
for a call to a function whose data type is FNTYPE. | ||
For a library call, FNTYPE is 0. */ | ||
|
||
void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rename to |
||
#define INIT_CUMULATIVE_ARGS(CUM, FNTYPE, LIBNAME, INDIRECT, N_NAMED_ARGS) \ | ||
memset (&(CUM), 0, sizeof (CUM)) | ||
init_cumulative_args (&(CUM), (FNTYPE), (LIBNAME), (INDIRECT), \ | ||
(N_NAMED_ARGS) != -1) | ||
|
||
#define EPILOGUE_USES(REGNO) riscv_epilogue_uses (REGNO) | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-O0 -march=rv64gcv -mabi=lp64d" } */ | ||
|
||
#include "riscv_vector.h" | ||
|
||
void | ||
fun (vint32m1_t a) { } /* { dg-warning "the vector type" } */ | ||
|
||
void | ||
bar () | ||
{ | ||
vint32m1_t a; | ||
fun (a); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ | ||
|
||
#include "riscv_vector.h" | ||
|
||
vint32m1_t | ||
fun (vint32m1_t* a) { return *a; } /* { dg-warning "the vector type" } */ | ||
kito-cheng marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
void | ||
bar () | ||
{ | ||
vint32m1_t a; | ||
fun (&a); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ | ||
|
||
#include "riscv_vector.h" | ||
|
||
vint32m1_t* | ||
fun (vint32m1_t* a) { return a; } /* { dg-bogus "the vector type" } */ | ||
|
||
void | ||
bar () | ||
{ | ||
vint32m1_t a; | ||
fun (&a); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ | ||
|
||
#include "riscv_vector.h" | ||
|
||
typedef int v4si __attribute__ ((vector_size (16))); | ||
|
||
v4si | ||
fun (v4si a) { return a; } /* { dg-bogus "the vector type" } */ | ||
|
||
void | ||
bar () | ||
{ | ||
v4si a; | ||
fun (a); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* { dg-do compile } */ | ||
/* { dg-options "-march=rv64gcv -mabi=lp64d" } */ | ||
|
||
typedef int v4si __attribute__ ((vector_size (16))); | ||
struct A { int a; v4si b; }; | ||
|
||
void | ||
fun (struct A a) {} /* { dg-bogus "the vector type" } */ | ||
|
||
void | ||
bar () | ||
{ | ||
struct A a; | ||
fun (a); | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.