| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
It is only generated when mode is Gen_Header; i.e. it's not used
in the compiler, only the RTS.
|
|
|
|
| |
We now generate a platformConstants file that we can read at runtime.
|
|
|
|
|
| |
This means we only need to build one copy of the program, which
will make life simpler as I plan to add more variants.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Return type was correct when TABLES_NEXT_TO_CODE was defined.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
No functional differences yet
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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).
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
It turns out that we can use %zu and %llu on Win32, provided we
include PosixSource everywhere we want to use them.
|
| |
| |
| |
| |
| | |
OS X doesn't understand 'gnu_printf', so we need to onyl use it
conditionally.
|
| |
| |
| |
| |
| | |
On Win32 it's not recognised, so we unfortunately can't use it
unconditionally.
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|