Re: Build failure on Windows.

2012-12-15 Thread Erik de Castro Lopo
Niklas Larsson wrote:

 It seems like the build on Windows HEAD is trying to build the PowerPC
 assembly in rts/AdjustorAsm.S. Somehow the powerpc_HOST_ARCH must be
 defined, I can't figure out how though.

This is not actually the case, because on linux-powerpc I get errors
about Intel instructions in the same file.

This was discussed in this thread:

   http://www.haskell.org/pipermail/cvs-ghc/2012-December/079132.html

and it seems to be a build system problem as I can correctly
build the tree if I drop the -j argument to the make command.

 I have one patch though. When I was messing around, I taught sync-all how
 to checkout all the repos based on a date. It is somewhat tested, use with
 caution.

That may be valuable.

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Build failure on Windows.

2012-12-15 Thread Erik de Castro Lopo
Niklas Larsson wrote:

 Hi!
 
 It seems like the build on Windows HEAD is trying to build the PowerPC
 assembly in rts/AdjustorAsm.S.

Are you building for x86 or x86-64?

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Build failure on Windows.

2012-12-15 Thread Erik de Castro Lopo
Ian Lynagh wrote:

 Does it happen for you with a non-parallel (i.e. without using
 make -j) build? If so, can you reproduce it by running the last
 command that make runs by hand? If you can, then hopefully it will be
 easy to diagnose, e.g. by minimising the code being read.

Sorry, that was a red herring. When I dropped from make -j to just
make the build order changed and I was running into ticket #7498
instead of this one.

I have a patch in progress for #7498 and now I hit this issue every
time and nothing I do can progress the build.

I do notice from the build failures on the cvs-ghc mailing list
that this problem has not been reported on amd64 but does happen
on x86 and powerpc.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Fix for : Build failure on Windows (and others).

2012-12-15 Thread Erik de Castro Lopo
Hi all,

I have a fix for this. It seems that just recently (since
bd8f7fc56b84369f4e820263c0bcdc85760de6d4) ghc has started calling
gcc with extra comand line parameters:

-x assembler

From the gcc man page

-x language
   Specify explicitly the language for the following input files
   (rather than letting the compiler choose a default based on
   the file name suffix).  This option applies to all following
   input files until the next -x option.  Possible values for
   language are:

 c  c-header  cpp-output
 c++  c++-header  c++-cpp-output
 objective-c  objective-c-header  objective-c-cpp-output
 objective-c++ objective-c++-header objective-c++-cpp-output
 assembler  assembler-with-cpp
 ada
 f77  f77-cpp-input f95  f95-cpp-input
 go
 java

The attached patch replaces '-x assembler' with '-x assembler-with-cpp'
and fixes the problem for me on powerpc.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
From 7acb58b06984c10021026833d72a530a2a2f6459 Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo er...@mega-nerd.com
Date: Sun, 16 Dec 2012 04:22:17 +1100
Subject: [PATCH] Call gcc with '-x assembler-with-cpp' instead of '-x
 assembler'.

One x86 and powerpc, the second form above was ignoring all the CPP
lines and hence trying to compile x86 asm on powerpc and powerpc asm
on x86.
---
 compiler/main/DriverPipeline.hs |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index a216370..849532d 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1241,7 +1241,7 @@ runPhase As input_fn dflags
then [SysTools.Option -mcpu=v9]
else [])
 
-   ++ [ SysTools.Option -x, SysTools.Option assembler
+   ++ [ SysTools.Option -x, SysTools.Option assembler-with-cpp
   , SysTools.Option -c
   , SysTools.FileOption  inputFilename
   , SysTools.Option -o
-- 
1.7.10.4

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: PPC: Implement stack resizing for the linear register allocator. (51d3645)

2012-12-15 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/51d364530895e2f18fa8b98a12bf5a44f1b004d1

---

commit 51d364530895e2f18fa8b98a12bf5a44f1b004d1
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Sun Dec 16 04:40:54 2012 +1100

PPC: Implement stack resizing for the linear register allocator.

Fixes #7498.

---

 compiler/nativeGen/AsmCodeGen.lhs |2 +-
 compiler/nativeGen/PPC/Instr.hs   |   72 +---
 2 files changed, 59 insertions(+), 15 deletions(-)

diff --git a/compiler/nativeGen/AsmCodeGen.lhs 
b/compiler/nativeGen/AsmCodeGen.lhs
index 59f4b43..6ef9e42 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -188,7 +188,7 @@ nativeCodeGen dflags hds us cmms
  ,maxSpillSlots = PPC.Instr.maxSpillSlots 
dflags
  ,allocatableRegs   = PPC.Regs.allocatableRegs 
platform
  ,ncg_x86fp_kludge  = id
- ,ncgAllocMoreStack = noAllocMoreStack
+ ,ncgAllocMoreStack = PPC.Instr.allocMoreStack 
platform
  ,ncgExpandTop  = id
  ,ncgMakeFarBranches= makeFarBranches
  }
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
index 820d4fc..89536b1 100644
--- a/compiler/nativeGen/PPC/Instr.hs
+++ b/compiler/nativeGen/PPC/Instr.hs
@@ -13,7 +13,8 @@ module PPC.Instr (
 archWordSize,
 RI(..),
 Instr(..),
-maxSpillSlots
+maxSpillSlots,
+allocMoreStack
 )
 
 where
@@ -57,9 +58,57 @@ instance Instruction Instr where
 mkRegRegMoveInstr _ = ppc_mkRegRegMoveInstr
 takeRegRegMoveInstr = ppc_takeRegRegMoveInstr
 mkJumpInstr = ppc_mkJumpInstr
-mkStackAllocInstr   = panic no ppc_mkStackAllocInstr
-mkStackDeallocInstr = panic no ppc_mkStackDeallocInstr
-
+mkStackAllocInstr   = ppc_mkStackAllocInstr
+mkStackDeallocInstr = ppc_mkStackDeallocInstr
+
+
+ppc_mkStackAllocInstr :: Platform - Int - Instr
+ppc_mkStackAllocInstr platform amount
+  = case platformArch platform of
+  ArchPPC - -- SUB II32 (OpImm (ImmInt amount)) (OpReg esp)
+ ADD sp sp (RIImm (ImmInt (-amount)))
+  arch - panic $ ppc_mkStackAllocInstr  ++ show arch
+
+ppc_mkStackDeallocInstr :: Platform - Int - Instr
+ppc_mkStackDeallocInstr platform amount
+  = case platformArch platform of
+  ArchPPC - -- ADD II32 (OpImm (ImmInt amount)) (OpReg esp)
+ ADD sp sp (RIImm (ImmInt amount))
+  arch - panic $ ppc_mkStackDeallocInstr  ++ show arch
+
+allocMoreStack
+  :: Platform
+  - Int
+  - NatCmmDecl statics PPC.Instr.Instr
+  - NatCmmDecl statics PPC.Instr.Instr
+
+allocMoreStack _ _ top@(CmmData _ _) = top
+allocMoreStack platform amount (CmmProc info lbl live (ListGraph code)) =
+CmmProc info lbl live (ListGraph (map insert_stack_insns code))
+  where
+alloc   = mkStackAllocInstr platform amount
+dealloc = mkStackDeallocInstr platform amount
+
+is_entry_point id = id `mapMember` info
+
+insert_stack_insns (BasicBlock id insns)
+   | is_entry_point id  = BasicBlock id (alloc : block')
+   | otherwise  = BasicBlock id block'
+   where
+ block' = insertBeforeNonlocalTransfers dealloc insns
+
+insertBeforeNonlocalTransfers :: Instr - [Instr] - [Instr]
+insertBeforeNonlocalTransfers insert insns
+ = foldr p [] insns
+ where p insn r = case insn of
+BCC_ _  - insert : insn : r
+BCCFAR _ _  - insert : insn : r
+JMP_- insert : insn : r
+MTCTR  _- insert : insn : r
+BCTR   _ _  - insert : insn : r
+BL _ _  - insert : insn : r
+BCTRL  _- insert : insn : r
+_   - insn : r
 
 -- 
-
 -- Machine's assembly language
@@ -386,25 +435,20 @@ ppc_mkLoadInstr dflags reg delta slot
 in LD sz reg (AddrRegImm sp (ImmInt (off-delta)))
 
 
-spillSlotSize :: Int
-spillSlotSize = 8
+spillSlotSize :: DynFlags - Int
+spillSlotSize dflags = if is32Bit then 12 else 8
+where is32Bit = target32Bit (targetPlatform dflags)
 
 maxSpillSlots :: DynFlags - Int
 maxSpillSlots dflags
-= ((rESERVED_C_STACK_BYTES dflags - 64) `div` spillSlotSize) - 1
+= ((rESERVED_C_STACK_BYTES dflags - 64) `div` spillSlotSize dflags) - 1
 
 -- convert a spill slot number to a *byte* offset, with no sign:
 -- decide on a per arch basis whether you are spilling above

[commit: ghc] master: De-tab compiler/nativeGen/PPC/Instr.hs. (6a990ac)

2012-12-15 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/6a990ace497ebfe79b19d565f428428bf1c11427

---

commit 6a990ace497ebfe79b19d565f428428bf1c11427
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Sat Dec 15 20:55:21 2012 +1100

De-tab compiler/nativeGen/PPC/Instr.hs.

 compiler/nativeGen/PPC/Instr.hs |  509 +++
 1 files changed, 251 insertions(+), 258 deletions(-)


Diff suppressed because of size. To see it, use:

git show 6a990ace497ebfe79b19d565f428428bf1c11427

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: Call gcc with '-x assembler-with-cpp' instead of '-x assembler'. (eec4c10)

2012-12-15 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/eec4c10819ac140270c00688b39da136313e

---

commit eec4c10819ac140270c00688b39da136313e
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Sun Dec 16 04:22:17 2012 +1100

Call gcc with '-x assembler-with-cpp' instead of '-x assembler'.

On x86 and powerpc, the second form above was ignoring all the CPP
lines and hence trying to compile x86 asm on powerpc and powerpc asm
on x86.

---

 compiler/main/DriverPipeline.hs |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index a216370..849532d 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1241,7 +1241,7 @@ runPhase As input_fn dflags
then [SysTools.Option -mcpu=v9]
else [])
 
-   ++ [ SysTools.Option -x, SysTools.Option assembler
+   ++ [ SysTools.Option -x, SysTools.Option 
assembler-with-cpp
   , SysTools.Option -c
   , SysTools.FileOption  inputFilename
   , SysTools.Option -o



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: pgj (x86 FreeBSD HEAD), build 887, Failure

2012-12-13 Thread Erik de Castro Lopo
Ian Lynagh wrote:

 On Wed, Dec 12, 2012 at 07:27:43PM -0800, Builder wrote:
  
  rts/AdjustorAsm.S:127:0:
   Error: no such instruction: `load r3,HPTR_OFF(r2)'
  
  rts/AdjustorAsm.S:129:0:
   Error: no such instruction: `load r12,WPTR_OFF(r2)'
  
  rts/AdjustorAsm.S:131:0:  Error: no such instruction: `mtctr r12'
 
 Does anyone know what's going on here?

I've been seeing this as well on my PowerPC build machine
where is complains about Intel instrictions.

My investigation so far has found (I was about to raise a 
bug):

a) This seems to be some sort of build system race condition. I
   was using make -j 4, would hit that problem, woul run make
   again and then I would be able to get past that point.

b) It seemed as if all the preprocessor lines were being treated
   as comments (ie completely ignored).

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: pgj (x86 FreeBSD HEAD), build 887, Failure

2012-12-13 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote:

 a) This seems to be some sort of build system race condition. I
was using make -j 4, would hit that problem, would run make
again and then I would be able to get past that point.

I can confirm that this problem only happens for me when
I run make -j. A single threaded make command gets past
this point.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: Fix pprPanic so that it doesn't throw away the SDoc part of the error. (e6ce335)

2012-12-04 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/e6ce335e8e3ba0718efd234910185e4257424562

---

commit e6ce335e8e3ba0718efd234910185e4257424562
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Mon Dec 3 12:28:39 2012 +1100

Fix pprPanic so that it doesn't throw away the SDoc part of the error.

---

 compiler/utils/Outputable.lhs |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index ad0b9d7..362cd1a 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -898,7 +898,8 @@ plural _   = char 's'
 
 pprPanic :: String - SDoc - a
 -- ^ Throw an exception saying bug in GHC
-pprPanic= panicDoc
+pprPanic s doc
+ = throwGhcException (Panic (s ++ \n ++ showSDoc unsafeGlobalDynFlags doc))
 
 pprSorry :: String - SDoc - a
 -- ^ Throw an exception saying this isn't finished yet



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [commit: ghc] master: Fix pprPanic so that it doesn't throw away the SDoc part of the error. (e6ce335)

2012-12-04 Thread Erik de Castro Lopo
Ian Lynagh wrote:

 I've reverted this: the Doc is passed in the PanicDoc constructor, so it
 shouldn't be necessary.
 
 What problem were you trying to solve?

Well, pprPanic is defined as:

pprPanic :: String - SDoc - a
-- ^ Throw an exception saying bug in GHC
pprPanic= panicDoc

and panicDoc is defined as:

panicDoc :: String - SDoc - a
panicDocx doc = throwGhcException (PprPanicx doc)

when the exception is throw it ends up in showGhcException which drops
the SDoc part of the message on the floor:

PprPanic  s _ -
showGhcException (Panic (s ++ \ndetails unavailable))

I tried to convert the SDoc to a String in this code, but that resulted
in a circular import. The obvious solution was the one in my patch.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


You have an old time package in your GHC tree!

2012-12-02 Thread Erik de Castro Lopo
Hi all,

Just updated my tree against git HEAD and got the message:


ATTENTION!

You have an old time package in your GHC tree!

Please remove it (e.g. rm -r libraries/time), and then run
./sync-all get to get the new repository.


I did as suggested but I don't get the new time library and I still
get this message.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: You have an old time package in your GHC tree!

2012-12-02 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote:

 Hi all,
 
 Just updated my tree against git HEAD and got the message:
 
 
 ATTENTION!
 
 You have an old time package in your GHC tree!
 
 Please remove it (e.g. rm -r libraries/time), and then run
 ./sync-all get to get the new repository.
 
 
 I did as suggested but I don't get the new time library and I still
 get this message.

I'm also getting the following from git status:

# Changes not staged for commit:
#   (use git add/rm file... to update what will be committed)
#   (use git checkout -- file... to discard changes in working 
directory)
#   (commit or discard the untracked or modified content in submodules)
#
#   modified:   libraries/primitive (untracked content)
#   modified:   libraries/transformers (untracked content)
#   modified:   libraries/vector (untracked content)

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: You have an old time package in your GHC tree!

2012-12-02 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote:

 Hi all,
 
 Just updated my tree against git HEAD and got the message:
 
 
 ATTENTION!
 
 You have an old time package in your GHC tree!
 
 Please remove it (e.g. rm -r libraries/time), and then run
 ./sync-all get to get the new repository.
 
 
 I did as suggested but I don't get the new time library and I still
 get this message.

Ian Lynagh has fixed this. Thanks Ian.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: Replace all uses of ghcError with throwGhcException and purge ghcError. (77ef6ca)

2012-11-29 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/77ef6ca06d401eda2aeb51d22d5ce033db667161

---

commit 77ef6ca06d401eda2aeb51d22d5ce033db667161
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Thu Nov 29 21:16:30 2012 +1100

Replace all uses of ghcError with throwGhcException and purge ghcError.

 compiler/ghci/ByteCodeGen.lhs |2 +-
 compiler/ghci/ByteCodeLink.lhs|2 +-
 compiler/ghci/LibFFI.hsc  |2 +-
 compiler/ghci/Linker.lhs  |   26 ++--
 compiler/iface/BinIface.hs|2 +-
 compiler/iface/LoadIface.lhs  |2 +-
 compiler/iface/MkIface.lhs|2 +-
 compiler/main/DriverMkDepend.hs   |4 +-
 compiler/main/DriverPipeline.hs   |6 ++--
 compiler/main/DynFlags.hs |8 +++---
 compiler/main/GHC.hs  |2 +-
 compiler/main/GhcMake.hs  |4 +-
 compiler/main/InteractiveEval.hs  |   10 
 compiler/main/Packages.lhs|   12 
 compiler/main/StaticFlagParser.hs |6 ++--
 compiler/main/StaticFlags.hs  |2 +-
 compiler/main/SysTools.lhs|8 +++---
 compiler/utils/Panic.lhs  |6 +
 ghc/GhciTags.hs   |8 +++---
 ghc/InteractiveUI.hs  |   48 ++--
 ghc/Main.hs   |   18 +++---
 21 files changed, 88 insertions(+), 92 deletions(-)


Diff suppressed because of size. To see it, use:

git show 77ef6ca06d401eda2aeb51d22d5ce033db667161

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] define own version of PRIdPTR on platform where its not available

2012-11-05 Thread Erik de Castro Lopo
Gabor Greif wrote:

 +1. A configure script will run (almost) till the heat death of the universe.
 
 I have a solution on the cross-compiler-alienless branch which does exactly
 what you propose: feed the relevant headers into the cross-gcc, obtain
 the offsets/sizes back
 by 'nm', and massage stuff to obtain all as macros then feed those
 into mkDerivedConstants.c.

Doesn't the offsetof macro do the right thing for get the offset of
fields within a struct?

http://en.wikipedia.org/wiki/Offsetof

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] define own version of PRIdPTR on platform where its not available

2012-11-03 Thread Erik de Castro Lopo
Ian Lynagh wrote:

 If we're going to go this route, then I think we should do it by
 comparing SIZEOF_VOID_P to SIZEOF_INT etc, rather than assuming that
 either 'ld' or 'd' is right based on _LP64.

+1

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: rts: Ignore signal before deleting timer. Fixes #7303. (5f3c105)

2012-10-13 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/5f3c1055c2a5a59117985420909dd9148d7b2ba6

---

commit 5f3c1055c2a5a59117985420909dd9148d7b2ba6
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Sat Oct 6 17:23:01 2012 +1000

rts: Ignore signal before deleting timer. Fixes #7303.

Was getting an ocassional hang or segfault when building GHC in a
Qemu user space emulation of ARM. Turned out that the ITIMER_SIGNAL
was being delivered *after* the call to timer_delete(). Setting the
signal to SIG_IGN before deleting the timer solves the problem.

---

 rts/posix/Itimer.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/rts/posix/Itimer.c b/rts/posix/Itimer.c
index 8c9b1f8..80b3b56 100644
--- a/rts/posix/Itimer.c
+++ b/rts/posix/Itimer.c
@@ -204,6 +204,9 @@ void
 exitTicker (rtsBool wait STG_UNUSED)
 {
 #if defined(USE_TIMER_CREATE)
+// Before deleting the timer set the signal to ignore to avoid the
+// possibility of the signal being delivered after the timer is deleted.
+signal(ITIMER_SIGNAL, SIG_IGN);
 timer_delete(timer);
 // ignore errors - we don't really care if it fails.
 #endif



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Huge number of undefined reference to errors

2012-09-07 Thread Erik de Castro Lopo
Simon Marlow wrote:

 There was a problem with -split-objs during the last few days that could 
 cause this, I pushed the fix for it yesterday.

Unfortunately I'm still seeing this problem. I've just done a fresh
./sync-all pull followed by a make clean and make.

The start of the failure looks like this:


  AR compiler/stage2/build/libHSghc-7.7.20120906.a
/usr/bin/ar: creating compiler/stage2/build/libHSghc-7.7.20120906.a
rm -f compiler/stage2/build/libHSghc-7.7.20120906.a.contents  
  HC [stage 1] utils/hsc2hs/dist-install/build/tmp/hsc2hs
utils/hsc2hs/dist-install/build/Main.o: In function `r3N3_info':
(.text+0x212): undefined reference to `c3W4_info'
utils/hsc2hs/dist-install/build/Main.o: In function `r3N3_info':
(.text+0x216): undefined reference to `c3W4_info'


Erik

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[commit: ghc] master: Handle II16 size value in PowerPC code generator. (06b4e78)

2012-09-07 Thread Erik de Castro
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/06b4e787cce00b8c0d1b31db44821548c5c9c62c

---

commit 06b4e787cce00b8c0d1b31db44821548c5c9c62c
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Fri Sep 7 20:12:38 2012 +1000

Handle II16 size value in PowerPC code generator.

---

 compiler/nativeGen/PPC/CodeGen.hs |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/nativeGen/PPC/CodeGen.hs 
b/compiler/nativeGen/PPC/CodeGen.hs
index ce4a54c..6581375 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -1060,23 +1060,23 @@ genCCall' platform gcp target dest_regs argsAndHints
   GCPDarwin -
   case cmmTypeSize rep of
   II8  - (1, 0, 4, gprs)
+  II16 - (1, 0, 4, gprs)
   II32 - (1, 0, 4, gprs)
   -- The Darwin ABI requires that we skip a
   -- corresponding number of GPRs when we use
   -- the FPRs.
   FF32 - (1, 1, 4, fprs)
   FF64 - (2, 1, 8, fprs)
-  II16 - panic genCCall' passArguments II16
   II64 - panic genCCall' passArguments II64
   FF80 - panic genCCall' passArguments FF80
   GCPLinux -
   case cmmTypeSize rep of
   II8  - (1, 0, 4, gprs)
+  II16 - (1, 0, 4, gprs)
   II32 - (1, 0, 4, gprs)
   -- ... the SysV ABI doesn't.
   FF32 - (0, 1, 4, fprs)
   FF64 - (0, 1, 8, fprs)
-  II16 - panic genCCall' passArguments II16
   II64 - panic genCCall' passArguments II64
   FF80 - panic genCCall' passArguments FF80
 



___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Huge number of undefined reference to errors

2012-09-07 Thread Erik de Castro Lopo
Simon Marlow wrote:

 Please let me know if the patch I just pushed to the PPC NCG fixes the 
 problem.

Yes, that fixed that problem and I just pushed this to fix another minor
problem:

  commit 06b4e787cce00b8c0d1b31db44821548c5c9c62c
  Author: Erik de Castro Lopo er...@mega-nerd.com
  Date:   Fri Sep 7 20:12:38 2012 +1000

  Handle II16 size value in PowerPC code generator.


Cheers,
Erik

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Huge number of undefined reference to errors

2012-09-06 Thread Erik de Castro Lopo
Hi all,

I'm compiling GHC HEAD on powerpc-linux and have been for some time. Just
yesterday I started getting a build error I had not seen before. I am getting
hundreds of errors like:

/home/erikd/Git/ghc-upstream-git/libraries/ghc-prim/dist-install/build/
libHSghc-prim-0.3.0.0.a(Classes.o): In function `saeS_info':
(.text+0x291b6): undefined reference to `codD_info'
/home/erikd/Git/ghc-upstream-git/libraries/ghc-prim/dist-install/build/
libHSghc-prim-0.3.0.0.a(Classes.o): In function `saeS_info':
(.text+0x291ba): undefined reference to `codD_info'
/home/erikd/Git/ghc-upstream-git/libraries/ghc-prim/dist-install/build/
libHSghc-prim-0.3.0.0.a(Classes.o): In function `saeS_info':
(.text+0x291ea): undefined reference to `codE_info'

Anyone have any idea what is causing this or how I can fix it? I'm not
seeing the same problem on x86-86.

Cheers,
Erik

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: FW: ANNOUNCE: GHC 7.6.1 Release Candidate 1

2012-08-31 Thread Erik de Castro Lopo
Simon Peyton-Jones wrote:

 Paolo can you merge this?

The following patch should probably also be merged to 7.6:


commit b4b78631890a4cd9cde1551de9a4440e7e750372
Author: Erik de Castro Lopo er...@mega-nerd.com
Date:   Thu Aug 23 20:39:47 2012 +1000

Fix for optimizer bug on linux-powerpc (#6156).

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


validate script bug

2012-08-07 Thread Erik de Castro Lopo
Hi all,

It seems there is a bug in the validate script. For me (on Linux), validate
is failings with the following error at the bootom of this email.

This seems to be caused by the following line in the validate script:

bindistdir=bindisttest/install   dir

Which according to git annotate was changed by Ian Lynagh back in
February:

d7d6c42a  (Ian Lynagh 2012-02-22 02:36:51 +   116)

The odd thing is that I have seen validate work as recently as two
weeks ago.

Is anybody else seeing this problem?

Cheers,
Erik




bindisttest/install   dir/bin/ghc-7.7.20120803
echo 'executablename=$exedir/ghc'  
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/bin/ghc-7.7.20120803
cat ghc/ghc.wrapper  
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/bin/ghc-7.7.20120803
chmod +x 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/bin/ghc-7.7.20120803
rm -f /home/erikd/Git/ghc-upstream/bindisttest/install   dir/bin/ghc  
ln -s ghc-7.7.20120803 /home/erikd/Git/ghc-upstream/bindisttest/install   
dir/bin/ghc
/usr/bin/install -c -m 755 -d /home/erikd/Git/ghc-upstream/bindisttest/install 
  dir/lib/ghc-7.7.20120803
for i in driver/ghc-usage.txt driver/ghci-usage.txt rts/dist/build/libHSrts.a 
rts/dist/build/libHSrts-ghc7.7.20120803.so rts/dist/build/libHSrts_l.a 
rts/dist/build/libHSrts_debug.a rts/dist/build/libHSrts_thr.a 
rts/dist/build/libHSrts_thr_debug.a rts/dist/build/libHSrts_thr_l.a 
rts/dist/build/libHSrts_debug-ghc7.7.20120803.so 
rts/dist/build/libHSrts_thr-ghc7.7.20120803.so 
rts/dist/build/libHSrts_thr_debug-ghc7.7.20120803.so rts/dist/build/libffi.so 
rts/dist/build/libffi.so.6 rts/dist/build/libffi.so.6.0.0  settings; do \
case $i in \
  *.a) \
/usr/bin/install -c -m 644  $i 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/lib/ghc-7.7.20120803; \
true /home/erikd/Git/ghc-upstream/bindisttest/install   
dir/lib/ghc-7.7.20120803/`basename $i` ;; \
  *.dll) \
/usr/bin/install -c -m 755  $i 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/lib/ghc-7.7.20120803 ; 
\
: /home/erikd/Git/ghc-upstream/bindisttest/install   
dir/lib/ghc-7.7.20120803/$i ;; \
  *.so) \
/usr/bin/install -c -m 755  $i 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/lib/ghc-7.7.20120803 
;; \
  *.dylib) \
/usr/bin/install -c -m 755  $i 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/lib/ghc-7.7.20120803;; 
\
  *) \
/usr/bin/install -c -m 644  $i 
/home/erikd/Git/ghc-upstream/bindisttest/install   dir/lib/ghc-7.7.20120803; \
esac; \
done
/usr/local/bin/gcc -E  -undef -traditional -P -DINSTALLING 
-DLIB_DIR='/home/erikd/Git/ghc-upstream/bindisttest/install   
dir/lib/ghc-7.7.20120803' 
-DINCLUDE_DIR='/home/erikd/Git/ghc-upstream/bindisttest/install   
dir/lib/ghc-7.7.20120803/include' -DPAPI_INCLUDE_DIR= -DPAPI_LIB_DIR= -x c 
-Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header 
-Iincludes/dist-ghcconstants/header rts/package.conf.in -o 
rts/package.conf.install.raw
gcc: error: dir/lib/ghc-7.7.20120803: No such file or directory
gcc: error: dir/lib/ghc-7.7.20120803/include: No such file or directory



-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] fix x86/NCG compilation failure on ARM platform

2012-07-08 Thread Erik de Castro Lopo
Karel Gardas wrote:

 ---
  compiler/nativeGen/X86/Regs.hs |5 -
  1 files changed, 4 insertions(+), 1 deletions(-)
 
 diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs

I already submitted a bug report and patch for this :-)

http://hackage.haskell.org/trac/ghc/ticket/7054


Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Compile speed benchmarking

2011-10-18 Thread Erik de Castro Lopo
David Terei wrote:

 Looks good. Why did you keep the Show instances at all? You say for
 debugging, where is the debugging being done?

The show instances were useful for the DDC backend. I haven't used
them in any of my GHC work.

Would you like me to rejig the patch to drop them?

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Compile speed benchmarking

2011-10-16 Thread Erik de Castro Lopo
David Terei wrote:

 Hmmm I wasn't expecting a huge speedup but was hoping for a few
 percentage points at least. Can you fork GHC on github and put your
 patch up on there and then send me a link please? This is just a far
 easier workflow for me to review and merge patches than email.

As requested, patch is here:

https://github.com/erikd/ghc/commit/167bf2f2c5fc7bec11bfb264f29320e11637de79

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Compile speed benchmarking

2011-10-14 Thread Erik de Castro Lopo
David Terei wrote:

 Can you fork GHC on github and put your
 patch up on there and then send me a link please? This is just a far
 easier workflow for me to review and merge patches than email.

Sure, will do.

 Hmmm I wasn't expecting a huge speedup but was hoping for a few
 percentage points at least.

With 20/20 hindsight I'm not that surprised. The NCG backend path
looks like:

   CMM - native asm - native assembler - object code

while the LLVM backend path looks like:

   CMM - llvm code - llc - native asm - native assembler - object code

The thing thats different here is that GHC generates LLVM text
IR code that then has to be parsed by llc. I wonder if it might
be worth print LLVM btyecode instead of LLVM text IR code.

Although it would probably be better to instrument things first
and find out whats really happening. It would also be useful to
check out the nofib tests that are the slowest to try and figure
out why.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Compile speed benchmarking

2011-10-04 Thread Erik de Castro Lopo
Hi all,

I'm working on some changes (suggested by David Terei) to the LLVM
backend that I hope will improve compile times when going via LLVM.

Does anyone have a suggestion as an appropriate test for this?

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Compile speed benchmarking

2011-10-04 Thread Erik de Castro Lopo
Karel Gardas wrote:

  Does anyone have a suggestion as an appropriate test for this?
 
 If you are successful in your hacking, then GHC bootstrap on ARM should 
 be faster. I'm not able to give you a login on my pandaboard dedicated 
 to ARM/GHC hacking, but in about two weeks my board should be back in 
 working state again and then I'm free to perform some tests for you if 
 you like...

Ah, thats an idea. I should try to force the stage1 and stage2 compiler
to go via LLVM and then see how the time is:

  - via NCG
  - via LLVM before my changes
  - via LLVM after my changes

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: build error

2011-09-05 Thread Erik de Castro Lopo
Dimitrios Vytiniotis wrote:

 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 7.3.20110902 for i386-apple-darwin):
 tyConFamilySize: ghc-7.3.20110902:Name.Name{tc r3n}

Thats bug #5465. SPJ has just commited a fix.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Ghci segfault on powerpc-linux

2011-09-02 Thread Erik de Castro Lopo
Hi all,

For some time I have been working in short bursts on debugging trac
bug #5111 which actually turns out to be a manifestation of bug 
#2972.

Reading bug #2972 shows that at different times, the segfault was
occurring in different places at different times (ie the curses
library, libedit and now somewhere else for me).

This makes me wonder if I am actually running into a PowerPC
architecture problem where relative jumps are limited to addresses
that can be expressed in 24/26 bits (24 actual bits shifted up
two bits because instructions are 4 byte aligned).

Anyone have any suggestions on how to progress this further?

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Any way to compile an old version from git?

2011-05-22 Thread Erik de Castro Lopo
David Peixotto wrote:

 I wrote a python script that can be used to record and reinstate the commit
 state of all the git repositories used by GHC. It parses the output of the
 sync-all log command suggested by Simon to create a fingerprint which is
 just the pairs of (subdirectory, commit) that can be used to identify the
 current state of all the repos. Given a fingerprint, it can also restore the
 repositories to the fingerprint state by running a checkout of the appropriate
 commit in each subdir.

Interesting tool. Do you have a set of these fingerprints dating back
a year or more?

Over the weekend I hacked together a tool (in Haskell) that can parse
the git logs of the various repositories and for a given date, put 
together a bunch of git commit hashes (one for each repo) that should
work together.

I'm still hacking on the tool and so far the results have been less
than stellar, but not completely useless.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: [PATCH] Fix RTS compiler error when DEBUG is defined.

2011-05-22 Thread Erik de Castro Lopo
Erik de Castro Lopo wrote:

 Hi all,
 
 Before this patch the compiler errored out when printing a value
 of type StgWord32 with a %d format specifier.

This patch is no longer needed after this commit:

commit 96d64fe2175d829f9499656750d51cf577ff9892
Author: Duncan Coutts dun...@well-typed.com
Date:   Mon May 23 00:10:21 2011 +0100

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


[PATCH] Fix RTS compiler error when DEBUG is defined.

2011-05-20 Thread Erik de Castro Lopo
Hi all,

Before this patch the compiler errored out when printing a value
of type StgWord32 with a %d format specifier.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
From e8b26fdfb6cea7d2a32f96fa07bca6fe623b174e Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo er...@mega-nerd.com
Date: Sat, 21 May 2011 11:20:43 +1000
Subject: [PATCH] Fix RTS compiler error when DEBUG is defined.

---
 rts/Trace.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rts/Trace.c b/rts/Trace.c
index fb8e922..a8519c9 100644
--- a/rts/Trace.c
+++ b/rts/Trace.c
@@ -267,16 +267,16 @@ void traceCapsetModify_ (EventTypeNum tag,
 tracePreface();
 switch (tag) {
 case EVENT_CAPSET_CREATE:   // (capset, capset_type)
-debugBelch(created capset %d of type %d\n, capset, other);
+debugBelch(created capset %u of type %u\n, (uint32_t) capset, (uint32_t) other);
 break;
 case EVENT_CAPSET_DELETE:   // (capset)
-debugBelch(deleted capset %d\n, capset);
+debugBelch(deleted capset %u\n, (uint32_t) capset);
 break;
 case EVENT_CAPSET_ASSIGN_CAP:  // (capset, capno)
-debugBelch(assigned cap %d to capset %d\n, other, capset);
+debugBelch(assigned cap %u to capset %u\n, (uint32_t) other, (uint32_t) capset);
 break;
 case EVENT_CAPSET_REMOVE_CAP:  // (capset, capno)
-debugBelch(removed cap %d from capset %d\n, other, capset);
+debugBelch(removed cap %u from capset %u\n, (uint32_t) other, (uint32_t) capset);
 break;
 }
 RELEASE_LOCK(trace_utx);
-- 
1.7.2.5

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Any way to compile an old version from git?

2011-05-19 Thread Erik de Castro Lopo
Edward Z. Yang wrote:

 What might also be pretty useful is a global checkout a commit from
 before this time,

I believe this to be doable. I'm working on a tool for it.

 which would also work even in the case of missing
 build logs (we should also publish a log of build log hashes, so you
 can have some record of known good builds).

Having successful builds record the git hash of all repos would
be a great thing to have in future.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Any way to compile an old version from git?

2011-05-18 Thread Erik de Castro Lopo
Hi all,

In what litrle spare time I have I have been working on debugging
a problem that only seems to arise on linux-powerpc (bug #5111).

Since I'm time poor and CPU rich, I thought it might be useful to
try and use a bisect appraoch to try and find when the bug was
introduced. Unfortunately, if I do a git checkout of an old
revision (I tried with a commit dated Jan 4th 2011) and try and
build it it fails to build because the other source trees grabbed
via the sync-all script is not in sync with the main ghc tree.

Does anyone have a way of grabbing a snapshot of the source
tree from some arbitrary date?

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Any way to compile an old version from git?

2011-05-18 Thread Erik de Castro Lopo
Ben Lippmeier wrote:

 The patch history doesn't provide a working build at every point
 anyway.

Not every point, but from what I've seen the build breakage
is rather rare.

 People push *bundles* of patches, and the build needs to work
 after the bundle, but it doesn't need to work after every patch.

No, but the bundles with a single git tree are usually pretty
easy to detect by their date stamp in the git commit history.

If you plot the commit date vs time of patches in a project with
a single committer who only commits in the master branch you will
get a function that increases monotonically.

For ghc, with multiple commiters commiting bundles, the patches
within a bundle have a monotonically increasing date stamp and
the start of a bundle is marked by commit N+1 having a date
earlier than commit N.

Obviously this is somewhat simplistic and doesn't consider
overlapping patch bundles, but to a certain extent the git
history contains info to be able to guess which commits
should build.

The real difficulty with the ghc sources is that fact that
over a dozen different trees, with independant commit histories
are needed to retrieve a working revision.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Patch : Fix missing import

2011-05-13 Thread Erik de Castro Lopo
Hi all,

Was getting the following error from git HEAD:

compiler/nativeGen/AsmCodeGen.lhs:457:47:
Not in scope: `cProjectVersion'
make[1]: *** [compiler/stage1/build/AsmCodeGen.o] Error 1

Patch attached.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/
From 7320d86cd4addc070dc83631a3312157aff3ae64 Mon Sep 17 00:00:00 2001
From: Erik de Castro Lopo er...@mega-nerd.com
Date: Fri, 13 May 2011 20:52:44 +1000
Subject: [PATCH] Add missing import.

---
 compiler/nativeGen/AsmCodeGen.lhs |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs
index dce5ac3..4f54bb7 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -50,6 +50,7 @@ import qualified RegAlloc.Graph.TrivColorable	as Color
 
 import TargetReg
 import Platform
+import Config
 import Instruction
 import PIC
 import Reg
-- 
1.7.4.4

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Patch : Fix missing import

2011-05-13 Thread Erik de Castro Lopo
Edward Z. Yang wrote:

 Note that this line was removed by this commit:
 
 Author: Ben Lippmeier b...@ouroborus.net  2011-05-11 04:36:01
 Committer: Ben Lippmeier b...@ouroborus.net  2011-05-12 11:36:21
 Parent: 35474439dcf6dc60e2f6e296de7da128c690d50e (Follow changes in DPH 
 library: Repr module is gone.)
 Child:  999857fdfd8fa1b305a94bc54bb1860f5c8896d1 (Wibbles on modules imported 
 by vectoriser)
 Branches: master, remotes/origin/master
 Follows: ghc-darcs-git-switchover
 Precedes: 
 
 Fix build
 
 So something trickier might be going on here.

Yeah, the code that uses Config.cProjectVersion is this:


#if !defined(darwin_TARGET_OS)
-- And just because every other compiler does, lets stick in
-- an identifier directive: .ident GHC x.y.z
Pretty.$$ let compilerIdent = Pretty.text GHC Pretty.+
  Pretty.text cProjectVersion
   in Pretty.text .ident Pretty.+
  Pretty.doubleQuotes compilerIdent
#endif

I wonder why that is unwanted on OSX.

Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc


Re: Native codegen API changes

2011-04-16 Thread Erik de Castro Lopo
Edward Z. Yang wrote:

 In order to add support for patching jump tables with fixup code [1] in
 the linear register allocator, I'd like to defer creating jump tables
 until after register allocation has occurred.  This creation usually occurs
 during the instruction selection phase, so I will need to modify the API
 across all architectures to defer creating instruction selection to
 another function.  This is a head-up for anyone who may care about
 these APIs (if you have a better idea, please let me know!) and it also
 means that I'll need a little help testing my patches on the relevant
 architectures:
 
 PPC: BCTR
 SPARC: JMP_TBL
 X86: JMP_TBL

I can help with testing on PPC and X86 (in a 32 bit chroot on a 64
bit Linux machine).

Git head is currently broken on PPC but I am working on it and makng
slow progress.

Cheers,
Erik
-- 
--
Erik de Castro Lopo
http://www.mega-nerd.com/

___
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc