LLVM backend for 6502
Go to file
Andrew Lenharth aeef8fc5c6 Add support for a cycle counter intrinsic. As basically all processors have
this and have it in about the same form, I think this makes sense.
on X86, you do a RDTSC (64bit result, from any ring since the P5MMX)
on Alpha, you do a RDCC
on PPC, there is a sequence which may or may not work depending on how things
are setup by the OS.  Or something like that.  Maybe someone who knows PPC
can add support.  Something about the time base register.
on Sparc, you read %tick, which in some solaris versions (>=8) is readable by
userspace
on IA64 read ar.itc

So I think the ulong is justified since all of those are 64bit.
Support is slighly flaky on old chips (P5 and lower) and sometimes
depends on OS (PPC, Sparc).  But for modern OS/Hardware (aka this decade),
we should be ok.

I am still not sure what to do about lowering.  I can either see a lower to 0, to
gettimeofday (or the target os equivalent), or loudly complaining and refusing to
continue.

I am commiting an Alpha implementation.  I will add the X86 implementation if I
have to (I have use of it in the near future), but if someone who knows that
backend (and the funky multi-register results) better wants to add it, it would
take them a lot less time ;)

TODO: better lowering and legalizing, and support more platforms


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24299 91177308-0d34-0410-b5e6-96231b3b80d8
2005-11-11 16:45:18 +00:00
autoconf Updated version to 1.7cvs. 2005-11-08 21:13:01 +00:00
docs Fix some typos. 2005-11-11 02:15:27 +00:00
examples When a function takes a variable number of pointer arguments, with a zero 2005-10-23 04:37:20 +00:00
include/llvm Add support for a cycle counter intrinsic. As basically all processors have 2005-11-11 16:45:18 +00:00
lib Fix the optimized code handling of user asm strings 2005-11-10 23:24:26 +00:00
projects unbreak the build again 2005-10-27 16:30:44 +00:00
runtime This was never updated for the project makefile changes 2005-10-18 18:50:26 +00:00
test Check that this compiles to a label with a space in it. 2005-11-10 19:33:04 +00:00
tools Add a new -fast option, which generates code quickly. 2005-11-08 02:12:17 +00:00
utils 1. Remove ranges from itinerary data. 2005-11-03 22:47:41 +00:00
win32 Add new file to Visual Studio. 2005-11-11 01:34:02 +00:00
Xcode Remove the lowerconstantexprs pass 2005-10-29 05:34:40 +00:00
.cvsignore Ignore the configure.out file generated by "make reconfigure" 2005-06-18 23:01:25 +00:00
configure Updated version to 1.7cvs. 2005-11-08 21:13:01 +00:00
CREDITS.TXT Add a note, people are responsible for requesting that they be added to the 2005-08-02 22:10:21 +00:00
LICENSE.TXT Remove extraneous colons after program names for consistency 2005-05-12 21:39:01 +00:00
llvm.spec Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
llvm.spec.in Onward to LLVM-1.6 and beyond! 2005-05-18 20:23:20 +00:00
Makefile For PR614: 2005-08-25 04:59:49 +00:00
Makefile.common Update comments to reflect new variable names. Patch contributed by 2005-02-14 16:02:19 +00:00
Makefile.config.in Two changes: 2005-04-22 17:14:14 +00:00
Makefile.rules Move some constant folding code shared by Analysis and Transform passes 2005-10-27 15:54:34 +00:00
README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level 
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments. 

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.