* Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
@ 2012-03-15 14:15 Frederic Crozat
2012-03-15 20:02 ` Christopher Li
2012-03-23 8:26 ` Christopher Li
0 siblings, 2 replies; 6+ messages in thread
From: Frederic Crozat @ 2012-03-15 14:15 UTC (permalink / raw)
To: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 388 bytes --]
Hi,
while working on integrating sparse checks in systemd, I noticed some
builtin functions need to be added to sparse list. See attached patch
for the fix.
I've also noted patch from Pekka Enberg
(http://www.spinics.net/lists/linux-sparse/msg02520.html ) is still
needed when running sparse on x86-64. It would be nice to merge it in
git.
--
Frederic Crozat <fcrozat@suse.com>
SUSE
[-- Attachment #2: 0001-Add-__builtin_stpcpy-and-__sync_synchronize-to-decla.patch --]
[-- Type: text/x-patch, Size: 1279 bytes --]
From 1fc7c049236924a7ce1ccd0488d5f38b99763055 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Wed, 29 Feb 2012 15:50:14 +0100
Subject: [PATCH] Add __builtin_stpcpy and __sync_synchronize to
declare_builtin_functions
---
lib.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib.c b/lib.c
index 396e9f1..be0fa8f 100644
--- a/lib.c
+++ b/lib.c
@@ -682,6 +682,7 @@ void declare_builtin_functions(void)
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strspn(const char *, const char *);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strcspn(const char *, const char *);\n");
add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n");
+ add_pre_buffer("extern char* __builtin_stpcpy(const char *, const char*);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n");
/* And bitwise operations.. */
@@ -714,6 +715,7 @@ void declare_builtin_functions(void)
add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n");
add_pre_buffer("extern long __builtin_labs(long);\n");
add_pre_buffer("extern double __builtin_fabs(double);\n");
+ add_pre_buffer("extern void __sync_synchronize();\n");
/* Add Blackfin-specific stuff */
add_pre_buffer(
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
2012-03-15 14:15 Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions Frederic Crozat
@ 2012-03-15 20:02 ` Christopher Li
2012-03-23 8:26 ` Christopher Li
1 sibling, 0 replies; 6+ messages in thread
From: Christopher Li @ 2012-03-15 20:02 UTC (permalink / raw)
To: Frederic Crozat; +Cc: linux-sparse
On Thu, Mar 15, 2012 at 7:15 AM, Frederic Crozat <fcrozat@suse.com> wrote:
> Hi,
>
> while working on integrating sparse checks in systemd, I noticed some
> builtin functions need to be added to sparse list. See attached patch
> for the fix.
It looks fine. I will apply it.
>
> I've also noted patch from Pekka Enberg
> (http://www.spinics.net/lists/linux-sparse/msg02520.html ) is still
> needed when running sparse on x86-64. It would be nice to merge it in
> git.
This one looks fine too. Not sure why I miss it.
Any way, I will apply it as well. Thanks for pointing it out.
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
2012-03-15 14:15 Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions Frederic Crozat
2012-03-15 20:02 ` Christopher Li
@ 2012-03-23 8:26 ` Christopher Li
2012-03-23 9:32 ` Frederic Crozat
1 sibling, 1 reply; 6+ messages in thread
From: Christopher Li @ 2012-03-23 8:26 UTC (permalink / raw)
To: Frederic Crozat; +Cc: linux-sparse
On Thu, Mar 15, 2012 at 7:15 AM, Frederic Crozat <fcrozat@suse.com> wrote:
> while working on integrating sparse checks in systemd, I noticed some
> builtin functions need to be added to sparse list. See attached patch
> for the fix.
Catching up my backlogs. I just find out this patch does not have sign off.
Can you add a sign off line please?
Thanks
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
2012-03-23 8:26 ` Christopher Li
@ 2012-03-23 9:32 ` Frederic Crozat
2012-03-23 10:22 ` Frederic Crozat
0 siblings, 1 reply; 6+ messages in thread
From: Frederic Crozat @ 2012-03-23 9:32 UTC (permalink / raw)
To: Christopher Li; +Cc: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 606 bytes --]
Le vendredi 23 mars 2012 à 01:26 -0700, Christopher Li a écrit :
> On Thu, Mar 15, 2012 at 7:15 AM, Frederic Crozat <fcrozat@suse.com> wrote:
> > while working on integrating sparse checks in systemd, I noticed some
> > builtin functions need to be added to sparse list. See attached patch
> > for the fix.
>
> Catching up my backlogs. I just find out this patch does not have sign off.
>
> Can you add a sign off line please?
Sorry, I didn't knew you needed this.
I've update the patch with adding yet another sync barrier which is now used in systemd.
--
Frederic Crozat <fcrozat@suse.com>
SUSE
[-- Attachment #2: 0001-Add-__builtin_stpcpy-__sync_synchronize-__sync_bool_.patch --]
[-- Type: text/x-patch, Size: 1391 bytes --]
From 60fe1c5011209ff8ea35ba76d3993d0b345f237b Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 23 Mar 2012 10:31:01 +0100
Subject: [PATCH] Add __builtin_stpcpy, __sync_synchronize,
__sync_bool_compare_and_swap to declare_builtin_functions
---
lib.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib.c b/lib.c
index 396e9f1..b61a79f 100644
--- a/lib.c
+++ b/lib.c
@@ -682,6 +682,7 @@ void declare_builtin_functions(void)
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strspn(const char *, const char *);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strcspn(const char *, const char *);\n");
add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n");
+ add_pre_buffer("extern char* __builtin_stpcpy(const char *, const char*);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n");
/* And bitwise operations.. */
@@ -714,6 +715,8 @@ void declare_builtin_functions(void)
add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n");
add_pre_buffer("extern long __builtin_labs(long);\n");
add_pre_buffer("extern double __builtin_fabs(double);\n");
+ add_pre_buffer("extern void __sync_synchronize();\n");
+ add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, void, void);\n");
/* Add Blackfin-specific stuff */
add_pre_buffer(
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
2012-03-23 9:32 ` Frederic Crozat
@ 2012-03-23 10:22 ` Frederic Crozat
2012-03-23 17:48 ` Christopher Li
0 siblings, 1 reply; 6+ messages in thread
From: Frederic Crozat @ 2012-03-23 10:22 UTC (permalink / raw)
To: Christopher Li; +Cc: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
Le vendredi 23 mars 2012 à 10:32 +0100, Frederic Crozat a écrit :
> Le vendredi 23 mars 2012 à 01:26 -0700, Christopher Li a écrit :
> > On Thu, Mar 15, 2012 at 7:15 AM, Frederic Crozat <fcrozat@suse.com> wrote:
> > > while working on integrating sparse checks in systemd, I noticed some
> > > builtin functions need to be added to sparse list. See attached patch
> > > for the fix.
> >
> > Catching up my backlogs. I just find out this patch does not have sign off.
> >
> > Can you add a sign off line please?
>
> Sorry, I didn't knew you needed this.
>
> I've update the patch with adding yet another sync barrier which is now used in systemd.
Better version attached, previous one was causing a warning.
--
Frederic Crozat <fcrozat@suse.com>
SUSE
[-- Attachment #2: 0001-Add-__builtin_stpcpy-__sync_synchronize-__sync_bool_.patch --]
[-- Type: text/x-patch, Size: 1434 bytes --]
From 51a1ce8cca1301ae2f36f7be733b67dee14933ce Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 23 Mar 2012 10:31:01 +0100
Subject: [PATCH] Add __builtin_stpcpy, __sync_synchronize,
__sync_bool_compare_and_swap to declare_builtin_functions
Signed-off-by: Frederic Crozat <fcrozat@suse.com>
---
lib.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/lib.c b/lib.c
index 396e9f1..30ffd89 100644
--- a/lib.c
+++ b/lib.c
@@ -682,6 +682,7 @@ void declare_builtin_functions(void)
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strspn(const char *, const char *);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strcspn(const char *, const char *);\n");
add_pre_buffer("extern char * __builtin_strpbrk(const char *, const char *);\n");
+ add_pre_buffer("extern char* __builtin_stpcpy(const char *, const char*);\n");
add_pre_buffer("extern __SIZE_TYPE__ __builtin_strlen(const char *);\n");
/* And bitwise operations.. */
@@ -714,6 +715,8 @@ void declare_builtin_functions(void)
add_pre_buffer("extern long __builtin_alpha_cmpbge(long, long);\n");
add_pre_buffer("extern long __builtin_labs(long);\n");
add_pre_buffer("extern double __builtin_fabs(double);\n");
+ add_pre_buffer("extern void __sync_synchronize();\n");
+ add_pre_buffer("extern int __sync_bool_compare_and_swap(void *, ...);\n");
/* Add Blackfin-specific stuff */
add_pre_buffer(
--
1.7.7
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions
2012-03-23 10:22 ` Frederic Crozat
@ 2012-03-23 17:48 ` Christopher Li
0 siblings, 0 replies; 6+ messages in thread
From: Christopher Li @ 2012-03-23 17:48 UTC (permalink / raw)
To: Frederic Crozat; +Cc: linux-sparse
On Fri, Mar 23, 2012 at 3:22 AM, Frederic Crozat <fcrozat@suse.com> wrote:
> Better version attached, previous one was causing a warning.
Applied and pushed.
Chris
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-03-23 17:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 14:15 Patch: add __builtin_stpcpy and __sync_synchronize to builtin functions Frederic Crozat
2012-03-15 20:02 ` Christopher Li
2012-03-23 8:26 ` Christopher Li
2012-03-23 9:32 ` Frederic Crozat
2012-03-23 10:22 ` Frederic Crozat
2012-03-23 17:48 ` Christopher Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).