Sudharsan Veeravalli
c9684e5892
[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.
2025-08-04 12:51:14 +05:30
..
2025-07-25 20:55:52 -07:00
2025-07-28 11:30:39 -07:00
2025-05-30 10:27:57 -07:00
2025-06-17 13:28:45 -07:00
2025-08-03 15:45:36 -07:00
2025-06-17 13:28:45 -07:00
2025-07-11 11:04:41 -07:00
2025-05-06 18:01:17 -07:00
2025-06-04 16:11:43 +08:00
2025-07-25 20:55:15 -07:00
2025-06-12 02:24:10 +08:00
2025-07-30 16:30:48 +08:00
2025-04-28 10:07:51 +08:00
2025-05-29 10:21:38 -07:00
2025-04-03 11:28:45 -07:00
2025-06-27 10:54:41 +08:00
2025-07-23 22:06:46 -07:00
2025-04-22 19:24:29 -07:00
2025-07-27 10:43:52 -07:00
2025-07-15 08:09:18 -07:00
2025-02-07 13:35:30 +05:30
2025-04-28 09:26:34 -07:00
2025-05-28 14:56:44 +08:00
2025-07-09 16:25:22 +08:00
2025-04-30 16:59:05 +08:00
2025-07-21 14:51:41 +08:00
2025-02-27 13:14:22 -08:00
2025-05-09 12:36:59 -07:00
2025-07-25 21:16:07 -07:00
2025-06-25 23:09:24 -07:00
2025-07-16 16:02:15 +07:00
2025-04-28 08:35:51 -07:00
2025-07-26 00:05:33 -07:00
2025-05-15 08:35:43 -07:00
2025-05-15 10:51:06 +08:00
2025-05-09 12:36:59 -07:00
2025-07-28 21:35:09 -07:00
2025-05-15 10:58:13 +08:00
2025-03-30 22:38:26 -07:00
2025-07-21 14:51:41 +08:00
2025-07-31 10:14:36 +08:00
2025-08-01 09:44:09 -07:00
2025-08-01 09:44:09 -07:00
2025-07-25 11:29:17 +08:00
2025-06-25 23:09:24 -07:00
2025-07-03 10:59:10 +02:00
2025-04-04 09:37:52 -07:00
2025-08-04 12:51:14 +05:30
2025-07-23 16:29:12 +08:00
2025-07-23 16:29:12 +08:00
2025-05-21 08:26:35 -07:00
2025-08-01 09:44:09 -07:00
2025-03-17 12:49:08 -07:00
2025-04-25 15:45:43 -07:00
2025-07-09 07:54:07 -07:00
2025-07-24 18:03:30 -07:00
2025-04-08 17:53:39 -07:00
2025-05-22 08:39:57 -07:00
2025-05-13 13:53:38 +08:00
2025-07-15 14:49:54 -07:00
2025-05-09 12:36:59 -07:00
2025-05-14 09:54:07 -07:00
2025-05-09 12:36:59 -07:00
2025-05-09 12:36:59 -07:00
2025-02-27 19:25:14 -08:00
2025-08-02 21:53:58 -07:00
2025-06-05 12:22:43 +08:00
2025-07-03 12:47:53 +08:00
2025-07-30 13:29:47 +08:00
2025-07-31 22:03:29 -07:00
2025-07-19 17:53:39 -07:00
2025-08-01 10:13:46 -07:00
2025-07-30 13:29:47 +08:00
2025-06-25 23:09:24 -07:00
2025-05-23 08:30:29 -07:00
2025-04-25 17:12:27 -07:00
2025-04-25 17:12:27 -07:00
2025-06-23 10:49:47 -07:00
2025-05-23 08:30:29 -07:00
2025-03-05 10:59:45 -08:00
2025-07-21 11:48:33 +01:00
2025-07-09 11:09:13 +08:00
2025-04-18 10:59:32 +08:00
2025-03-06 21:55:47 -08:00
2025-06-25 23:09:24 -07:00
2025-07-30 09:43:57 -07:00
2025-03-20 15:20:04 -04:00
2025-07-25 20:55:15 -07:00
2025-07-14 09:26:19 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-09 09:38:44 -07:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-08-02 10:09:32 -07:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-07-10 14:15:22 +08:00
2025-05-12 12:05:50 +08:00
2025-07-09 09:38:44 -07:00
2025-07-10 14:15:22 +08:00
2025-08-04 12:51:14 +05:30
2025-08-04 12:51:14 +05:30
2025-07-22 15:55:12 +08:00
2025-07-22 15:55:12 +08:00
2025-05-22 08:46:48 -07:00
2025-07-25 12:34:09 +08:00
2025-02-05 11:41:37 +05:30
2025-06-15 16:51:09 -07:00
2025-06-15 16:51:09 -07:00
2025-07-31 21:11:56 +01:00
2025-07-30 13:29:47 +08:00
2025-07-18 10:56:07 +08:00
2025-07-31 10:15:12 +08:00
2025-07-24 20:38:36 +08:00
2025-05-23 08:30:29 -07:00