-
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.
bpf: gas,include,opcode: add suppor for instructions BSWAP{16,32,64}
This patch adds support for the BPF V4 ISA byte swap instructions to opcodes, assembler and disassembler. Tested in bpf-unknown-none. include/ChangeLog: 2023-07-24 Jose E. Marchesi <[email protected]> * opcode/bpf.h (BPF_IMM32_BSWAP16): Define. (BPF_IMM32_BSWAP32): Likewise. (BPF_IMM32_BSWAP64): Likewise. (enum bpf_insn_id): New entries BPF_INSN_BSWAP{16,32,64}. opcodes/ChangeLog: 2023-07-24 Jose E. Marchesi <[email protected]> * bpf-opc.c (bpf_opcodes): Add entries for the BSWAP* instructions. gas/ChangeLog: 2023-07-24 Jose E. Marchesi <[email protected]> * doc/c-bpf.texi (BPF Instructions): Document BSWAP* instructions. * testsuite/gas/bpf/alu.s: Test BSWAP{16,32,64} instructions. * testsuite/gas/bpf/alu.d: Likewise. * testsuite/gas/bpf/alu-be.d: Likewise. * testsuite/gas/bpf/alu-pseudoc.s: Likewise. * testsuite/gas/bpf/alu-pseudoc.d: Likewise. * testsuite/gas/bpf/alu-be-pseudoc.d: Likewise.
- Loading branch information
Showing
12 changed files
with
74 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* doc/c-bpf.texi (BPF Instructions): Document BSWAP* instructions. | ||
* testsuite/gas/bpf/alu.s: Test BSWAP{16,32,64} instructions. | ||
* testsuite/gas/bpf/alu.d: Likewise. | ||
* testsuite/gas/bpf/alu-be.d: Likewise. | ||
* testsuite/gas/bpf/alu-pseudoc.s: Likewise. | ||
* testsuite/gas/bpf/alu-pseudoc.d: Likewise. | ||
* testsuite/gas/bpf/alu-be-pseudoc.d: Likewise. | ||
|
||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* doc/c-bpf.texi (BPF Instructions): The pseudoc syntax for MOVS* | ||
|
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
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 |
---|---|---|
|
@@ -58,3 +58,6 @@ | |
r1 = (s8) r2 | ||
r1 = (s16) r2 | ||
r1 = (s32) r2 | ||
r1 = bswap16 r1 | ||
r2 = bswap32 r2 | ||
r3 = bswap64 r3 |
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 |
---|---|---|
|
@@ -58,3 +58,6 @@ | |
movs %r1,%r2,8 | ||
movs %r1,%r2,16 | ||
movs %r1,%r2,32 | ||
bswap %r1, 16 | ||
bswap %r2, 32 | ||
bswap %r3, 64 |
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 |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* opcode/bpf.h (BPF_IMM32_BSWAP16): Define. | ||
(BPF_IMM32_BSWAP32): Likewise. | ||
(BPF_IMM32_BSWAP64): Likewise. | ||
(enum bpf_insn_id): New entries BPF_INSN_BSWAP{16,32,64}. | ||
|
||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* opcode/bpf.h (enum bpf_insn_id): Add entry BPF_INSN_JAL. | ||
|
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 |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* bpf-opc.c (bpf_opcodes): Add entries for the BSWAP* | ||
instructions. | ||
|
||
2023-07-24 Jose E. Marchesi <[email protected]> | ||
|
||
* bpf-opc.c (bpf_opcodes): Fix pseudo-c syntax for MOVS* and LDXS* | ||
|
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