diff options
author | Kito Cheng <kito.cheng@sifive.com> | 2023-03-15 17:21:25 +0800 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2023-03-15 17:22:47 +0800 |
commit | cf40b8a4dd3db7370f4cde8415a05eed07ba711a (patch) | |
tree | 1af6631339915181cea7447458285d04c5c8ac6b /libunwind | |
parent | ba1c7731f15bb51253316180330d60f16fe3c5b7 (diff) | |
download | llvm-cf40b8a4dd3db7370f4cde8415a05eed07ba711a.tar.gz |
[RISCV] Pass vector argument by stack correctly.
We've a argument lowering logic to prevent floating-point value pass
passed with bit-conversion, but that rule should not applied to vector
arguments.
---
How to pass argument to `foo`:
```
tail call void @foo(i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0,
<vscale x 16 x float> zeroinitializer,
<vscale x 16 x float> zeroinitializer,
<vscale x 16 x float> zeroinitializer)
```
`foo` take 13 arguments, first 8 argument pass in GPR, and next 2 LMUL 8 vector
arguments passed in v8-v23, and now we run out of argument register for GPR and
vector register, so we must pass last LMUL 8 vector argument by stack.
Which means we should reserve `vlenb * 8` byte for stack for the last
vector argument.
Reviewed By: craig.topper, asb
Differential Revision: https://reviews.llvm.org/D145938
Diffstat (limited to 'libunwind')
0 files changed, 0 insertions, 0 deletions