Skip to content

Commit 469b2ee

Browse files
committed
Add missing entries to the appendix per Jim's review
Signed-off-by: Dave Thaler <[email protected]>
1 parent 4a6cea3 commit 469b2ee

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

isa/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Some documentation links include:
88
* https://www.kernel.org/doc/Documentation/networking/filter.txt
99
* https://pchaigno.github.io/bpf/2021/10/20/ebpf-instruction-sets.html
1010
* https://www.kernel.org/doc/html/latest/bpf/bpf_design_QA.html#instruction-level-questions
11+
* https://lore.kernel.org/bpf/[email protected]/
1112

1213
Some implementation links include:
1314

isa/kernel.org/instruction-set.rst

+25-1
Original file line numberDiff line numberDiff line change
@@ -512,95 +512,119 @@ opcode description reference
512512
0x0f dst += src `Arithmetic instructions`_
513513
0x14 dst = (uint32_t)(dst - imm) `Arithmetic instructions`_
514514
0x15 if dst == imm goto +offset `Jump instructions`_
515+
0x16 if (uint32_t)dst == imm goto +offset `Jump instructions`_
515516
0x17 dst -= imm `Arithmetic instructions`_
516517
0x18 dst = imm `Load and store instructions`_
517518
0x1c dst = (uint32_t)(dst - src) `Arithmetic instructions`_
518519
0x1d if dst == src goto +offset `Jump instructions`_
520+
0x1e if (uint32_t)dst == (uint32_t)src goto +offset `Jump instructions`_
519521
0x1f dst -= src `Arithmetic instructions`_
520522
0x20 dst = ntohl(*(uint32_t *)(R6->data + imm)) `Load and store instructions`_
521523
0x24 dst = (uint32_t)(dst * imm) `Arithmetic instructions`_
522524
0x25 if dst > imm goto +offset `Jump instructions`_
525+
0x26 if (uint32_t)dst > imm goto +offset `Jump instructions`_
523526
0x27 dst *= imm `Arithmetic instructions`_
524527
0x28 dst = ntohs(*(uint16_t *)(R6->data + imm)) `Load and store instructions`_
525528
0x2c dst = (uint32_t)(dst * src) `Arithmetic instructions`_
526529
0x2d if dst > src goto +offset `Jump instructions`_
530+
0x2e if (uint32_t)dst > (uint32_t)src goto +offset `Jump instructions`_
527531
0x2f dst *= src `Arithmetic instructions`_
528532
0x30 dst = (*(uint8_t *)(R6->data + imm)) `Load and store instructions`_
529533
0x34 dst = (uint32_t)(dst / imm) `Arithmetic instructions`_
530534
0x35 if dst >= imm goto +offset `Jump instructions`_
535+
0x36 if (uint32_t)dst >= imm goto +offset `Jump instructions`_
531536
0x37 dst /= imm `Arithmetic instructions`_
532537
0x38 dst = ntohll(*(uint64_t *)(R6->data + imm)) `Load and store instructions`_
533538
0x3c dst = (uint32_t)(dst / src) `Arithmetic instructions`_
534539
0x3d if dst >= src goto +offset `Jump instructions`_
540+
0x3e if (uint32_t)dst >= (uint32_t)src goto +offset `Jump instructions`_
535541
0x3f dst /= src `Arithmetic instructions`_
536542
0x40 dst = ntohl(*(uint32_t *)(R6->data + src + imm)) `Load and store instructions`_
537543
0x44 dst = (uint32_t)(dst \| imm) `Arithmetic instructions`_
538544
0x45 if dst & imm goto +offset `Jump instructions`_
545+
0x46 if (uint32_t)dst & imm goto +offset `Jump instructions`_
539546
0x47 dst |= imm `Arithmetic instructions`_
540547
0x48 dst = ntohs(*(uint16_t *)(R6->data + src + imm)) `Load and store instructions`_
541548
0x4c dst = (uint32_t)(dst \| src) `Arithmetic instructions`_
542549
0x4d if dst & src goto +offset `Jump instructions`_
550+
0x4e if (uint32_t)dst & (uint32_t)src goto +offset `Jump instructions`_
543551
0x4f dst |= src `Arithmetic instructions`_
544552
0x50 dst = *(uint8_t *)(R6->data + src + imm)) `Load and store instructions`_
545553
0x54 dst = (uint32_t)(dst & imm) `Arithmetic instructions`_
546554
0x55 if dst != imm goto +offset `Jump instructions`_
555+
0x56 if (uint32_t)dst != imm goto +offset `Jump instructions`_
547556
0x57 dst &= imm `Arithmetic instructions`_
548557
0x58 dst = ntohll(*(uint64_t *)(R6->data + src + imm)) `Load and store instructions`_
549558
0x5c dst = (uint32_t)(dst & src) `Arithmetic instructions`_
550559
0x5d if dst != src goto +offset `Jump instructions`_
560+
0x5e if (uint32_t)dst != (uint32_t)src goto +offset `Jump instructions`_
551561
0x5f dst &= src `Arithmetic instructions`_
552562
0x61 dst = *(uint32_t *)(src + offset) `Load and store instructions`_
553563
0x62 *(uint32_t *)(dst + offset) = imm `Load and store instructions`_
554564
0x63 *(uint32_t *)(dst + offset) = src `Load and store instructions`_
555565
0x64 dst = (uint32_t)(dst << imm) `Arithmetic instructions`_
556566
0x65 if dst s> imm goto +offset `Jump instructions`_
567+
0x66 if (int32_t)dst s> (int32_t)imm goto +offset `Jump instructions`_
557568
0x67 dst <<= imm `Arithmetic instructions`_
558569
0x69 dst = *(uint16_t *)(src + offset) `Load and store instructions`_
559570
0x6a *(uint16_t *)(dst + offset) = imm `Load and store instructions`_
560571
0x6b *(uint16_t *)(dst + offset) = src `Load and store instructions`_
561572
0x6c dst = (uint32_t)(dst << src) `Arithmetic instructions`_
562573
0x6d if dst s> src goto +offset `Jump instructions`_
574+
0x6e if (int32_t)dst s> (int32_t)src goto +offset `Jump instructions`_
563575
0x6f dst <<= src `Arithmetic instructions`_
564576
0x71 dst = *(uint8_t *)(src + offset) `Load and store instructions`_
565577
0x72 *(uint8_t *)(dst + offset) = imm `Load and store instructions`_
566578
0x73 *(uint8_t *)(dst + offset) = src `Load and store instructions`_
567579
0x74 dst = (uint32_t)(dst >> imm) `Arithmetic instructions`_
568580
0x75 if dst s>= imm goto +offset `Jump instructions`_
581+
0x76 if (int32_t)dst s>= (int32_t)imm goto +offset `Jump instructions`_
569582
0x77 dst >>= imm `Arithmetic instructions`_
570583
0x79 dst = *(uint64_t *)(src + offset) `Load and store instructions`_
571584
0x7a *(uint64_t *)(dst + offset) = imm `Load and store instructions`_
572585
0x7b *(uint64_t *)(dst + offset) = src `Load and store instructions`_
573586
0x7c dst = (uint32_t)(dst >> src) `Arithmetic instructions`_
574587
0x7d if dst s>= src goto +offset `Jump instructions`_
588+
0x7e if (int32_t)dst s>= (int32_t)src goto +offset `Jump instructions`_
575589
0x7f dst >>= src `Arithmetic instructions`_
576590
0x84 dst = (uint32_t)-dst `Arithmetic instructions`_
577591
0x85 call imm `Jump instructions`_
578592
0x87 dst = -dst `Arithmetic instructions`_
579593
0x94 dst = (uint32_t)(dst % imm) `Arithmetic instructions`_
580-
0x95 exit `Jump instructions`_
594+
0x95 return `Jump instructions`_
581595
0x97 dst %= imm `Arithmetic instructions`_
582596
0x9c dst = (uint32_t)(dst % src) `Arithmetic instructions`_
583597
0x9f dst %= src `Arithmetic instructions`_
584598
0xa4 dst = (uint32_t)(dst ^ imm) `Arithmetic instructions`_
585599
0xa5 if dst < imm goto +offset `Jump instructions`_
600+
0xa6 if (uint32_t)dst < imm goto +offset `Jump instructions`_
586601
0xa7 dst ^= imm `Arithmetic instructions`_
587602
0xac dst = (uint32_t)(dst ^ src) `Arithmetic instructions`_
588603
0xad if dst < src goto +offset `Jump instructions`_
604+
0xae if (uint32_t)dst < (uint32_t)src goto +offset `Jump instructions`_
589605
0xaf dst ^= src `Arithmetic instructions`_
590606
0xb4 dst = (uint32_t) imm `Arithmetic instructions`_
591607
0xb5 if dst <= imm goto +offset `Jump instructions`_
608+
0xa6 if (uint32_t)dst <= imm goto +offset `Jump instructions`_
592609
0xb7 dst = imm `Arithmetic instructions`_
593610
0xbc dst = (uint32_t) src `Arithmetic instructions`_
594611
0xbd if dst <= src goto +offset `Jump instructions`_
612+
0xbe if (uint32_t)dst <= (uint32_t)src goto +offset `Jump instructions`_
595613
0xbf dst = src `Arithmetic instructions`_
614+
0xc3 (see reference) `Atomic operations`_
596615
0xc4 dst = (uint32_t)(dst s>> imm) `Arithmetic instructions`_
597616
0xc5 if dst s< imm goto +offset `Jump instructions`_
617+
0xc6 if (int32_t)dst s< (int32_t)imm goto +offset `Jump instructions`_
598618
0xc7 dst s>>= imm `Arithmetic instructions`_
599619
0xcc dst = (uint32_t)(dst s>> src) `Arithmetic instructions`_
600620
0xcd if dst s< src goto +offset `Jump instructions`_
621+
0xce if (int32_t)dst s< (int32_t)src goto +offset `Jump instructions`_
601622
0xcf dst s>>= src `Arithmetic instructions`_
602623
0xd4 dst = htole.imm(dst) `Byte swap instructions`_
603624
0xd5 if dst s<= imm goto +offset `Jump instructions`_
625+
0xd6 if (int32_t)dst s<= (int32_t)imm goto +offset `Jump instructions`_
626+
0xdb (see reference) `Atomic operations`_
604627
0xdc dst = htobe.imm(dst) `Byte swap instructions`_
605628
0xdd if dst s<= src goto +offset `Jump instructions`_
629+
0xde if (int32_t)dst s<= (int32_t)src goto +offset `Jump instructions`_
606630
====== ================================================= =============

0 commit comments

Comments
 (0)