summaryrefslogtreecommitdiff
path: root/ghc/rts/Disassembler.c
Commit message (Collapse)AuthorAgeFilesLines
* Reorganisation of the source treeSimon Marlow2006-04-071-281/+0
| | | | | | | | | | | | | | | Most of the other users of the fptools build system have migrated to Cabal, and with the move to darcs we can now flatten the source tree without losing history, so here goes. The main change is that the ghc/ subdir is gone, and most of what it contained is now at the top level. The build system now makes no pretense at being multi-project, it is just the GHC build system. No doubt this will break many things, and there will be a period of instability while we fix the dependencies. A straightforward build should work, but I haven't yet fixed binary/source distributions. Changes to the Building Guide will follow, too.
* [project @ 2004-09-03 15:28:18 by simonmar]simonmar2004-09-031-76/+74
| | | | | | | | | | | | Cleanup: all (well, most) messages from the RTS now go through the functions in RtsUtils: barf(), debugBelch() and errorBelch(). The latter two were previously called belch() and prog_belch() respectively. See the comments for the right usage of these message functions. One reason for doing this is so that we can avoid spurious uses of stdout/stderr by Haskell apps on platforms where we shouldn't be using them (eg. non-console apps on Windows).
* [project @ 2004-08-13 13:04:50 by simonmar]simonmar2004-08-131-5/+2
| | | | Merge backend-hacking-branch onto HEAD. Yay!
* [project @ 2003-03-25 17:04:09 by sof]sof2003-03-251-4/+4
| | | | BCO_INSTRS() is no more
* [project @ 2002-12-11 15:36:20 by simonmar]simonmar2002-12-111-47/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge the eval-apply-branch on to the HEAD ------------------------------------------ This is a change to GHC's evaluation model in order to ultimately make GHC more portable and to reduce complexity in some areas. At some point we'll update the commentary to describe the new state of the RTS. Pending that, the highlights of this change are: - No more Su. The Su register is gone, update frames are one word smaller. - Slow-entry points and arg checks are gone. Unknown function calls are handled by automatically-generated RTS entry points (AutoApply.hc, generated by the program in utils/genapply). - The stack layout is stricter: there are no "pending arguments" on the stack any more, the stack is always strictly a sequence of stack frames. This means that there's no need for LOOKS_LIKE_GHC_INFO() or LOOKS_LIKE_STATIC_CLOSURE() any more, and GHC doesn't need to know how to find the boundary between the text and data segments (BIG WIN!). - A couple of nasty hacks in the mangler caused by the neet to identify closure ptrs vs. info tables have gone away. - Info tables are a bit more complicated. See InfoTables.h for the details. - As a side effect, GHCi can now deal with polymorphic seq. Some bugs in GHCi which affected primitives and unboxed tuples are now fixed. - Binary sizes are reduced by about 7% on x86. Performance is roughly similar, some programs get faster while some get slower. I've seen GHCi perform worse on some examples, but haven't investigated further yet (GHCi performance *should* be about the same or better in theory). - Internally the code generator is rather better organised. I've moved info-table generation from the NCG into the main codeGen where it is shared with the C back-end; info tables are now emitted as arrays of words in both back-ends. The NCG is one step closer to being able to support profiling. This has all been fairly thoroughly tested, but no doubt I've messed up the commit in some way.
* [project @ 2002-07-17 09:21:48 by simonmar]simonmar2002-07-171-2/+4
| | | | | | | | | | | | | | | Remove most #includes of system headers from Stg.h, and instead #include any required headers directly in each RTS source file. The idea is to (a) reduce namespace pollution from system headers that we don't need, (c) be clearer about dependencies on system things in the RTS, and (c) improve via-C compilation times (maybe). In practice though, HsBase.h #includes everything anyway, so the difference from the point of view of .hc source is minimal. However, this makes it easier to move to zero-includes if we wanted to (see discussion on the FFI list; I'm still not sure that's possible but at least this is a step in the right direction).
* [project @ 2001-08-14 13:40:07 by sewardj]sewardj2001-08-141-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the story about POSIX headers in C compilation. Until now, all C code in the RTS and library cbits has by default been compiled with settings for POSIXness enabled, that is: #define _POSIX_SOURCE 1 #define _POSIX_C_SOURCE 199309L #define _ISOC9X_SOURCE If you wanted to negate this, you'd have to define NON_POSIX_SOURCE before including headers. This scheme has some bad effects: * It means that ccall-unfoldings exported via interfaces from a module compiled with -DNON_POSIX_SOURCE may not compile when imported into a module which does not -DNON_POSIX_SOURCE. * It overlaps with the feature tests we do with autoconf. * It seems to have caused borkage in the Solaris builds for some considerable period of time. The New Way is: * The default changes to not-being-in-Posix mode. * If you want to force a C file into Posix mode, #include as the **first** include the new file ghc/includes/PosixSource.h. Most of the RTS C sources have this include now. * NON_POSIX_SOURCE is almost totally expunged. Unfortunately we have to retain some vestiges of it in ghc/compiler so that modules compiled via C on Solaris using older compilers don't break.
* [project @ 2001-08-09 11:19:16 by sewardj]sewardj2001-08-091-3/+7
| | | | C-side FFI support for Byte/Ptr arrays.
* [project @ 2001-08-02 17:01:33 by sewardj]sewardj2001-08-021-2/+6
| | | | C-side support for FFI in GHCi (foreign import only).
* [project @ 2001-05-01 13:11:16 by sewardj]sewardj2001-05-011-2/+5
| | | | Implement bci_STKCHECK.
* [project @ 2001-03-21 10:56:04 by sewardj]sewardj2001-03-211-2/+9
| | | | | | RTS support for the ugly tagToEnum# hack. Actually a very general thing -- just a bytecode unconditional jump, so we can do more general control-flow in BCOs.
* [project @ 2001-02-11 17:51:07 by simonmar]simonmar2001-02-111-4/+4
| | | | | | | | | | | Bite the bullet and make GHCi support non-optional in the RTS. GHC 4.11 should be able to build GHCi without any additional tweaks now. - the Linker is split into two parts: LinkerBasic.c, containing the routines required by the rest of the RTS, and Linker.c, containing the linker proper, which is not referred to from the rest of the RTS. Only Linker.c requires -ldl, so programs which don't make use of the linker (everything except GHC, in other words) won't need -ldl.
* [project @ 2001-01-05 15:24:28 by sewardj]sewardj2001-01-051-2/+4
| | | | Various bug fixes.
* [project @ 2001-01-03 16:44:29 by sewardj]sewardj2001-01-031-6/+29
| | | | | Start getting the bytecode interpreter to work. A matching commit to compiler/ghci/ByteCodeGen.lhs follows ...
* [project @ 2000-12-20 14:47:22 by sewardj]sewardj2000-12-201-520/+98
| | | | First shot at the new interpreter and disassembler.
* [project @ 2000-12-19 16:48:35 by sewardj]sewardj2000-12-191-2/+71
| | | | Try to get the repo rts into a buildable state.
* [project @ 2000-10-09 11:18:46 by daan]daan2000-10-091-15/+62
| | | | | | | | | | Lots of changes for Xmlambda. all changes are between #ifdef XMLAMBDA blocks. - new bytecodes for Inj constructors and witnesses - new primops for rows - code for calling foreign functions. This only works with 'dynamic.c' but that is not checked in yet.
* [project @ 2000-06-15 13:23:51 by daan]daan2000-06-151-2/+44
| | | | | | | | | | | | Added new primitives and bytecodes that support code generation for XMLambda. All additions are surrounded by #ifdef XMLAMBDA. Most important additions: - Rows (n-tuples) which are implemented on top of Frozen Mutarrays - Inj (variant sums), which is implemented using a new constructor called Inj which contains both the value and an unboxed int which represents the index.
* [project @ 1999-12-07 11:49:09 by sewardj]sewardj1999-12-071-2/+15
| | | | | | Add i_ALLOC_CONSTR_big (== i_ALLOC_CONSTR with a 16-bit field denoting offset of into table). The large constant tables in nofib/spectral/hartel/nucleic2 need this.
* [project @ 1999-11-16 17:38:54 by sewardj]sewardj1999-11-161-2/+4
| | | | | Added basic support for MVars: data MVar, and newMVar, putMVar and getMVar.
* [project @ 1999-11-01 18:19:39 by sewardj]sewardj1999-11-011-2/+4
| | | | | Computation of max-stack-use during BCO generation was completely bogus. Fix it. Also, add a i_STK_CHECK_big insn with 16-bit opcode.
* [project @ 1999-10-26 17:27:25 by sewardj]sewardj1999-10-261-6/+10
| | | | | | | | | | | | Add foreign import/export implementations for x86 stdcall convention. Make parser notice calling conventions on f-i and f-x declarations, check they are supported on the platform Hugs is compiled on. Pass them all the way through the code generator to the interpreter. Allow f-i/f-x decls to omit the calling convention, in which case ccall is used. Remove calling convention from all such decls in the Prelude so it will work on any platform.
* [project @ 1999-10-15 11:02:06 by sewardj]sewardj1999-10-151-4/+2
| | | | | | | | | | | | | | | | | | | | | Added basic support for foreign export dynamic. Many aspects of it are still broken: * Only supports x86-linux. * The range of allowable types is small: Char Int Float Double Addr and Word. * Adjustor thunks are never freed. * Returning Doubles or Floats doesn't work at all. I expect to fix some of these shortly. foreign import also needs redoing, so it can accept any number of arguments of any type. Also: * Fixed setRtsFlags in Evaluator.c to make it endian-independent. * Fixed raisePrim in Evaluator.c so things like division by zero, array index errors, etc, throw an exception instead of terminating StgHugs. raisePrim is renamed makeErrorCall.
* [project @ 1999-07-06 16:40:22 by sewardj]sewardj1999-07-061-4/+4
| | | | | | | Assembler/Disassembler: handle and print calls to compiled code Evaluator: return to scheduler when entering unknown closure StgCRun: debugging trace in miniinterpreter (temporary) Updates: fix normal and vectored returns to Hugs
* [project @ 1999-04-27 10:06:47 by sewardj]sewardj1999-04-271-38/+15
| | | | | | | | | Changes to improve runtime performance of STG Hugs. -- Reorganisation of the evaluator (Evaluator.c). -- Changes to code emission (Assembler.c) to support peephole opts -- An experimental simplifier (optimise.c). -- Many supporting bug fixes and minor changes. -- Experimental implementation of integer for standalone hugs (sainteger.c).
* [project @ 1999-03-09 14:51:03 by sewardj]sewardj1999-03-091-15/+100
| | | | | | | | | | Many improvements resulting from first attempt to run nofib suite: -- More libraries (lib/*.hs) brought into operation -- Prelude error handling and basic I/O improved -- Changed bytecode immediate value fields so large constant -- tables can be compiled -- Fixed bugs: translation of FATBAR, negative floating point -- literals, strict constructors, handling of CAFs
* [project @ 1999-03-01 14:46:42 by sewardj]sewardj1999-03-011-7/+21
| | | | | Mods to make STG-hugs able to compile and run small examples. This commit also includes proper implementations of seq, raise and catch.
* [project @ 1999-02-05 16:02:18 by simonm]simonm1999-02-051-5/+4
| | | | Copyright police.
* [project @ 1998-12-02 13:17:09 by simonm]simonm1998-12-021-0/+338
Move 4.01 onto the main trunk.