Commit 99bf60a
committed
UNRATIFIED RISC-V: Add 'Zcmop' extension
[DO NOT MERGE]
Until the 'Zcmop' extension is frozen/ratified and final version number is
determined, this patch should not be merged upstream. This commit uses
version 0.1 as a placeholder.
This commit adds support for the compressed "May Be Operations (MOP)"
(Zcmop) extension which adds 8 compressed MOP instructions.
By default, they are the same as NOP. However, if certain feature is
supported (and optionally enabled), it is allowed to alter
architectural state unlike HINT instructions.
This commit is based on the TENTATIVE specification:
<riscv/riscv-cfi#131>
bfd/ChangeLog:
* elfxx-riscv.c (riscv_implicit_subsets): Add 'Zcmop' -> 'Zca'
implication. (riscv_supported_std_z_ext): Add 'Zcmop'.
(riscv_multi_subset_supports): Support new instruction class.
(riscv_multi_subset_supports_ext): Likewise.
gas/ChangeLog:
* testsuite/gas/riscv/zcmop.s: New test for 'Zcmop'.
* testsuite/gas/riscv/zcmop.d: Likewise.
include/ChangeLog:
* opcode/riscv-opc.h (
MATCH_C_MOP_0, MASK_C_MOP_0, MATCH_C_MOP_1, MASK_C_MOP_1,
MATCH_C_MOP_2, MASK_C_MOP_2, MATCH_C_MOP_3, MASK_C_MOP_3,
MATCH_C_MOP_4, MASK_C_MOP_4, MATCH_C_MOP_5, MASK_C_MOP_5,
MATCH_C_MOP_6, MASK_C_MOP_6, MATCH_C_MOP_7, MASK_C_MOP_7): New.
* opcode/riscv.h (enum riscv_insn_class): Add new instruction
class INSN_CLASS_ZCMOP.
opcodes/ChangeLog:
* riscv-opc.c (riscv_opcodes): Add new "may be" operations from
the 'Zcmop' extension near the bottom.1 parent 8cd0e4e commit 99bf60a
File tree
6 files changed
+68
-0
lines changed- bfd
- gas/testsuite/gas/riscv
- include/opcode
- opcodes
6 files changed
+68
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1182 | 1182 | | |
1183 | 1183 | | |
1184 | 1184 | | |
| 1185 | + | |
1185 | 1186 | | |
1186 | 1187 | | |
1187 | 1188 | | |
| |||
1322 | 1323 | | |
1323 | 1324 | | |
1324 | 1325 | | |
| 1326 | + | |
1325 | 1327 | | |
1326 | 1328 | | |
1327 | 1329 | | |
| |||
2527 | 2529 | | |
2528 | 2530 | | |
2529 | 2531 | | |
| 2532 | + | |
| 2533 | + | |
2530 | 2534 | | |
2531 | 2535 | | |
2532 | 2536 | | |
| |||
2745 | 2749 | | |
2746 | 2750 | | |
2747 | 2751 | | |
| 2752 | + | |
| 2753 | + | |
2748 | 2754 | | |
2749 | 2755 | | |
2750 | 2756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2384 | 2384 | | |
2385 | 2385 | | |
2386 | 2386 | | |
| 2387 | + | |
| 2388 | + | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
2387 | 2404 | | |
2388 | 2405 | | |
2389 | 2406 | | |
| |||
3527 | 3544 | | |
3528 | 3545 | | |
3529 | 3546 | | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
3530 | 3556 | | |
3531 | 3557 | | |
3532 | 3558 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
| 439 | + | |
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2009 | 2009 | | |
2010 | 2010 | | |
2011 | 2011 | | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
2012 | 2022 | | |
2013 | 2023 | | |
2014 | 2024 | | |
| |||
0 commit comments