Hi Brian,

Thanks for that, having slept on it I think you're right. My concern,
waking up this morning and thinking about it was not generating assembly
from C code (this is a case of applying specs) but producing something
that is optimised - a key part of writing anything that relies on speed,
really. The first part would be work enough - optimising it would be
even more difficult.

It would also give us two projects to debug... pcc or bsdnt, depending
on what was going on. This could of course be the case anyway (say
mpir/gcc) but with established projects (on the compiler side) there are
at least some understood bugs/workarounds and lots of knowledgeable
people within easy reach.

So unless someone wants to help, I'm not so sure about pcc on win64?
Again, not to be negative but it's not a job I can do in my spare time
alone and finish fast enough!

We do, of course, still have the msvc toolchain to support, potentially
icc (if someone has a windows license).

As I understand it, mingw (gcc on windows) has the same problem - it
doesn't support x86-64 compilation. I'm not 100% on that - last I tried
msys on win64 was about two years ago and back then msys itself just seg
faulted when you tried to run it so you had to set up all the paths by
hand...

Antony

On 05/17/2010 07:47 AM, Cactus wrote:
> 
> 
> On May 17, 12:04 am, Antony Vennard <antony.venn...@gmail.com> wrote:
>> Hi All,
>>
>> Regarding BSDNT (BSD Licensed MPIR) I think Bill mentioned targetting
>> pcc earlier on in conversation (cl/icc/gcc have also been mentioned as I
>> remember it). One thing that was suggested was porting pcc to Win64,
>> something I've been having a look at (which is what happens when your
>> primary contract is web design... you go LOOKING at compiler source).
>>
>> Anyway - the Win32 build process is via pcc/os/win32/build.bat which
>> targets i386 win32. In terms of building the compiler, most of it
>> compiles correctly under MSVC 64 bit (Win7SDK x64 tools) with the
>> exception of two parts:
>> * ../../../pcc-libs/libpcc/_ftol.asm, a MASM 32-bit "ftol" function
>> (float to long I think, from the instructions). This doesn't assemble
>> under ml64 which seems to have trouble understanding the ml syntax.
>> * ../../../pcc-libs/libpcc/_alloca.asm, an implementation of alloca for
>> pcc which allows memory allocation on the stack.
>>
>> These two pieces seem to hold up the build for the entire project - not
>> unsurprisingly, really.
>>
>> Successfully converting these files to win64 would build us a 64bit PE
>> that compiles 32-bit obj. I believe pcc does not link but relies instead
>> on external linkers to turn translation units into PE/DLL/LIB as
>> necessary. Which means, the missing piece is creating 64-bit objects
>> compatible with the win64 ABI. I've not got this far yet as this was a
>> two-hour nosey last night.
> 
> Hi Antony,
> 
> From what you say, it should not be too hard to get a 64-bit version
> of pcc that builds 32-bit Windows applications.
> 
> My guess is that we should be able to find or produce the two broken
> assembler files.
> 
> Unfortunately, however, there will be a lot of work involved in
> buildinng for x64 since the ABI conventions are very different.
> 
> The compiler will need to take account of different register use in
> calls, different scratch register lists, different stack use, function
> generation in two different function classes (frame and leaf
> functions), frame function prologues and epilogues (with the
> generation of function annotation code) and stack unwiding support.
> And, of course, entirely new code generation and optimisation to take
> account of x64 instruction sets for an expanding range of x64
> architectures.
> 
> In my view this is a BIG job.   I don't want to put you off as it
> would be a great contribution. But I don't want you to underestimate
> the scale of the task.
> 
>     Brian
> 

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-de...@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to