Linux-Sparse Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] builtin: teach sparse about __builtin_ia32_pause()
@ 2020-10-09 16:28 Luc Van Oostenryck
  0 siblings, 0 replies; only message in thread
From: Luc Van Oostenryck @ 2020-10-09 16:28 UTC (permalink / raw)
  To: linux-sparse; +Cc: Ilya Maximets, Luc Van Oostenryck

This builtin is used by Open vSwitch, so teach Sparse about it.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 target-x86.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/target-x86.c b/target-x86.c
index b7ff8f2ab4ed..9d82869a27b8 100644
--- a/target-x86.c
+++ b/target-x86.c
@@ -1,6 +1,7 @@
 #include "symbol.h"
 #include "target.h"
 #include "machine.h"
+#include "builtin.h"
 
 
 static void predefine_i386(const struct target *self)
@@ -39,6 +40,11 @@ static void init_x86_common(const struct target *target)
 	}
 }
 
+static const struct builtin_fn builtins_x86_common[] = {
+	{ "__builtin_ia32_pause", &void_ctype, 0, },
+	{ }
+};
+
 
 static void init_i386(const struct target *target)
 {
@@ -64,6 +70,7 @@ const struct target target_i386 = {
 
 	.init = init_i386,
 	.predefine = predefine_i386,
+	.builtins = builtins_x86_common,
 };
 
 
@@ -159,4 +166,5 @@ const struct target target_x86_64 = {
 
 	.init = init_x86_64,
 	.predefine = predefine_x86_64,
+	.builtins = builtins_x86_common,
 };
-- 
2.28.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-09 16:28 [PATCH] builtin: teach sparse about __builtin_ia32_pause() Luc Van Oostenryck

Linux-Sparse Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-sparse/0 linux-sparse/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-sparse linux-sparse/ https://lore.kernel.org/linux-sparse \
		linux-sparse@vger.kernel.org
	public-inbox-index linux-sparse

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-sparse


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git