-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UNRATIFIED RISC-V: Add 'Zicfilp' extension
[DO NOT MERGE] Until the 'Zicfilp' extension is frozen/ratified and final version number is determined, this patch should not be merged upstream. This commit uses unratified version 0.1 as in the documentation (instead of possible 1.0 after ratification). This commit adds RISC-V Landing Pads extension (Zicfilp) based on the document version 0.1 (latest git revision): <riscv/riscv-cfi@c6a8311> **Important Note** The "lpad" instruction requires 4-byte alignment to complete without exceptions but this is not currently enforced by the assembler. bfd/ChangeLog: * elfxx-riscv.c (riscv_supported_std_z_ext): Add 'Zicfilp' extension to valid 'Z' extension list. (riscv_multi_subset_supports): Support new instruction class. (riscv_multi_subset_supports_ext): Likewise. gas/ChangeLog: * testsuite/gas/riscv/zicfilp.s: New test. * testsuite/gas/riscv/zicfilp.d: Likewise. include/ChangeLog: * opcode/riscv-opc.h (MATCH_LPAD, MASK_LPAD): New. * opcode/riscv.h (enum riscv_insn_class): Add new instruction class INSN_CLASS_ZICFILP. opcodes/ChangeLog: * riscv-opc.c (riscv_opcodes): Although not strictly a hint, add "lpad" to the list of standard hints because of its encoding.
- Loading branch information
Showing
6 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#as: -march=rv32ic_zicfilp | ||
#objdump: -d | ||
|
||
.*:[ ]+file format .* | ||
|
||
Disassembly of section .text: | ||
|
||
0+000 <target>: | ||
[ ]+[0-9a-f]+:[ ]+12345017[ ]+lpad[ ]+0x12345 | ||
[ ]+[0-9a-f]+:[ ]+12345017[ ]+lpad[ ]+0x12345 | ||
[ ]+[0-9a-f]+:[ ]+0001[ ]+nop | ||
[ ]+[0-9a-f]+:[ ]+f0123017[ ]+lpad[ ]+0xf0123 | ||
[ ]+[0-9a-f]+:[ ]+f0123017[ ]+lpad[ ]+0xf0123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
target: | ||
# lpad LPL == auipc x0, LPL | ||
lpad 0x12345 | ||
auipc zero, 0x12345 | ||
|
||
# Break alignment: | ||
# | ||
# Unaligned lpad causes illegal-instruction exception | ||
# but must be disassembled (since alignment checking is a part of | ||
# the lpad instruction operations). | ||
c.nop | ||
|
||
lpad 0xf0123 | ||
auipc zero, 0xf0123 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters