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
|