Displaying 3 results from an estimated 3 matches for "an_int_field".
Did you mean:
a_int_field
2012 Oct 12
2
[LLVMdev] Target backend not converting char* to struct properly.
I'm having trouble getting my backend to properly treat the situation where
a char* is converted into a struct, i.e. something like:
char* pointer_representation = ...;
MyStruct* my_struct = (MyStruct*) pointer_representation;
my_struct->an_int_field = 5;
When this occurs, LLVM seems to fold the struct and char* into one assembly
'object', which is perfectly fine. However, it also keeps the 1-alignment
of the char array, which is not ok, as then the assignment (store) to the
'an_int_field' gets converted into a 4-byte aligned s...
2012 Oct 12
0
[LLVMdev] Target backend not converting char* to struct properly.
...at gmail.com> wrote:
> I'm having trouble getting my backend to properly treat the situation where
> a char* is converted into a struct, i.e. something like:
>
> char* pointer_representation = ...;
> MyStruct* my_struct = (MyStruct*) pointer_representation;
> my_struct->an_int_field = 5;
>
> When this occurs, LLVM seems to fold the struct and char* into one assembly
> 'object', which is perfectly fine. However, it also keeps the 1-alignment of
> the char array, which is not ok, as then the assignment (store) to the
> 'an_int_field' gets converted...
2012 Oct 12
1
[LLVMdev] Target backend not converting char* to struct properly.
...I'm having trouble getting my backend to properly treat the situation
> where
> > a char* is converted into a struct, i.e. something like:
> >
> > char* pointer_representation = ...;
> > MyStruct* my_struct = (MyStruct*) pointer_representation;
> > my_struct->an_int_field = 5;
> >
> > When this occurs, LLVM seems to fold the struct and char* into one
> assembly
> > 'object', which is perfectly fine. However, it also keeps the
> 1-alignment of
> > the char array, which is not ok, as then the assignment (store) to the
> > ...