From 29d0edebd429185b88ff9c476eb4fba4396b5f63 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 22 May 2009 14:57:33 -0700 Subject: Use embedded-C for empty functions The functions asmlinkage() and fastcall() are used to help access syscall parameters on i686. All other archs don't need this, but they still define empty functions to shield the callers from arch details. However, stap issues warnings for empty script-level functions. This patch changes them to "%{ /* pure */ %}" so there's no complaint, and they will still get optimized away. --- tapset/ppc64/registers.stp | 6 ++---- tapset/s390x/registers.stp | 6 ++---- tapset/x86_64/registers.stp | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) (limited to 'tapset') diff --git a/tapset/ppc64/registers.stp b/tapset/ppc64/registers.stp index e5decd81..c8713e5a 100644 --- a/tapset/ppc64/registers.stp +++ b/tapset/ppc64/registers.stp @@ -210,11 +210,9 @@ function u64_arg:long (argnum:long) { return ulonglong_arg(argnum) } -function asmlinkage() { -} +function asmlinkage() %{ /* pure */ %} -function fastcall() { -} +function fastcall() %{ /* pure */ %} function regparm() %{ snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), diff --git a/tapset/s390x/registers.stp b/tapset/s390x/registers.stp index 37218d14..79482b73 100644 --- a/tapset/s390x/registers.stp +++ b/tapset/s390x/registers.stp @@ -210,11 +210,9 @@ function u64_arg:long (argnum:long) { return ulonglong_arg(argnum) } -function asmlinkage() { -} +function asmlinkage() %{ /* pure */ %} -function fastcall() { -} +function fastcall() %{ /* pure */ %} function regparm() %{ snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer), diff --git a/tapset/x86_64/registers.stp b/tapset/x86_64/registers.stp index 2e21f3eb..48ba3119 100644 --- a/tapset/x86_64/registers.stp +++ b/tapset/x86_64/registers.stp @@ -235,11 +235,9 @@ function u64_arg:long (argnum:long) { return ulonglong_arg(argnum) } -function asmlinkage() { -} +function asmlinkage() %{ /* pure */ %} -function fastcall() { -} +function fastcall() %{ /* pure */ %} function regparm(n:long) %{ if (_stp_probing_32bit_app(CONTEXT->regs) && -- cgit