| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
remove redundant dependency
|
|
|
|
| |
Add SIZEOF_CostCentreStack
|
|
|
|
|
| |
Rearrange the fields of CostCentreStack to leave no (or less) room for
arbitrary padding decisions by C compilers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Retain all CAFs when dynamic Haskell libraries are used from GHCi.
The Linker usually replaces references to newCAF with references to newDynCAF,
but the system dynamic linker won't do that for us.
Also, the situation is slightly different - we never want CAFs from dylibs
to be reverted, because the dylibs might be used both by the interpreted
program and by GHCi itself.
So instead of just caf_list, there's now both caf_list and revertible_caf_list.
newDynCAF adds a CAF to revertible_caf_list, and newCAF either adds the CAF
to caf_list or to the mutable list, depending on whether we are in GHCi.
This hack is only active when Linker.c has loaded libHSbase_dyn.[so|dylib],
but for now, it applies to all CAFs, not just dynamically-linked ones.
If that is worth fixing, we could do that by checking whether the the CAF
closure or it's info pointer is in the main executable's address range.
MERGE TO STABLE
|
|
|
|
| |
Update comment
|
|
|
|
|
| |
x86_64: Add __DISCARD__() function call to the tailcall sequence to
work around bugs in gcc (see comment for details).
|
|
|
|
|
|
| |
include ghcautoconf.h rather than ghcconfig.h, the reason being that
this file is included form the compiler, and we don't want the
platform defines from ghcplatform.h.
|
|
|
|
| |
fix cut-n-pasto in CLEAN_FILES
|
|
|
|
| |
Back out previous change; something broke, I'll look into it later
|
|
|
|
|
|
|
|
|
|
|
| |
Optimisation: the update code only needs to check whether the closure
being updated is a BLACKHOLE_BQ if it has been blackholed; which is
only the case after lazy blackholing has taken place.
So to avoid this unnecessary cost, we have two kinds of update frame:
one which checks for BLACKHOLE_BQ and one that doesn't, and the lazy
blackholing algorithm converts the latter kind into the former as it
replaces thunks with blackholes.
|
|
|
|
|
| |
more include of <stdio.h> later: ghcautoconf.h must come before any
system includes, because it might define _FILE_OFFSET_BITS.
|
|
|
|
| |
Clean and install ghcplatform.h
|
|
|
|
|
| |
assertion failures should go through the RtsMessages layer, so they
get a pop-up box in a Windows app.
|
|
|
|
|
| |
Add a missing delcaration for stg_MUT_ARR_PTRS_FROZEN0_entry (unbreak
the unregisterised build).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GC changes: instead of threading old-generation mutable lists
through objects in the heap, keep it in a separate flat array.
This has some advantages:
- the IND_OLDGEN object is now only 2 words, so the minimum
size of a THUNK is now 2 words instead of 3. This saves
some amount of allocation (about 2% on average according to
my measurements), and is more friendly to the cache by
squashing objects together more.
- keeping the mutable list separate from the IND object
will be necessary for our multiprocessor implementation.
- removing the mut_link field makes the layout of some objects
more uniform, leading to less complexity and special cases.
- I also unified the two mutable lists (mut_once_list and mut_list)
into a single mutable list, which lead to more simplifications
in the GC.
|
|
|
|
| |
PowerPC: #ifdef darwin_REGS -> #if darwin_REGS
|
|
|
|
| |
add a prototype
|
|
|
|
|
| |
Add __attribute__((used)) to static functions, as gcc 3.4 -O2 is in the
habit of throwing them away.
|
|
|
|
| |
Move signal prototypes into RtsExternal.h
|
|
|
|
|
|
|
|
| |
- The output from uncaught exceptions handler is redirected to RTS's errorBelch.
- The output from Debug.Trace is redirected to RTS's debugBelch
- Usually errorBelch and debugBelch messages go to stderr except for
Windows GUI applications. For GUI applications the Debug.Trace output is
redirected to debug console and the exceptions message is displayed in message box.
|
|
|
|
|
|
|
|
| |
Here's a file I forgot to add.
NB. ghcconfig.h is now a *source file*. If you're using a linked
build tree, please remove it from ghc/includes and re-link (in fact,
you probabaly need a make clean in ghc/includes at least).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rationalise the BUILD,HOST,TARGET defines.
Recall that:
- build is the platform we're building on
- host is the platform we're running on
- target is the platform we're generating code for
The change is that now we take these definitions as applying from the
point of view of the particular source code being built, rather than
the point of view of the whole build tree.
For example, in RTS and library code, we were previously testing the
TARGET platform. But under the new rule, the platform on which this
code is going to run is the HOST platform. TARGET only makes sense in
the compiler sources.
In practical terms, this means that the values of BUILD, HOST & TARGET
may vary depending on which part of the build tree we are in.
Actual changes:
- new file: includes/ghcplatform.h contains platform defines for
the RTS and library code.
- new file: includes/ghcautoconf.h contains the autoconf settings
only (HAVE_BLAH). This is so that we can get hold of these
settings independently of the platform defines when necessary
(eg. in GHC).
- ghcconfig.h now #includes both ghcplatform.h and ghcautoconf.h.
- MachRegs.h, which is included into both the compiler and the RTS,
now has to cope with the fact that it might need to test either
_TARGET_ or _HOST_ depending on the context.
- the compiler's Makefile now generates
stage{1,2,3}/ghc_boot_platform.h
which contains platform defines for the compiler. These differ
depending on the stage, of course: in stage2, the HOST is the
TARGET of stage1. This was wrong before.
- The compiler doesn't get platform info from Config.hs any more.
Previously it did (sometimes), but unless we want to generate
a new Config.hs for each stage we can't do this.
- GHC now helpfully defines *_{BUILD,HOST}_{OS,ARCH} automatically
in CPP'd Haskell source.
- ghcplatform.h defines *_TARGET_* for backwards compatibility
(ghcplatform.h is included by ghcconfig.h, which is included by
config.h, so code which still #includes config.h will get the TARGET
settings as before).
- The Users's Guide is updated to mention *_HOST_* rather than
*_TARGET_*.
- coding-style.html in the commentary now contains a section on
platform defines. There are further doc updates to come.
Thanks to Wolfgang Thaller for pointing me in the right direction.
|
|
|
|
| |
Update comments for PowerPC register mapping.
|
|
|
|
|
| |
default STOLEN_X86_REGS to 4 (workaround because GHC doesn't normally
define STOLEN_X86_REGS when compiling plan .c source)
|
|
|
|
|
|
|
|
|
|
| |
Instead of defining NO_REGS when IN_STG_CODE==0, define
NO_GLOBAL_REG_DECLS instead.
This means that in non-STG code we can still get at the values of
REG_R1 & co., even though the global register decls are turned off.
This is necessary because we sometimes need to set up different stack
layouts depending on REG_R1.
|
|
|
|
|
| |
Make it so that global register declarations are turned off if
NO_GLOBAL_REG_DECLS is defined.
|
|
|
|
| |
Improve a comment
|
|
|
|
|
|
| |
Numerous bug fixes to the STM code, mostly from a debugging session
with Tim Harris. The test that flushed out all the bugs will shortly
be added to the test suite.
|
|
|
|
|
|
|
|
| |
Handle foreign import wrapper properly for MacOS X, powerpc64-linux and AIX.
Only Mac OS X tested so far.
Pass information about argument types from DsForeign to createAdjustor encoded
as a string ('i' for integers, 'f' for floats, 'd' for doubles and 'l' for
long [64bit] integers).
|
|
|
|
|
|
|
| |
rtsconfig, smrep: fixes to not put info next to code (like ia64)
machregs: define registers for powerpc64 - same as ppc32
tailcalls: for now do tailcalls as normal calls. (ok on powerpc since
calls don't grow the stack and we don't care about LR anyway)
|
|
|
|
| |
Fix build error during unregistered builds, remove warning building GCCompact
|
|
|
|
| |
Support for atomic memory transactions and associated regression tests conc041-048
|
|
|
|
| |
drop win32 protos, current windows.h's now provide 'em.
|
|
|
|
|
|
|
| |
64-bit fix:
Change the type of context_switch from 'nat' to 'int'.
It's accessed as CInt from cmm code, and sizeof(nat) > sizeof(int)
on many 64-bit platforms.
|
|
|
|
|
|
|
| |
64-bit fixes.
Don't assume that sizeof(int) == sizeof(StgInt).
This assumption creeped in in many places since 6.2.
|
|
|
|
|
|
|
| |
threadDelay(mingw32): introduce and use the return continuation
stg_block_async_void; fixes mem leak, cf.
http://haskell.org/pipermail/cvs-ghc/2004-November/022325.html
|
|
|
|
|
| |
Get rid of SUPPORTS_EMPTY_STRUCTS, and just avoid using empty struct
definitions.
|
|
|
|
|
|
|
| |
Declare rtsSupportsBoundThreads() here.
This change should have gone through with the threaded RTS I/O changes
yesterday.
|
|
|
|
|
|
|
| |
Make the sed command turning '#define PACKAGE_FOO "blah"' into
'/* #undef PACKAGE_FOO */' more portable, though a tad less precise.
The use of \| deep inside the pattern is a GNU extension (from sed 2.05).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Position Independent Code and Dynamic Linking Support, Part 1
This commit allows generation of position independent code (PIC) that fully supports dynamic linking on Mac OS X and PowerPC Linux.
Other platforms are not yet supported, and there is no support for actually linking or using dynamic libraries - so if you use the -fPIC or -dynamic code generation flags, you have to type your (platform-specific) linker command lines yourself.
nativeGen/PositionIndependentCode.hs:
New file. Look here for some more comments on how this works.
cmm/CLabel.hs:
Add support for DynamicLinkerLabels and PIC base labels - for use inside the NCG.
needsCDecl: Case alternative labels now need C decls, see the codeGen/CgInfoTbls.hs below for details
cmm/Cmm.hs:
Add CmmPicBaseReg (used in NCG),
and CmmLabelDiffOff (used in NCG and for offsets in info tables)
cmm/CmmParse.y:
support offsets in info tables
cmm/PprC.hs:
support CmmLabelDiffOff
Case alternative labels now need C decls (see the codeGen/CgInfoTbls.hs for details), so we need to pprDataExterns for info tables.
cmm/PprCmm.hs:
support CmmLabelDiffOff
codeGen/CgInfoTbls.hs:
no longer store absolute addresses in info tables, instead, we store offsets.
Also, for vectored return points, emit the alternatives _after_ the vector table. This is to work around a limitation in Apple's as, which refuses to handle label differences where one label is at the end of a section. Emitting alternatives after vector info tables makes sure this never happens in GHC generated code. Case alternatives now require prototypes in hc code, though (see changes in PprC.hs, CLabel.hs).
main/CmdLineOpts.lhs:
Add a new option, -fPIC.
main/DriverFlags.hs:
Pass the correct options for PIC to gcc, depending on the platform. Only for powerpc for now.
nativeGen/AsmCodeGen.hs:
Many changes...
Mac OS X-specific management of import stubs is no longer, it's now part of a general mechanism to handle such things for all platforms that need it (Darwin [both ppc and x86], Linux on ppc, and some platforms we don't support).
Move cmmToCmm into its own monad which can accumulate a list of imported symbols. Make it call cmmMakeDynamicReference at the right places.
nativeGen/MachCodeGen.hs:
nativeGen/MachInstrs.hs:
nativeGen/MachRegs.lhs:
nativeGen/PprMach.hs:
nativeGen/RegAllocInfo.hs:
Too many changes to enumerate here, PowerPC specific.
nativeGen/NCGMonad.hs:
NatM still tracks imported symbols, as more labels can be created during code generation (float literals, jump tables; on some platforms all data access has to go through the dynamic linking mechanism).
driver/mangler/ghc-asm.lprl:
Mangle absolute addresses in info tables to offsets.
Correctly pass through GCC-generated PIC for Mac OS X and powerpc linux.
includes/Cmm.h:
includes/InfoTables.h:
includes/Storage.h:
includes/mkDerivedConstants.c:
rts/GC.c:
rts/GCCompact.c:
rts/HeapStackCheck.cmm:
rts/Printer.c:
rts/RetainerProfile.c:
rts/Sanity.c:
Adapt to the fact that info tables now contain offsets.
rts/Linker.c:
Mac-specific: change machoInitSymbolsWithoutUnderscore to support PIC.
|
|
|
|
|
| |
Warning police. Move prototype of genericRaise into RtsExternal.h, so
the libraries can see it.
|
|
|
|
|
|
|
|
| |
Use some sed magic to avoid PACKAGE_FOO clashes introduced by the autoconf
cleanup yesterday. Another option would have been using a plain "AC_INIT" in
fptools/configure.ac (and probably the same for fptools/libraries/configure.ac),
so only "leaf configure.ac"s have package info. Not quite sure what would be the
nicest way to handle this yet...
|
|
|
|
|
| |
Move forkProcess()-prototype to RtsExternal.h where package unix can see it
(avoids an 'implicit declaration' warning there)
|
|
|
|
|
|
| |
The 7-ptr-arg version of generic apply has gone away, but parts of the
byte code generator hadn't been updated. This fixes the ffi009(ghci)
test.
|
|
|
|
|
| |
Fix bug in finalizeWeak# (should fix memo002 and maybe one or two
other tests).
|
|
|
|
| |
some cleanups
|
|
|
|
|
|
| |
Further to the RTS messaging tidyup: export the new message API and
hooks via RtsMessages.h, so that a client program can easily redirect
messages.
|
|
|
|
|
|
| |
Rearrange so that Regs.h include comes before inline function
definitions. I'm guessing that newer versions of gcc are less picky
about this, which is why we hadn't noticed it.
|
|
|
|
|
| |
Make the UPD_IND macros compatible with older gccs that don't accept
declarations in the middle of a block.
|
|
|
|
|
| |
Terminate program if execPage fails, this is more honest and
simplifies things a bit.
|