Commit 746c682
authored
[LoongArch] Introduce
According to the offical LoongArch reference manual, the 32-bit
LoongArch is divied into two variants: the Reduced version (LA32R) and
Standard version (LA32S). LA32S extends LA32R by adding additional
instructions, and the 64-bit version (LA64) fully includes the LA32S
instruction set.
This patch introduces a new target feature `32s` for the LoongArch
backend, enabling support for instructions specific to the LA32S
variant.
The LA32S exntension includes the following additional instructions:
- ALSL.W
- {AND,OR}N
- B{EQ,NE}Z
- BITREV.{4B,W}
- BSTR{INS,PICK}.W
- BYTEPICK.W
- CL{O,Z}.W
- CPUCFG
- CT{O,Z}.W
- EXT.W,{B,H}
- F{LD,ST}X.{D,S}
- MASK{EQ,NE}Z
- PC{ADDI,ALAU12I}
- REVB.2H
- ROTR{I},W
Additionally, LA32R defines three new instruction aliases:
- RDCNTID.W RJ => RDTIMEL.W ZERO, RJ
- RDCNTVH.W RD => RDTIMEH.W RD, ZERO
- RDCNTVL.W RD => RDTIMEL.W RD, ZERO32s target feature for LA32S ISA extensions (llvm#139695)1 parent a630309 commit 746c682
File tree
60 files changed
+14418
-6696
lines changed- llvm
- lib/Target/LoongArch
- test
- CodeGen/LoongArch
- ir-instruction
- MC/LoongArch/Basic/Integer
- tools/UpdateTestChecks/update_llc_test_checks/Inputs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
60 files changed
+14418
-6696
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
17 | 25 | | |
18 | 26 | | |
19 | | - | |
| 27 | + | |
| 28 | + | |
20 | 29 | | |
21 | 30 | | |
22 | 31 | | |
| |||
Lines changed: 12 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
| 300 | + | |
300 | 301 | | |
| 302 | + | |
301 | 303 | | |
302 | 304 | | |
303 | 305 | | |
| |||
454 | 456 | | |
455 | 457 | | |
456 | 458 | | |
457 | | - | |
| 459 | + | |
458 | 460 | | |
| 461 | + | |
459 | 462 | | |
460 | 463 | | |
461 | 464 | | |
| |||
529 | 532 | | |
530 | 533 | | |
531 | 534 | | |
532 | | - | |
| 535 | + | |
533 | 536 | | |
| 537 | + | |
534 | 538 | | |
535 | 539 | | |
536 | 540 | | |
| |||
569 | 573 | | |
570 | 574 | | |
571 | 575 | | |
572 | | - | |
| 576 | + | |
573 | 577 | | |
| 578 | + | |
574 | 579 | | |
575 | 580 | | |
576 | 581 | | |
| |||
677 | 682 | | |
678 | 683 | | |
679 | 684 | | |
680 | | - | |
| 685 | + | |
681 | 686 | | |
| 687 | + | |
682 | 688 | | |
683 | 689 | | |
684 | 690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
67 | 89 | | |
68 | 90 | | |
69 | 91 | | |
| |||
0 commit comments