Asm blocks not working?
Asm blocks not working?
- Subject: Asm blocks not working?
- From: Jeremy Sagan <email@hidden>
- Date: Sat, 09 Jul 2005 16:44:18 -0400
<x-tad-smaller>I cannot get asm blocks to work at all with xcode 2.1. Included is an example. I get the same result with any file that contains an asm block. I cannot understand why I would get the error "</x-tad-smaller><x-tad-smaller>error: 'asm' undeclared (first use in this function)" </x-tad-smaller><x-tad-smaller>as seen below. I have codewarrior style asm blocks checked in my target and "</x-tad-smaller><x-tad-smaller>-fasm-blocks" </x-tad-smaller><x-tad-smaller>clearly appears in the gcc 4.0 parameter list.
Obviously the asm code written below is not good but I am just trying to get the asm blocks to work with GCC 4.0. Why do asm blocks not work for me?
Begin asmtest.c
</x-tad-smaller>static long asmTest(void)
{
register long src, temp;
asm
{
srawi temp,src,16
}
return (temp);
}
<x-tad-smaller>End asmtest.c
Native Build of Target "Metro SE Debug" using Build Configuration "Imported CodeWarrior Settings"
</x-tad-smaller><x-tad-smaller>
CompileC "build/Metro.build/Imported CodeWarrior Settings/Metro SE Debug.build/Objects-normal/ppc/asmtest.o" ../Source/asmtest.c normal ppc c com.apple.compilers.gcc.4_0
mkdir "/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Metro.build/Imported CodeWarrior Settings/Metro SE Debug.build/Objects-normal/ppc"
cd /Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO
setenv MACOSX_DEPLOYMENT_TARGET 10.2
/usr/bin/gcc-4.0 -x c -arch ppc -pipe -std=c99 -Wno-trigraphs -fpascal-strings -fasm-blocks -g -Os -fwritable-strings -Wmissing-prototypes -Wunused-variable -fmessage-length=0 -mtune=G3 -fvisibility=hidden "-I/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Metro.build/Imported CodeWarrior Settings/Metro SE Debug.build/Metro SE.hmap" -mdynamic-no-pic "-F/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Imported CodeWarrior Settings" "-I/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Imported CodeWarrior Settings/include" "-I/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Metro.build/Imported CodeWarrior Settings/Metro SE Debug.build/DerivedSources" -fno-inline -malign-mac68k -fno-inline-functions -include /Library/Caches/com.apple.Xcode.501/SharedPrecompiledHeaders/MetroMachOHeadersSE-azuvftntvmzafkcvooojzgenahdx/MetroMachOHeadersSE.pch -c /Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c -o "/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/build/Metro.build/Imported CodeWarrior Settings/Metro SE Debug.build/Objects-normal/ppc/asmtest.o"
</x-tad-smaller><x-tad-smaller>/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c: In function 'asmTest':
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:5: error: 'asm' undeclared (first use in this function)
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:5: error: (Each undeclared identifier is reported only once
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:5: error: for each function it appears in.)
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:5: error: parse error before '{' token
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:3: warning: unused variable 'temp'
/Volumes/Itchy/Development/MetroC/Metro6.3.1XC/MetroMachO/../Source/asmtest.c:3: warning: unused variable 'src'</x-tad-smaller> _______________________________________________
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