search for: struct_member_no_1

Displaying 1 result from an estimated 1 matches for "struct_member_no_1".

2014 Apr 17
2
[LLVMdev] More Qs about llvm IR to access struct fields
...asing easiness for me to produce, but decreasing, by my guess, useful information content for llvm. Also, I understand 3) would be the only way, if c3 didn't start and end on byte boundaries. ; 1) Use a struct field number: %1 = getelementptr { i16, i8, i8 }* %STvar i32 0, i32 1 ; {i8*}: &struct_member_no_1 %2 = load i8* %1 ; 2) Use a byte number: %3 = getelementptr [ 4 x i8 ]* %STvar i32 0, i32 2 ; {i8*}: &byte_number_2 %4 = load i8* %3 ; 3) Use a word number, then shift & mask within: %5 = getelementptr [ 1 x i32 ]* %STvar i32 0, i32 0 ; {i32*}: &word_number_0 %6 = load i32* %...