[project @ 2001-02-19 10:15:54 by sewardj]
authorsewardj <unknown>
Mon, 19 Feb 2001 10:15:54 +0000 (10:15 +0000)
committersewardj <unknown>
Mon, 19 Feb 2001 10:15:54 +0000 (10:15 +0000)
commit0879ee328b8d52877f82fda4ae2a234b5ba6c037
tree54b434b30dfc434c706381d18485472e3faa51a1
parentec594d7e5a09e21df719859a7724adb1394ce60e
[project @ 2001-02-19 10:15:54 by sewardj]
Fix two bugs exposed when trying to boot HEAD on sparc with NCG and -O:

1.  StScratchWords on sparc were in the wrong place; they were
    immediately above %fp and should have been immediately below.
    Fixed.  Also removed a suspicious-looking "+1" in the x86
    version of same.

2.  (Potentially affects all platforms): Lift strings out from
    top-level literal data, and place them at the end of the block.
    The motivating example (bug) was:

     Stix:
        (DataSegment)
        Bogon.ping_closure :
        (Data P_ Addr.A#_static_info)
        (Data StgAddr (Str `alalal'))
        (Data P_ (0))
     results in:
        .data
                .align 8
        .global Bogon_ping_closure
        Bogon_ping_closure:
                .long   Addr_Azh_static_info
                .long   .Ln1a8
        .Ln1a8:
                .byte   0x61
                .byte   0x6C
                .byte   0x61
                .byte   0x6C
                .byte   0x61
                .byte   0x6C
                .byte   0x00
                .long   0
   ie, the Str is planted in-line, when what we really meant was to place
   a _reference_ to the string there.  This is Way Wrong (tm).  Fixed.
ghc/compiler/nativeGen/AsmCodeGen.lhs
ghc/compiler/nativeGen/MachCode.lhs