• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Intel syntax in Xcode 2.3
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Intel syntax in Xcode 2.3


  • Subject: Re: Intel syntax in Xcode 2.3
  • From: Eric Albert <email@hidden>
  • Date: Sun, 27 Aug 2006 12:15:18 -0700

On Aug 27, 2006, at 10:21 AM, Chris Espinosa wrote:

On Aug 27, 2006, at 9:55 AM, Brad Oliver wrote:

On Aug 26, 2006, at 9:16 PM, Jason Foreman wrote:

GCC uses AT&T syntax rather than Intel syntax.  So I think rather than

I was under the impression that when "CodeWarrior style" assembly is enabled, for x86 it instead uses Intel-style. Is that not true?

No, you're thinking of PPC asm.  For Intel-style assembly source, you need to enable nasm.

Actually, Brad's right.  -fasm-blocks in Apple's gcc enables Intel-style (more specifically, Visual Studio-style) inline asm when you're building for Intel:

Erics-MacBook-Pro:~> cat test.c
int main(void) {
        asm {
                mov eax, dword ptr[ebx]
        }
        return 0;
}
Erics-MacBook-Pro:~> gcc -Wall -g -o test test.c
test.c: In function 'main':
test.c:2: error: asm blocks not enabled, use `-fasm-blocks'
test.c:3: error: 'mov' undeclared (first use in this function)
test.c:3: error: (Each undeclared identifier is reported only once
test.c:3: error: for each function it appears in.)
test.c:3: error: parse error before 'eax'
Erics-MacBook-Pro:~> gcc -fasm-blocks -Wall -g -o test test.c
Erics-MacBook-Pro:~>

-Eric

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Intel syntax in Xcode 2.3 (From: Brad Oliver <email@hidden>)
 >Re: Intel syntax in Xcode 2.3 (From: Brad Oliver <email@hidden>)
 >Re: Intel syntax in Xcode 2.3 (From: Chris Espinosa <email@hidden>)

  • Prev by Date: Re: try/catch/throw/finally example?
  • Next by Date: Re: Best approach for customized project templates?
  • Previous by thread: Re: Intel syntax in Xcode 2.3
  • Next by thread: Best approach for customized project templates?
  • Index(es):
    • Date
    • Thread