Windows-native GHC (Yasm issue)
p.tanski at gmail.com
Tue Nov 21 09:17:20 EST 2006
On Nov 21, 2006, at 6:20 AM, Simon Marlow wrote:
> Peter Tanski wrote:
>> On Nov 20, 2006, at 6:03 AM, Simon Marlow wrote:
>>> Peter Tanski wrote:
>>>> On Nov 15, 2006, at 4:19 AM, Simon Marlow wrote:
>>>>> Ok, so it seems like a plausible plan is to start by using
>>>>> YASM, so we can generate Win32 objects using the NCG with no
>>>>> changes to the syntax. Some changes to directives (eg.
>>>>> section names) will probably be required.
>> I tested out the 0.5.0 build of yasm on assembler output from GHC
>> 6.6 and yasm chokes on expressions like this:
>> _Main_main_srt - (_Main_main_info) + 0
>> It gives the error "expression too complex," which I tracked to a
>> function in the yasm source file libyasm/value.c. I am still
>> looking into it.
> It's possible that we need to optimise away the '+ 0' part there.
That was my first guess but when I modified the asm file by changing
the '+0' to '+ 2' or by deleting it yasm still gave me the
"expression too complex" error for all output formats except the
default (flat binary). It seems odd and gas has no problem with the
same file (a simple ghc 6.6 assembler output of the "hello world"
program), so I am still looking into it.
More information about the Cvs-ghc