This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

New Port Suggestion


I have an idea for a Windows port of GCC that is acturally NATIVE and dosen't require GNU binutils. The arch would be "i?86-microsoft-windows32". The compiler would generate code for the Microsoft Assembler (MASM.EXE) and link MASM's object files with the Microsoft Incremental Linker (LINK.EXE). I've used that assembler and found that most "regular" x86 code will work with it by prepending this:
    .486
    .model flat, stdcall
    option casemap :none
    include \masm32\include\windows.inc
    include \masm32\include\masm32.inc
    include \masm32\include\gdi32.inc
    include \masm32\include\user32.inc
    include \masm32\include\kernel32.inc
    include \masm32\include\Comctl32.inc
    include \masm32\include\comdlg32.inc
    include \masm32\include\shell32.inc
    include \masm32\include\oleaut32.inc
    includelib \masm32\lib\masm32.lib
    includelib \masm32\lib\gdi32.lib
    includelib \masm32\lib\user32.lib
    includelib \masm32\lib\kernel32.lib
    includelib \masm32\lib\Comctl32.lib
    includelib \masm32\lib\comdlg32.lib
    includelib \masm32\lib\shell32.lib
    includelib \masm32\lib\oleaut32.lib
    .data
    .code
start:
As far as I'm concerned, adding
Call main
end start
will do the trick. But all routines (I think that's what there called) must have "end routinename" under them. To use the x86 FPU instructions this will have to be added:
    include \masm32\include\fpu.inc
    includelib \masm32\lib\fpu.lib
That's all the information I can offer for that possible port. The executables needed could nibbled from bin/LINK.EXE and bin/ML.EXE. I thing an experimental port should be added.

Samue; Lauber
-- 
_____________________________________________________________
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.

Powered by Outblaze


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]