From 3a20432bc0a0aa6d8651561d508cc730e6dabc97 Mon Sep 17 00:00:00 2001 From: fche Date: Fri, 12 Aug 2005 19:43:55 +0000 Subject: 2005-08-12 Frank Ch. Eigler PR systemtap/1122 et alii * parse.cxx (parse_literal): Parse and range-limit 64-bit numbers. (parse_unary): Correct precedence glitch. * staptree.h (literal_number): Store an int64_t. * staptree.cxx: Corresponding changes. * translate.cxx (check_dbz): Remove - insufficient. (emit_function): Define CONTEXT macro sibling for THIS. (c_typename): pe_long -> int64_t. (visit_literal_number): Format literal rigorously and uglily. (c_assignop, visit_binary_expression): Handle div/mod via new helper functions in runtime. * tapset/builtin_logging.stp: Add error, exit builtins. * testsuite/buildok/ten,eleven.stp: New tests. * testsuite/parse{ko,ok}/six.stp: Modify for larger numbers. * testsuite/transok/one.stp: Add more ";"s, maybe unnecessarily. 2005-08-12 Frank Ch. Eigler * arith.c: New file to contain arithmetic helper functions. * builtin_functions.h: Remove, unused. * runtime.h: Include it. --- runtime/builtin_functions.h | 60 --------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 runtime/builtin_functions.h (limited to 'runtime/builtin_functions.h') diff --git a/runtime/builtin_functions.h b/runtime/builtin_functions.h deleted file mode 100644 index 505d073b..00000000 --- a/runtime/builtin_functions.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef _BUILTIN_FUNCTIONS_ -#define _BUILTIN_FUNCTIONS_ - -/* Builtin function definitions. - * Copyright (C) 2005 Red Hat Inc. - * - * This file is part of systemtap, and is free software. You can - * redistribute it and/or modify it under the terms of the GNU General - * Public License (GPL); either version 2, or (at your option) any - * later version. - */ - -/* - * This file contains definitions for "builtin functions" which are - * registered in the systemtap translator, but given no definition. - * The translator emits calls to builtins exactly the same way it - * emits calls to functions written in the systemtap language; the - * only difference is that this file (or a C tapset) must supply the - * definition. - * - * Every builtin function "foo" called by a systemtap script is - * translated to a C call to a C function named "function_foo". This - * is the function you must provide in this file. In addition, the - * translator emits a - * - * #define _BUILTIN_FUNCTION_foo_ - * - * symbol for each such function called, which you can use to elide - * function definitions which are not used by a given systemtap - * script. - */ - -#ifdef _BUILTIN_FUNCTION_printk_ -static void -function_printk (struct context *c) -{ - printk (KERN_INFO "%s\n", c->locals[c->nesting].function_printk.message); -} -#endif /* _BUILTIN_FUNCTION_printk_ */ - - -#ifdef _BUILTIN_FUNCTION_log_ -static void -function_log (struct context *c) -{ - _stp_log (c->locals[c->nesting].function_log.message); -} -#endif /* _BUILTIN_FUNCTION_log_ */ - - -#ifdef _BUILTIN_FUNCTION_warn_ -static void -function_warn (struct context *c) -{ - _stp_warn (c->locals[c->nesting].function_warn.message); -} -#endif /* _BUILTIN_FUNCTION_warn_ */ - - -#endif /* _BUILTIN_FUNCTIONS_ */ -- cgit