aboutsummaryrefslogtreecommitdiff
path: root/opcodes/bpf-opc.c
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2020-04-16 09:52:57 +0200
committerJose E. Marchesi <jose.marchesi@oracle.com>2020-04-16 09:52:57 +0200
commitc54a9b56696e584c2b8c7146caac337c063f5516 (patch)
tree33205ceeca676265c2b2d4f5c049ec762d29fadd /opcodes/bpf-opc.c
parentd191d716f38b41720c4955823fe6c178cf0786f0 (diff)
downloadgdb-c54a9b56696e584c2b8c7146caac337c063f5516.zip
gdb-c54a9b56696e584c2b8c7146caac337c063f5516.tar.gz
gdb-c54a9b56696e584c2b8c7146caac337c063f5516.tar.bz2
cpu,gas,opcodes: support for eBPF JMP32 instruction class
Add support for the JMP32 class of eBPF instructions. cpu/ChangeLog * bpf.cpu (define-cond-jump-insn): Renamed from djci. (dcji) New version with support for JMP32 gas/ChangeLog * testsuite/gas/bpf/bpf.exp: Run jump32 tests. * testsuite/gas/bpf/jump32.s: New file. * testsuite/gas/bpf/jump32.d: Likewise. opcodes/ChangeLog * bpf-desc.c: Regenerate. * bpf-desc.h: Likewise. * bpf-opc.c: Regenerate. * bpf-opc.h: Likewise.
Diffstat (limited to 'opcodes/bpf-opc.c')
-rw-r--r--opcodes/bpf-opc.c264
1 files changed, 264 insertions, 0 deletions
diff --git a/opcodes/bpf-opc.c b/opcodes/bpf-opc.c
index d03e8d2..a64da68 100644
--- a/opcodes/bpf-opc.c
+++ b/opcodes/bpf-opc.c
@@ -1024,6 +1024,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x1d }
},
+/* jeq32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x16 }
+ },
+/* jeq32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x1e }
+ },
/* jgt $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1036,6 +1048,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x2d }
},
+/* jgt32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x26 }
+ },
+/* jgt32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x2e }
+ },
/* jge $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1048,6 +1072,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x3d }
},
+/* jge32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x36 }
+ },
+/* jge32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x3e }
+ },
/* jlt $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1060,6 +1096,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0xad }
},
+/* jlt32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0xa6 }
+ },
+/* jlt32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0xae }
+ },
/* jle $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1072,6 +1120,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0xbd }
},
+/* jle32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0xb6 }
+ },
+/* jle32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0xbe }
+ },
/* jset $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1084,6 +1144,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x4d }
},
+/* jset32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x46 }
+ },
+/* jset32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x4e }
+ },
/* jne $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1096,6 +1168,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x5d }
},
+/* jne32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x56 }
+ },
+/* jne32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x5e }
+ },
/* jsgt $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1108,6 +1192,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x6d }
},
+/* jsgt32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x66 }
+ },
+/* jsgt32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x6e }
+ },
/* jsge $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1120,6 +1216,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0x7d }
},
+/* jsge32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0x76 }
+ },
+/* jsge32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0x7e }
+ },
/* jslt $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1132,6 +1240,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0xcd }
},
+/* jslt32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0xc6 }
+ },
+/* jslt32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0xce }
+ },
/* jsle $dstle,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1144,6 +1264,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
& ifmt_jeqrle, { 0xdd }
},
+/* jsle32 $dstle,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqile, { 0xd6 }
+ },
+/* jsle32 $dstle,$srcle,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTLE), ',', OP (SRCLE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrle, { 0xde }
+ },
/* jeq $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1156,6 +1288,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x1d }
},
+/* jeq32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x16 }
+ },
+/* jeq32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x1e }
+ },
/* jgt $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1168,6 +1312,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x2d }
},
+/* jgt32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x26 }
+ },
+/* jgt32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x2e }
+ },
/* jge $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1180,6 +1336,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x3d }
},
+/* jge32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x36 }
+ },
+/* jge32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x3e }
+ },
/* jlt $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1192,6 +1360,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0xad }
},
+/* jlt32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0xa6 }
+ },
+/* jlt32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0xae }
+ },
/* jle $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1204,6 +1384,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0xbd }
},
+/* jle32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0xb6 }
+ },
+/* jle32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0xbe }
+ },
/* jset $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1216,6 +1408,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x4d }
},
+/* jset32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x46 }
+ },
+/* jset32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x4e }
+ },
/* jne $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1228,6 +1432,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x5d }
},
+/* jne32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x56 }
+ },
+/* jne32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x5e }
+ },
/* jsgt $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1240,6 +1456,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x6d }
},
+/* jsgt32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x66 }
+ },
+/* jsgt32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x6e }
+ },
/* jsge $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1252,6 +1480,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0x7d }
},
+/* jsge32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0x76 }
+ },
+/* jsge32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0x7e }
+ },
/* jslt $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1264,6 +1504,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0xcd }
},
+/* jslt32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0xc6 }
+ },
+/* jslt32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0xce }
+ },
/* jsle $dstbe,$imm32,$disp16 */
{
{ 0, 0, 0, 0 },
@@ -1276,6 +1528,18 @@ static const CGEN_OPCODE bpf_cgen_insn_opcode_table[MAX_INSNS] =
{ { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
& ifmt_jeqrbe, { 0xdd }
},
+/* jsle32 $dstbe,$imm32,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (IMM32), ',', OP (DISP16), 0 } },
+ & ifmt_jeqibe, { 0xd6 }
+ },
+/* jsle32 $dstbe,$srcbe,$disp16 */
+ {
+ { 0, 0, 0, 0 },
+ { { MNEM, ' ', OP (DSTBE), ',', OP (SRCBE), ',', OP (DISP16), 0 } },
+ & ifmt_jeqrbe, { 0xde }
+ },
/* ja $disp16 */
{
{ 0, 0, 0, 0 },