Matthew Huck
2012-Apr-05 01:43 UTC
[LLVMdev] Difference between 2.9 and 3.0 in intel ASM printer
Hi, I'm almost there with my Yasm printer, however, I've stumbled upon this. Using this: ; ModuleID = 'data.u' %window = type { %visobj, %vec2, %vec2, %vec2, %string, %color, i32, i32, %string, %string, %string, i1, i1, i1, i1, i1, i1, i32, i8* } %visobj = type { %object, i1, i1, i1, i1, %color, %vec4, %vec4, %vec4, %vec4, i32, %mat4, %mat4, %mat4, %mat4, %material*, %effect*, i32, i32, i32, float, i8, %visobj*, %vec3, %vec3, %vec3, %vec3, %vec3, %vec3, %quat, float, float, float, float, float, float, %map, i8* } %object = type { i8, i8, i8, i8, i8, i8, i8, i8, %string, %string, i8* } %string = type { i8* } %color = type { i8, i8, i8, i8 } %vec4 = type { float, float, float, float } %mat4 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, i8 } %material = type { %object, %color, %color, %color, %color, float, float, %texture, %texture, %texture, %texture, %effect*, i32, i32, i1, i32, i32, i1, i1, i8* } %texture = type { %object, float, float, %vec3, %vec3, %vec3, i1, i1, i1, i1, i1, i1, i8* } %vec3 = type { float, float, float } %effect = type { %object, i1, i1, i32, i32, i32, i32, i8* } %quat = type { float, float, float, float } %map = type { i8*, i32, i8* } %vec2 = type { float, float } %program = type { %object, %string, %string, %list, i8*, i32 } %list = type { i8, i8, i8, i8 } @G__window__PZ6window = external global %window @G__program__PZ7program = external global %program @"data.u\00" = internal constant [7 x i8] c"data.u\00" @g_touch_window_y = global i32 0 @_language_text = global %string zeroinitializer @"Hello\00" = internal constant [6 x i8] c"Hello\00" @is_foreign_lang = global i1 false @"english\00" = internal constant [8 x i8] c"english\00" @"cstr\00" = internal constant [5 x i8] c"cstr\00" declare %string* @to__PZ6string__PKc(i8*) nounwind declare void @AddPointer__v__iPKci(i32, i8*, i32) nounwind declare void @dL__v__PZ6string(%string*) nounwind declare zeroext i1 @ne__b__PZ6stringPZ6string(%string*, %string*) nounwind declare void @aS__v__PZ6stringPKc(%string*, i8*) nounwind declare void @C1__v__PZ6string(%string*) nounwind define i32 @main__i__v() nounwind { locals: store i8* getelementptr inbounds ([7 x i8]* @"data.u\00", i32 0, i32 0), i8** getelementptr inbounds (%program* @G__program__PZ7program, i32 0, i32 4) %0 = load float* getelementptr inbounds (%window* @G__window__PZ6window, i32 0, i32 1, i32 1) %1 = fptosi float %0 to i64 %2 = trunc i64 %1 to i32 store i32 %2, i32* @g_touch_window_y store i32 2, i32* getelementptr inbounds (%program* @G__program__PZ7program, i32 0, i32 5) tail call void @C1__v__PZ6string(%string* @_language_text) nounwind tail call void @aS__v__PZ6stringPKc(%string* @_language_text, i8* getelementptr inbounds ([6 x i8]* @"Hello\00", i32 0, i32 0)) nounwind store i32 3, i32* getelementptr inbounds (%program* @G__program__PZ7program, i32 0, i32 5) %3 = tail call %string* @to__PZ6string__PKc(i8* getelementptr inbounds ([8 x i8]* @"english\00", i32 0, i32 0)) %4 = tail call i1 @ne__b__PZ6stringPZ6string(%string* @_language_text, %string* %3) nounwind store i1 %4, i1* @is_foreign_lang tail call void @dL__v__PZ6string(%string* %3) nounwind ret i32 0 } define void @typesInit__v__v() nounwind { entry: tail call void @AddPointer__v__iPKci(i32 1927, i8* getelementptr inbounds ([5 x i8]* @"cstr\00", i32 0, i32 0), i32 -59) nounwind ret void } The intel asm printer in 2.9 would emit: mov BYTE PTR [RIP + _is_foreign_lang], AL for the store i1 %4, i1* @is_foreign_lang yet, 3.0 emits: mov _is_foreign_lang, AL Now, I've tried diffing 2.9 and 3.0, there is a lot of changes, could someone give me a hint as to where to look? Thanks in advance Matthew. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120405/b62f007c/attachment.html>