[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] jmp_buf align problem on win64
From: |
Christian Jullien |
Subject: |
[Tinycc-devel] jmp_buf align problem on win64 |
Date: |
Wed, 2 Dec 2009 18:17:25 +0100 |
Hi all,
Today I managed to try tcc on win64 (i.e. tcc generates 64bit .exe)
I bootstrapped tcc with a recent gcc win64 and got a workable tcc that
compiles my OpenLisp quietly (www.eligis.com). It eventually runs but
crashes depending on jmp_buf stack alignment. Very often, I found that
64bits processors require that jmp_buf are aligned to 16 bytes boundary.
I checked with typedef _CRT_ALIGN(16) struct _JUMP_BUFFER with no success.
- Works:
#include <setjmp.h>
int
main()
{
jmp_buf buf;
setjmp( buf );
printf("%x\n", _JBLEN);
}
- Fails:
#include <setjmp.h>
int
main()
{
char *p; // add 8 bytes
jmp_buf buf;
setjmp( buf );
printf("%x\n", _JBLEN);
}
- Works
#include <setjmp.h>
int
main()
{
char *p; // add 8 bytes
char *p1; // add 8+8 = 16 bytes
jmp_buf buf;
setjmp( buf );
printf("%x\n", _JBLEN);
}
- [Tinycc-devel] master updated, grischka, 2009/12/01
- [Tinycc-devel] jmp_buf align problem on win64,
Christian Jullien <=
- Re: [Tinycc-devel] jmp_buf align problem on win64, grischka, 2009/12/02
- RE: [Tinycc-devel] jmp_buf align problem on win64, Christian Jullien, 2009/12/03
- Re: [Tinycc-devel] jmp_buf align problem on win64, ketmar, 2009/12/03
- RE: [Tinycc-devel] jmp_buf align problem on win64, Christian Jullien, 2009/12/03
- Re: [Tinycc-devel] jmp_buf align problem on win64, ketmar, 2009/12/03
- Re: [Tinycc-devel] jmp_buf align problem on win64, grischka, 2009/12/03
- RE: [Tinycc-devel] jmp_buf align problem on win64, Christian Jullien, 2009/12/03
- Re: [Tinycc-devel] jmp_buf align problem on win64, grischka, 2009/12/06
- RE: [Tinycc-devel] jmp_buf align problem on win64, Christian Jullien, 2009/12/06
- [Tinycc-devel] Thanks Grischka for new __TINYC__ behavior, Christian Jullien, 2009/12/07