cputointel

Here you can discuss ReactOS related topics.

Moderator: Moderator Team

Karl
Posts: 19
Joined: Sun Jan 07, 2007 7:04 am

Post by Karl »

looks good.

Let's test scalability by dumping mac OS in there :P
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

lates version in my local tree of same file

; OS type : IMAGE_SUBSYSTEM_WINDOWS_GUI
; CPU found POWERPC
BITS 32
GLOBAL _main
SECTION .text

; compile with nasm filename.asm -f win32, ld filename.obj -o filename.exe

_main:
; Start the program
xor eax,eax
ret
hto
Developer
Posts: 2193
Joined: Sun Oct 01, 2006 3:43 pm

Post by hto »

How about conversion from machine language into C? Then C compiler can compile that code for any other architecture.

Or convert into intermediate language and then use GCC backend. It can do register allocation, optimization, etc. - and you should not care about such things.
oiaohm
Posts: 1322
Joined: Sun Dec 12, 2004 8:40 am

Post by oiaohm »

Not possible to covert to C without massive processing.

There is no dissemble I know that can do the reverse effectively from machine to C.

gimple and llvm systems are both possiable for asm optimizations.

I will leave it to GreatLord to consider if either of those is suitable.
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

It is posible to convert back to C but it req write a anaylising process
that detect for loop, while loop and other thing. and it is not easy write one. and often end back to bad crapy code. and I will not write such thing for it take years to get it right
cmoibenlepro
Posts: 483
Joined: Tue Nov 30, 2004 5:44 pm
Location: Canada

Post by cmoibenlepro »

Isn't the compiler job to compile your C code into asm?
GreatLord
Developer
Posts: 926
Joined: Tue Nov 30, 2004 10:26 am
Location: Sweden

Post by GreatLord »

yes it is c compiler work to compile to C

but the question was if it was posible to convert a asm to c
Post Reply

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot], DotBot [Crawler] and 1 guest