Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mac OS X asm syntax vs Linux asm syntax



On Tuesday, Jun 24, 2003, at 07:26 US/Eastern, Michael Dales wrote:

Andrew Pinski <email@hidden> writes:

On Monday, Jun 23, 2003, at 11:18 US/Eastern, Pierre d'Herbemont wrote:

Hi,

I would like to know why is there differences between Mac OS X and
Linux PowerPC assembler syntax. For example this is not working fine
on Mac OS X:
lis 9,imports+32@ha
you will have to change this to:
lis r9, ha16(imports+32)
Are there some settings you can change to enable Linux syntax on Mac
OS X.

No because Linux and Darwin uses two different file formats and ABI's
for executables.
You should use two different files for Darwin and Linux.

I know that the asm files shouldn't be used directly for each
platform, but I do with there was a consistant asm format in gcc. It's
a pain to have to remember all the different styles.


But I think the main reason why they are different is because PIC code generation is different.
GCC has nothing to do with the difference in asm format any way, it is the assembler which causes
this difference. The different styles are caused by mach-o being different than elf.
In fact on AIX there is even another style but it is like the sysv style.
You can use the c preprocessor for the differences if you like.

Thanks,
Andrew Pinski
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.