Linux Test Project
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] lapi/bpf: Add /= and %=
@ 2021-04-26 12:01 Richard Palethorpe
  2021-04-26 12:01 ` [LTP] [PATCH 2/2] bpf: Check truncation on 32bit div/mod by zero Richard Palethorpe
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Palethorpe @ 2021-04-26 12:01 UTC (permalink / raw)
  To: ltp

Add div and mod instructions.

Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
---
 include/lapi/bpf.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/lapi/bpf.h b/include/lapi/bpf.h
index f27a92146..5ae25293b 100644
--- a/include/lapi/bpf.h
+++ b/include/lapi/bpf.h
@@ -37,8 +37,10 @@
 #define BPF_OP(code)    ((code) & 0xf0)
 #define		BPF_ADD		0x00
 #define		BPF_SUB		0x10
+#define		BPF_DIV		0x30
 #define		BPF_LSH		0x60
 #define		BPF_RSH		0x70
+#define		BPF_MOD		0x90
 
 #define		BPF_JEQ		0x10
 
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-27 12:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-26 12:01 [LTP] [PATCH 1/2] lapi/bpf: Add /= and %= Richard Palethorpe
2021-04-26 12:01 ` [LTP] [PATCH 2/2] bpf: Check truncation on 32bit div/mod by zero Richard Palethorpe
2021-04-27  9:30   ` Petr Vorel
2021-04-27  9:50     ` Richard Palethorpe
2021-04-27 10:54       ` Cyril Hrubis
2021-04-27 10:58     ` Cyril Hrubis
2021-04-27 12:03       ` Petr Vorel
2021-04-27  9:54   ` Cyril Hrubis
2021-04-27 11:25     ` Richard Palethorpe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox