summaryrefslogtreecommitdiff
path: root/includes
Commit message (Collapse)AuthorAgeFilesLines
* Use sIZEOF_* from platformConstants rather than ConstantsIan Lynagh2012-09-131-5/+3
|
* Add a couple more mkDerivedConstants modesIan Lynagh2012-09-132-1/+62
| | | | | | We now also generate nice wrappers for the platformConstants methods. For now it's all commented out as the definitions conflict with those in Constants.
* We need to install the platformConstants fileIan Lynagh2012-09-131-0/+2
|
* Make the Windows-specific part of mkDerivedConstants.c conditionalIan Lynagh2012-09-131-4/+9
| | | | | It is only generated when mode is Gen_Header; i.e. it's not used in the compiler, only the RTS.
* Add more modes to mkDerivedConstantsIan Lynagh2012-09-132-4/+81
| | | | We now generate a platformConstants file that we can read at runtime.
* Use conditionals rather than CPP in mkDerivedConstantsIan Lynagh2012-09-133-129/+155
| | | | | This means we only need to build one copy of the program, which will make life simpler as I plan to add more variants.
* Lots of nat -> StgWord changesSimon Marlow2012-09-073-10/+10
|
* comment updatesSimon Marlow2012-09-071-13/+5
|
* Deprecate lnat, and use StgWord insteadSimon Marlow2012-09-077-16/+18
| | | | | | | | | | | | lnat was originally "long unsigned int" but we were using it when we wanted a 64-bit type on a 64-bit machine. This broke on Windows x64, where long == int == 32 bits. Using types of unspecified size is bad, but what we really wanted was a type with N bits on an N-bit machine. StgWord is exactly that. lnat was mentioned in some APIs that clients might be using (e.g. StackOverflowHook()), so we leave it defined but with a comment to say that it's deprecated.
* Move more code into codeGen/CodeGen/Platform.hsIan Lynagh2012-08-281-1/+584
| | | | | | | | HaskellMachRegs.h is no longer included in anything under compiler/ Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h" rather than <stg/MachRegs.h> which means that we always get the file from the tree, rather than from the bootstrapping compiler.
* Fix return type of FUN_INFO_PTR_TO_STRUCT.Erik de Castro Lopo2012-08-281-1/+1
| | | | Return type was correct when TABLES_NEXT_TO_CODE was defined.
* More CPP macros -> inline functionsIan Lynagh2012-08-251-11/+15
| | | | | | | | All the wibble seem to have cancelled out, and (non-debug) object sizes are back to where they started. I'm not 100% sure that the types are optimal, but at least now the functions have types and we can fix them if necessary.
* More CPP macros -> inline functionsIan Lynagh2012-08-251-17/+15
|
* More CPP macro -> inline functionIan Lynagh2012-08-251-2/+4
|
* Convert a couple more macros to inline functionsIan Lynagh2012-08-251-2/+7
| | | | | | | | | | This caused a couple of .o files to change size. I had a look at one, and it seems to be caused by the difference in size of these two instructions: 49 8b 5d 08 mov 0x8(%r13),%rbx 49 8b 5c 24 08 mov 0x8(%r12),%rbx (with a few nops being added or removed later in the file, presumably for alignment reasons).
* Make a function for get_itbl, rather than using a CPP macroIan Lynagh2012-08-251-6/+7
| | | | | | | | | | | | This has several advantages: * It can be called from gdb * There is more type information for the user, and type checking for the compiler * Less opportunity for things to go wrong, e.g. due to missing parentheses or repeated execution The sizes of the non-debug .o files hasn't changed (other than Inlines.o), so I'm pretty sure the compiled code is identical.
* Add haveRegBase to CodeGen.PlatformIan Lynagh2012-08-211-0/+7
|
* Move activeStgRegs into CodeGen.PlatformIan Lynagh2012-08-211-0/+64
|
* Fix the generation of CallerSaves; fixes #7163Ian Lynagh2012-08-211-27/+27
| | | | | | | | | Simon Marlow spotted that we were #include'ing MachRegs.h several times, but that doesn't work as (a) it uses ifdeffery to avoid being included multiple times, and (b) even if we work around that, then the #define's from previous inclusions are still defined when we #include it again. So we now put the platform code for each platform in a separate .hs file.
* move startProfTimer() and stopProfTimer() to the public headersSimon Marlow2012-08-211-0/+9
|
* Define callerSaves for all platformsIan Lynagh2012-08-071-0/+81
| | | | | | | | This means that we now generate the same code whatever platform we are on, which should help avoid changes on one platform breaking the build on another. It's also another step towards full cross-compilation.
* Start separating out the RTS and Haskell imports of MachRegs.hIan Lynagh2012-08-066-44/+121
| | | | No functional differences yet
* Don't define STOLEN_X86_REGS in Cmm.hIan Lynagh2012-08-061-1/+0
| | | | | | We weren't defining it in the other places that MachRegs.h gets imported, which seems a little suspicious. And if it's not defined then it defaults to 4 anyway, so this define doesn't seem necessary.
* Fix #7087 (integer overflow in getDelayTarget())Simon Marlow2012-07-311-0/+2
|
* GHCConstants.h should not contain preprocessor definitionsGabor Greif2012-07-291-0/+25
|
* typoGabor Greif2012-07-291-1/+1
|
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-07-195-9/+441
|\
| * First batch of file additions for cross-compiler:Gabor Greif2012-07-182-0/+432
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | new file: ghc/ghc-cross.wrapper new file: includes/mkDerivedConstants.cross.awk new file: includes/mkSizeMacros.cross.awk new file: rules/cross-compiling.mk These are expected to sit quietly in the tree until the rest of the machinery matures on an (upcoming) branch. Reviews will begin to make sense as soon as that has happened. Anyway, comments are welcome. See <http://www.haskell.org/pipermail/cvs-ghc/2012-July/074456.html> for background. Disclaimer: these source files are not (yet) up to the quality standards set by the rest of the tree. Cleanups, move-arounds and rewrites (i.e. .awk -> .hs), as well as additional comments and documentation will happen as soon as the basic functionality of a cross-compiler is working reliably.
| * comment-only typoGabor Greif2012-07-181-2/+2
| |
| * use idiomatic typeGabor Greif2012-07-181-2/+2
| |
| * made comments C-style, so that no gcc-extension is neededGabor Greif2012-07-181-5/+5
| | | | | | | | | | | | | | | | | | | | also removed an unnecessary 'struct' tag (since the struct is not recursive); this is in line with the other struct definitions fixed a typo, updated copyright it remains to remove the tabs and align the structure members accordingly
* | Define the task-tracking eventsDuncan Coutts2012-07-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on initial patches by Mikolaj Konarski <mikolaj@well-typed.com> These new eventlog events are to let profiling tools keep track of all the OS threads that belong to an RTS capability at any moment in time. In the RTS, OS threads correspond to the Task abstraction, so that is what we track. There are events for tasks being created, migrated between capabilities and deleted. In particular the task creation event also records the kernel thread id which lets us match up the OS thread with data collected by others tools (in the initial use case with Linux's perf tool, but in principle also with DTrace).
* | New functions to get kernel thread Id + serialisable task IdDuncan Coutts2012-07-071-2/+25
|/ | | | | | | | | | | | | | | | | | | | On most platforms the userspace thread type (e.g. pthread_t) and kernel thread id are different. Normally we don't care about kernel thread Ids, but some system tools for tracing/profiling etc report kernel ids. For example Solaris and OSX's DTrace and Linux's perf tool report kernel thread ids. To be able to match these up with RTS's OSThread we need a way to get at the kernel thread, so we add a new function for to do just that (the implementation is system-dependent). Additionally, strictly speaking the OSThreadId type, used as task ids, is not a serialisable representation. On unix OSThreadId is a typedef for pthread_t, but pthread_t is not guaranteed to be a numeric type. Indeed on some systems pthread_t is a pointer and in principle it could be a structure type. So we add another new function to get a serialisable representation of an OSThreadId. This is only for use in log files. We use the function to serialise an id of a task, with the extra feature that it works in non-threaded builds by always returning 1.
* Define W_TO_LONG in Cmm.hIan Lynagh2012-06-201-0/+6
|
* Add getGCStatsEnabled function.Paolo Capriotti2012-06-191-0/+1
|
* Fix build on Win64Ian Lynagh2012-05-091-0/+4
|
* Enable FileLock for win32 (#4363)Paolo Capriotti2012-05-081-4/+2
|
* Fix RTS DLL references on Win64Ian Lynagh2012-05-061-4/+17
|
* Working towards fixing DLLs on Win64Ian Lynagh2012-05-062-3/+3
|
* Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghcIan Lynagh2012-04-271-0/+1
|\
| * Add a new primop mkWeakNoFinalizer (#5879)Simon Marlow2012-04-271-0/+1
| |
* | Fix build on OS XIan Lynagh2012-04-271-8/+14
| |
* | Fix build on Win32, and handle the FMT_* #defines in a slightly nicer wayIan Lynagh2012-04-272-20/+16
| |
* | Simplify format specifiersIan Lynagh2012-04-271-27/+4
| | | | | | | | | | It turns out that we can use %zu and %llu on Win32, provided we include PosixSource everywhere we want to use them.
* | OS X build fixesIan Lynagh2012-04-261-3/+12
| | | | | | | | | | OS X doesn't understand 'gnu_printf', so we need to onyl use it conditionally.
* | Fix build on OSX: Use the 'z' format specifier modifier when possibleIan Lynagh2012-04-261-15/+9
| | | | | | | | | | On Win32 it's not recognised, so we unfortunately can't use it unconditionally.
* | Build fixesIan Lynagh2012-04-261-0/+2
| |
* | Fix warnings on Win64Ian Lynagh2012-04-264-9/+18
| | | | | | | | | | | | Mostly this meant getting pointer<->int conversions to use the right sizes. lnat is now size_t, rather than unsigned long, as that seems a better match for how it's used.
* | Win64 warning fixIan Lynagh2012-04-241-0/+1
| |
* | A couple of build fixes for Win64Ian Lynagh2012-04-241-1/+1
| |