3 #include "tls-macros.h"
6 /* One define int variable, two externs. */
11 extern int in_dso (void);
19 /* Get variables using initial exec model. */
20 fputs ("get sum of foo and bar (IE)", stdout
);
21 asm ("" ::: "memory");
24 printf (" = %d\n", *ap
+ *bp
);
25 result
|= *ap
+ *bp
!= 3;
28 printf ("foo = %d\n", *ap
);
33 printf ("bar = %d\n", *bp
);
38 /* Get variables using generic dynamic model. */
39 fputs ("get sum of foo and bar and baz (GD)", stdout
);
43 printf (" = %d\n", *ap
+ *bp
+ *cp
);
44 result
|= *ap
+ *bp
+ *cp
!= 6;
47 printf ("foo = %d\n", *ap
);
52 printf ("bar = %d\n", *bp
);
57 printf ("baz = %d\n", *cp
);