Created
September 19, 2012 15:26
-
-
Save mattmassicotte/3750246 to your computer and use it in GitHub Desktop.
Test input for arm assembly differences
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang -arch armv7 -framework Foundation -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -S arm-test.m -o armv7-test.s | |
#import <Foundation/Foundation.h> | |
int main(const int argc, const char* const* argv) { | |
@autoreleasepool { | |
NSString* string; | |
string = @"hello"; | |
NSLog(@"print: %s", [string UTF8String]); | |
} | |
return 0; | |
} |
Still unsure if ABI is the same...
Take that back, only a little different. Still, interesting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Without optimization, the arm code appears identical. With -O3, the code deviates substantially.