Skip to content
  • Julian Seward's avatar
    [project @ 2001-02-19 10:15:54 by sewardj] · 0879ee32
    Julian Seward authored
    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.
    0879ee32