diff options
author | Sudharsan Veeravalli <quic_svs@quicinc.com> | 2025-08-04 12:51:14 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-04 12:51:14 +0530 |
commit | c9684e58923babef7b994846b2208a05f3e3b31b (patch) | |
tree | 0c939e001da4c254a03d2c9979d397aa75bd38d0 /lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp | |
parent | 549990124d1f71b1cdd0f14228a22738113b2f84 (diff) | |
download | llvm-c9684e58923babef7b994846b2208a05f3e3b31b.zip llvm-c9684e58923babef7b994846b2208a05f3e3b31b.tar.gz llvm-c9684e58923babef7b994846b2208a05f3e3b31b.tar.bz2 |
[RISCV] Implement EmitTargetCodeForMemset for Xqcilsm (#151555)
This patch adds support for converting memset calls to one or more
`QC_SETWMI` instructions when beneficial. We only handle aligned memset
calls for now.
We limit a `QC_SETWMI` to 16 words or less to improve interruptibility.
So for `1-16` words we use a single `QC_SETWMI`:
`QC_SETWMI reg1, N, 0(reg2)`
For `17-32 `words we use two `QC_SETWMI's` with the first as 16 words
and the second for the remainder:
```
QC_SETWMI reg1, 16, 0(reg2)
QC_SETWMI reg1, N, 64(reg2)
```
For `33-48` words, we would like to use `(16, 16, n)`, but that means
the last QC_SETWMI needs an offset of `128` which the instruction
doesn't support. So in this case we use a length of `15` for the second
instruction and we do the rest with the third instruction.
This means the maximum number of words handled is `47` (for now):
```
QC_SETWMI R2, R0, 16, 0
QC_SETWMI R2, R0, 15, 64
QC_SETWMI R2, R0, N, 124
```
For `48` words or more, call the target independent memset.
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp')
0 files changed, 0 insertions, 0 deletions