Displaying 7 results from an estimated 7 matches for "setjmp6".
Did you mean:
setjmp
2011 Apr 27
0
[LLVMdev] built-in longjmp and setjmp
I have another basic question about setjmp/longjmp.
When I compile and run the following program, is it expected that global
variable gi2 will be incremented twice? It seems that the code generated
with clang and llc increments it only once (line 37-43 of attached file).
$ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple
arm-unknown-darwin -ccc-clang-archs arm
$ llc setjmp6.arm.ll -o setjmp6.arm.s
#include <stdio.h>
#include <stdlib.h>
void *buf[20];
int gi2 = 0;
void __attribute__ ((noinline)) sub2 (void)
{
__builtin_longjmp (buf, 1);
}
int
m...
2011 Apr 27
2
[LLVMdev] built-in longjmp and setjmp
...ther basic question about setjmp/longjmp.
>
> When I compile and run the following program, is it expected that global
> variable gi2 will be incremented twice? It seems that the code generated
> with clang and llc increments it only once (line 37-43 of attached file).
>
> $ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple
> arm-unknown-darwin -ccc-clang-archs arm
> $ llc setjmp6.arm.ll -o setjmp6.arm.s
>
>
> #include <stdio.h>
> #include <stdlib.h>
> void *buf[20];
>
> int gi2 = 0;
>
>
> void __attribute__ ((noinli...
2011 Apr 13
3
[LLVMdev] built-in longjmp and setjmp
On Apr 13, 2011, at 9:51 AM, Akira Hatanaka wrote:
> int
> main (int argc, char** argv)
> {
> int n = atoi(argv[1]), r;
>
> if ((r = setjmp (buf)))
> {
> printf("n = %d\n", n);
> return 0;
> }
Non-volatile local variables are not preserved by setjmp(), so this program can print whatever it wants.
/jakob
2011 Apr 27
3
[LLVMdev] built-in longjmp and setjmp
...about setjmp/longjmp.
> >
> > When I compile and run the following program, is it expected that global
> variable gi2 will be incremented twice? It seems that the code generated
> with clang and llc increments it only once (line 37-43 of attached file).
> >
> > $ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple
> arm-unknown-darwin -ccc-clang-archs arm
> > $ llc setjmp6.arm.ll -o setjmp6.arm.s
> >
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > void *buf[20];
> >
> > int gi2 = 0;
&g...
2011 Apr 27
0
[LLVMdev] built-in longjmp and setjmp
...ave another basic question about setjmp/longjmp.
>
> When I compile and run the following program, is it expected that global variable gi2 will be incremented twice? It seems that the code generated with clang and llc increments it only once (line 37-43 of attached file).
>
> $ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple arm-unknown-darwin -ccc-clang-archs arm
> $ llc setjmp6.arm.ll -o setjmp6.arm.s
>
>
> #include <stdio.h>
> #include <stdlib.h>
> void *buf[20];
>
> int gi2 = 0;
>
>
> void __attribute__ ((noinli...
2011 Apr 27
0
[LLVMdev] built-in longjmp and setjmp
...question about setjmp/longjmp.
> >
> > When I compile and run the following program, is it expected that global variable gi2 will be incremented twice? It seems that the code generated with clang and llc increments it only once (line 37-43 of attached file).
> >
> > $ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple arm-unknown-darwin -ccc-clang-archs arm
> > $ llc setjmp6.arm.ll -o setjmp6.arm.s
> >
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> > void *buf[20];
> >
> > int gi2 = 0;
> &g...
2011 Apr 27
1
[LLVMdev] built-in longjmp and setjmp
...; > >
> > > When I compile and run the following program, is it expected that
> global variable gi2 will be incremented twice? It seems that the code
> generated with clang and llc increments it only once (line 37-43 of attached
> file).
> > >
> > > $ clang setjmp6.c -o setjmp6.arm.ll -emit-llvm -O3 -S -ccc-host-triple
> arm-unknown-darwin -ccc-clang-archs arm
> > > $ llc setjmp6.arm.ll -o setjmp6.arm.s
> > >
> > >
> > > #include <stdio.h>
> > > #include <stdlib.h>
> > > void *buf[20];
>...