Displaying 4 results from an estimated 4 matches for "firststru".
2009 Jun 08
3
[LLVMdev] Structure alignment
%FIRSTSTRU = type { i32, double, i32, i8* }
struct {
int var1;
double var2;
int var3;
char *var4;
}firstStru ;
Could someone help?
If, running a application in windows with MSVC, I allocate a memmory buffer and call a LLVM
function with such buffer, there's a structure alignment problem...
2009 Jun 04
0
[LLVMdev] Structure Alignment
...call should use the #pragma directive.
If I change the llvm layout f64:64:64, the LLVM calls C functions and
the struct is OK, in the C side, but the getelemntptr fails in LLVM side.
Is there on way to ensure that the LLVM reads the correct memory position
in this case?
//#pragma pack(4)
struct xfirstStru
{
int var1;
double var2;
int var3;
char *var4;
};
typedef struct xfirstStru osX ;
typedef struct xfirstStru* PosX ;
//#pragma pack()
//
extern "C" int testOSX( PosX osx )
{
printf("\nChamada C %d %f %d %s",++o...
2009 Jun 09
1
[LLVMdev] Structure alignment
...ment
To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu>
Message-ID:
<f5aa3e9b0906081415oa706eadh21a7814c0f95e006 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
On Mon, Jun 8, 2009 at 1:53 PM, Manoel Teixeira<manoel at fonetica.com.br> wrote:
>
> %FIRSTSTRU = type { i32, ?double, i32, i8* }
>
> struct ?{
> ? ? ? ?int ? ? ? ? ? ? ? ? ? ? ? ? ? ? var1;
> ? ? ? ?double ? ? ? ? ? ? ? ? ?var2;
> ? ? ? ?int ? ? ? ? ? ? ? ? ? ? ? ? ? ? var3;
> ? ? ? ?char ? ?*var4;
> }firstStru ;
>
> Could someone help?
> If, running a applicati...
2009 Jun 04
1
[LLVMdev] Structure Alignment
struct xfirstStru
{
int var1;
double var2;
int var3;
char *var4;
};
%FIRSTSTRU_PLUSPLUS_TOTVS. = type { i32, double, i32, i8* }
Hi,
I had not applied the layout at run time, only during the emission of the .bc.
Now it's running ok when I allocate the...