- 16 Jan, 2005 1 commit
-
-
wolfgang authored
pprExpr: add cases for CmmPicBaseReg and CmmRegOff so that we can do -fPIC -ddump-opt-cmm
-
- 05 Jan, 2005 1 commit
-
-
wolfgang authored
Don't use PK_Word64 and ASSIGN_Word64 on 64-bit machines; they just make the .hc files harder to read without adding any benefit.
-
- 08 Dec, 2004 2 commits
- 29 Nov, 2004 2 commits
- 26 Nov, 2004 1 commit
-
-
simonmar authored
Further integration with the new package story. GHC now supports pretty much everything in the package proposal. - GHC now works in terms of PackageIds (<pkg>-<version>) rather than just package names. You can still specify package names without versions on the command line, as long as the name is unambiguous. - GHC understands hidden/exposed modules in a package, and will refuse to import a hidden module. Also, the hidden/eposed status of packages is taken into account. - I had to remove the old package syntax from ghc-pkg, backwards compatibility isn't really practical. - All the package.conf.in files have been rewritten in the new syntax, and contain a complete list of modules in the package. I've set all the versions to 1.0 for now - please check your package(s) and fix the version number & other info appropriately. - New options: -hide-package P sets the expose flag on package P to False -ignore-package P unregisters P for this compilation For comparison, -package P sets the expose flag on package P to True, and also causes P to be linked in eagerly. -package-name is no longer officially supported. Unofficially, it's a synonym for -ignore-package, which has more or less the same effect as -package-name used to. Note that a package may be hidden and yet still be linked into the program, by virtue of being a dependency of some other package. To completely remove a package from the compiler's internal database, use -ignore-package. The compiler will complain if any two packages in the transitive closure of exposed packages contain the same module. You *must* use -ignore-package P when compiling modules for package P, if package P (or an older version of P) is already registered. The compiler will helpfully complain if you don't. The fptools build system does this. - Note: the Cabal library won't work yet. It still thinks GHC uses the old package config syntax. Internal changes/cleanups: - The ModuleName type has gone away. Modules are now just (a newtype of) FastStrings, and don't contain any package information. All the package-related knowledge is in DynFlags, which is passed down to where it is needed. - DynFlags manipulation has been cleaned up somewhat: there are no global variables holding DynFlags any more, instead the DynFlags are passed around properly. - There are a few less global variables in GHC. Lots more are scheduled for removal. - -i is now a dynamic flag, as are all the package-related flags (but using them in {-# OPTIONS #-} is Officially Not Recommended). - make -j now appears to work under fptools/libraries/. Probably wouldn't take much to get it working for a whole build.
-
- 10 Nov, 2004 1 commit
-
-
wolfgang authored
Fix pretty-printing of integer constants on 64-bit platforms. If sizeof(int) == 4 on a 64-bit platform, we have to add an 'L' suffix to integer constants.
-
- 26 Oct, 2004 1 commit
-
-
ross authored
bind acosDouble to acos(), rather than asin()
-
- 20 Oct, 2004 1 commit
-
-
simonmar authored
Fix braino in pprAsmCLbl
-
- 18 Oct, 2004 2 commits
- 07 Oct, 2004 1 commit
-
-
wolfgang authored
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.
-
- 28 Sep, 2004 1 commit
-
-
simonmar authored
Avoid some warnings from gcc by appending an 'LL' suffix to 64-bit integers on a 32-bit platform. Suggested by: Sven Panne <Sven.Panne@aedion.de>
-
- 15 Sep, 2004 1 commit
-
-
wolfgang authored
Accept '#pragma' lines in the cmm parser. This is necessary because Apple's version of GNU cpp 3.3 leaves #pragma lines in it's output, which cause the build to fail on Mac OS X with GCC >= 3.3
-
- 10 Sep, 2004 3 commits
-
-
panne authored
Unbreak previous commit. Is QA on holiday? :-)
-
simonmar authored
RtsShouldNeverHappenCode never happens, now.
-
simonmar authored
Fix problem that shows up when building stage2 on Windows: slots of a vector table that can never happen are normally filled with the RtsShouldNeverHappen label, which currently prints as "0". On systems with leading underscores on labels, such as Windows, this turns into "_0" which is reported as an undefined symbol. Having a label print as "0" is a real hack, so the solution is to do it properly. This commit does just that.
-
- 26 Aug, 2004 1 commit
-
-
simonmar authored
Urk, since when has subtraction been associative. /me dons the pointy hat.
-
- 25 Aug, 2004 1 commit
-
-
simonmar authored
fix braino in previous commit: we should cast the function result to the right type, not just assume (W_).
-
- 23 Aug, 2004 1 commit
-
-
simonmar authored
Fix an infinite loop in the cmm-optimiser in the native codegen, and refactor: move isAssociativeMachOp into MachOp.
-
- 20 Aug, 2004 2 commits
-
-
simonmar authored
Simplify the "impossible branch" handling, and fix a bug in the process. CmmSwitch encodes the possibility of having impossible branches (the destinations are Maybe BlockId rather than just BlockId) so we don't need to encode impossible branches as dummy blocks containing a jump to an impossible location (currently 0). However, PprC and PprCmm weren't set up to cope with Nothings in a CmmSwitch, so this commit fixes that too.
-
simonmar authored
Give literal string labels a _str suffix, to make it less likely that they'll clash with a symbol in scope in a C file.
-
- 18 Aug, 2004 1 commit
-
-
simonmar authored
Remove extra semicolon; exposed by other recent changes.
-
- 16 Aug, 2004 1 commit
-
-
simonmar authored
Avoid casting lvalues; gcc 3.4 issues warnings for it.
-
- 13 Aug, 2004 1 commit
-
-
simonmar authored
Merge backend-hacking-branch onto HEAD. Yay!
-