Skip to content

Commit

Permalink
Merge branch 'more-builtin' (early part)
Browse files Browse the repository at this point in the history
* builtin: teach sparse about __builtin_ia32_pause()
  • Loading branch information
lucvoo committed Oct 11, 2020
2 parents 8d5756f + f8620c9 commit 85db025
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions target-x86.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "symbol.h"
#include "target.h"
#include "machine.h"
#include "builtin.h"


static void predefine_i386(const struct target *self)
Expand Down Expand Up @@ -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)
{
Expand All @@ -64,6 +70,7 @@ const struct target target_i386 = {

.init = init_i386,
.predefine = predefine_i386,
.builtins = builtins_x86_common,
};


Expand Down Expand Up @@ -159,4 +166,5 @@ const struct target target_x86_64 = {

.init = init_x86_64,
.predefine = predefine_x86_64,
.builtins = builtins_x86_common,
};

0 comments on commit 85db025

Please sign in to comment.