aboutsummaryrefslogtreecommitdiff
path: root/opcodes/bpf-desc.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-desc.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-desc.c')
-rw-r--r--opcodes/bpf-desc.c220
1 files changed, 220 insertions, 0 deletions
diff --git a/opcodes/bpf-desc.c b/opcodes/bpf-desc.c
index 953d767..113f545 100644
--- a/opcodes/bpf-desc.c
+++ b/opcodes/bpf-desc.c
@@ -1014,6 +1014,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JEQRLE, "jeqrle", "jeq", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jeq32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JEQ32ILE, "jeq32ile", "jeq32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jeq32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JEQ32RLE, "jeq32rle", "jeq32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jgt $dstle,$imm32,$disp16 */
{
BPF_INSN_JGTILE, "jgtile", "jgt", 64,
@@ -1024,6 +1034,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JGTRLE, "jgtrle", "jgt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jgt32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JGT32ILE, "jgt32ile", "jgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jgt32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JGT32RLE, "jgt32rle", "jgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jge $dstle,$imm32,$disp16 */
{
BPF_INSN_JGEILE, "jgeile", "jge", 64,
@@ -1034,6 +1054,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JGERLE, "jgerle", "jge", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jge32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JGE32ILE, "jge32ile", "jge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jge32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JGE32RLE, "jge32rle", "jge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jlt $dstle,$imm32,$disp16 */
{
BPF_INSN_JLTILE, "jltile", "jlt", 64,
@@ -1044,6 +1074,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JLTRLE, "jltrle", "jlt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jlt32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JLT32ILE, "jlt32ile", "jlt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jlt32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JLT32RLE, "jlt32rle", "jlt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jle $dstle,$imm32,$disp16 */
{
BPF_INSN_JLEILE, "jleile", "jle", 64,
@@ -1054,6 +1094,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JLERLE, "jlerle", "jle", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jle32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JLE32ILE, "jle32ile", "jle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jle32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JLE32RLE, "jle32rle", "jle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jset $dstle,$imm32,$disp16 */
{
BPF_INSN_JSETILE, "jsetile", "jset", 64,
@@ -1064,6 +1114,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSETRLE, "jsetrle", "jset", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jset32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JSET32ILE, "jset32ile", "jset32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jset32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JSET32RLE, "jset32rle", "jset32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jne $dstle,$imm32,$disp16 */
{
BPF_INSN_JNEILE, "jneile", "jne", 64,
@@ -1074,6 +1134,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JNERLE, "jnerle", "jne", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jne32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JNE32ILE, "jne32ile", "jne32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jne32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JNE32RLE, "jne32rle", "jne32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jsgt $dstle,$imm32,$disp16 */
{
BPF_INSN_JSGTILE, "jsgtile", "jsgt", 64,
@@ -1084,6 +1154,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSGTRLE, "jsgtrle", "jsgt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jsgt32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JSGT32ILE, "jsgt32ile", "jsgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jsgt32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JSGT32RLE, "jsgt32rle", "jsgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jsge $dstle,$imm32,$disp16 */
{
BPF_INSN_JSGEILE, "jsgeile", "jsge", 64,
@@ -1094,6 +1174,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSGERLE, "jsgerle", "jsge", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jsge32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JSGE32ILE, "jsge32ile", "jsge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jsge32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JSGE32RLE, "jsge32rle", "jsge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jslt $dstle,$imm32,$disp16 */
{
BPF_INSN_JSLTILE, "jsltile", "jslt", 64,
@@ -1104,6 +1194,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSLTRLE, "jsltrle", "jslt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jslt32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JSLT32ILE, "jslt32ile", "jslt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jslt32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JSLT32RLE, "jslt32rle", "jslt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jsle $dstle,$imm32,$disp16 */
{
BPF_INSN_JSLEILE, "jsleile", "jsle", 64,
@@ -1114,6 +1214,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSLERLE, "jslerle", "jsle", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
},
+/* jsle32 $dstle,$imm32,$disp16 */
+ {
+ BPF_INSN_JSLE32ILE, "jsle32ile", "jsle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
+/* jsle32 $dstle,$srcle,$disp16 */
+ {
+ BPF_INSN_JSLE32RLE, "jsle32rle", "jsle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x80" } } } }
+ },
/* jeq $dstbe,$imm32,$disp16 */
{
BPF_INSN_JEQIBE, "jeqibe", "jeq", 64,
@@ -1124,6 +1234,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JEQRBE, "jeqrbe", "jeq", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jeq32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JEQ32IBE, "jeq32ibe", "jeq32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jeq32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JEQ32RBE, "jeq32rbe", "jeq32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jgt $dstbe,$imm32,$disp16 */
{
BPF_INSN_JGTIBE, "jgtibe", "jgt", 64,
@@ -1134,6 +1254,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JGTRBE, "jgtrbe", "jgt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jgt32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JGT32IBE, "jgt32ibe", "jgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jgt32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JGT32RBE, "jgt32rbe", "jgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jge $dstbe,$imm32,$disp16 */
{
BPF_INSN_JGEIBE, "jgeibe", "jge", 64,
@@ -1144,6 +1274,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JGERBE, "jgerbe", "jge", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jge32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JGE32IBE, "jge32ibe", "jge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jge32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JGE32RBE, "jge32rbe", "jge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jlt $dstbe,$imm32,$disp16 */
{
BPF_INSN_JLTIBE, "jltibe", "jlt", 64,
@@ -1154,6 +1294,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JLTRBE, "jltrbe", "jlt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jlt32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JLT32IBE, "jlt32ibe", "jlt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jlt32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JLT32RBE, "jlt32rbe", "jlt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jle $dstbe,$imm32,$disp16 */
{
BPF_INSN_JLEIBE, "jleibe", "jle", 64,
@@ -1164,6 +1314,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JLERBE, "jlerbe", "jle", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jle32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JLE32IBE, "jle32ibe", "jle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jle32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JLE32RBE, "jle32rbe", "jle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jset $dstbe,$imm32,$disp16 */
{
BPF_INSN_JSETIBE, "jsetibe", "jset", 64,
@@ -1174,6 +1334,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSETRBE, "jsetrbe", "jset", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jset32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JSET32IBE, "jset32ibe", "jset32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jset32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JSET32RBE, "jset32rbe", "jset32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jne $dstbe,$imm32,$disp16 */
{
BPF_INSN_JNEIBE, "jneibe", "jne", 64,
@@ -1184,6 +1354,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JNERBE, "jnerbe", "jne", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jne32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JNE32IBE, "jne32ibe", "jne32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jne32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JNE32RBE, "jne32rbe", "jne32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jsgt $dstbe,$imm32,$disp16 */
{
BPF_INSN_JSGTIBE, "jsgtibe", "jsgt", 64,
@@ -1194,6 +1374,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSGTRBE, "jsgtrbe", "jsgt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jsgt32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JSGT32IBE, "jsgt32ibe", "jsgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jsgt32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JSGT32RBE, "jsgt32rbe", "jsgt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jsge $dstbe,$imm32,$disp16 */
{
BPF_INSN_JSGEIBE, "jsgeibe", "jsge", 64,
@@ -1204,6 +1394,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSGERBE, "jsgerbe", "jsge", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jsge32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JSGE32IBE, "jsge32ibe", "jsge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jsge32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JSGE32RBE, "jsge32rbe", "jsge32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jslt $dstbe,$imm32,$disp16 */
{
BPF_INSN_JSLTIBE, "jsltibe", "jslt", 64,
@@ -1214,6 +1414,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSLTRBE, "jsltrbe", "jslt", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jslt32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JSLT32IBE, "jslt32ibe", "jslt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jslt32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JSLT32RBE, "jslt32rbe", "jslt32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* jsle $dstbe,$imm32,$disp16 */
{
BPF_INSN_JSLEIBE, "jsleibe", "jsle", 64,
@@ -1224,6 +1434,16 @@ static const CGEN_IBASE bpf_cgen_insn_table[MAX_INSNS] =
BPF_INSN_JSLERBE, "jslerbe", "jsle", 64,
{ 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
},
+/* jsle32 $dstbe,$imm32,$disp16 */
+ {
+ BPF_INSN_JSLE32IBE, "jsle32ibe", "jsle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
+/* jsle32 $dstbe,$srcbe,$disp16 */
+ {
+ BPF_INSN_JSLE32RBE, "jsle32rbe", "jsle32", 64,
+ { 0, { { { (1<<MACH_BASE), 0 } }, { { 1, "\x40" } } } }
+ },
/* ja $disp16 */
{
BPF_INSN_JA, "ja", "ja", 64,