[llvm-commits] CVS: llvm/projects/Stacker/lib/runtime/Makefile stacker_rt.c

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 23 11:54:01 PST 2003


Changes in directory llvm/projects/Stacker/lib/runtime:

Makefile added (r1.1)
stacker_rt.c added (r1.1)

---
Log message:

Initial checkin of stacker runtime


---
Diffs of the changes:  (+51 -0)

Index: llvm/projects/Stacker/lib/runtime/Makefile
diff -c /dev/null llvm/projects/Stacker/lib/runtime/Makefile:1.1
*** /dev/null	Sun Nov 23 11:53:56 2003
--- llvm/projects/Stacker/lib/runtime/Makefile	Sun Nov 23 11:53:46 2003
***************
*** 0 ****
--- 1,17 ----
+ ##===- projects/sample/lib/sample/Makefile -----------------*- Makefile -*-===##
+ 
+ #
+ # Indicate where we are relative to the top of the source tree.
+ #
+ LEVEL=../../../..
+ 
+ #
+ # Give the name of a library.  This will build a dynamic version.
+ #
+ SHARED_LIBRARY=1
+ LIBRARYNAME=stkr_runtime
+ 
+ #
+ # Include Makefile.common so we know what to do.
+ #
+ include $(LEVEL)/Makefile.common


Index: llvm/projects/Stacker/lib/runtime/stacker_rt.c
diff -c /dev/null llvm/projects/Stacker/lib/runtime/stacker_rt.c:1.1
*** /dev/null	Sun Nov 23 11:53:56 2003
--- llvm/projects/Stacker/lib/runtime/stacker_rt.c	Sun Nov 23 11:53:46 2003
***************
*** 0 ****
--- 1,34 ----
+ //===-- stacker_rt.c - Runtime Suppor For Stacker Compiler ------*- C++ -*-===//
+ // 
+ //                     The LLVM Compiler Infrastructure
+ //
+ // This file was developed by Reid Spencer and donated to the LLVM research 
+ // group and is distributed under the University of Illinois Open Source 
+ // License. See LICENSE.TXT for details.
+ // 
+ //===----------------------------------------------------------------------===//
+ //
+ //  This file defines a stack dumping function that can be used for debugging.
+ //  It is called whenever the DUMP built-in word is used in the Stacker source.
+ //  It has no effect on the stack (other than to print it).
+ //
+ //  The real reason this is here is to test LLVM's ability to link with
+ //  separately compiled software.
+ //
+ //===----------------------------------------------------------------------===//
+ 
+ #include "stdio.h"
+ 
+ extern long _index_;
+ extern int _stack_[1024];
+ 
+ void
+ _stacker_dump_stack_()
+ {
+     int i;
+     printf("Stack Dump:\n");
+     for (i = _index_; i > 0; i-- )
+     {
+ 	printf("#%03d: %d\n", i, _stack_[i] );
+     }
+ }





More information about the llvm-commits mailing list