5 #include "tls-macros.h"
8 /* One define int variable, two externs. */
13 extern int in_dso (void);
21 /* Get variables using initial exec model. */
22 fputs ("get sum of foo and bar (IE)", stdout
);
23 asm ("" ::: "memory");
26 printf (" = %d\n", *ap
+ *bp
);
27 result
|= *ap
+ *bp
!= 3;
30 printf ("foo = %d\n", *ap
);
35 printf ("bar = %d\n", *bp
);
40 /* Get variables using generic dynamic model. */
41 fputs ("get sum of foo and bar and baz (GD)", stdout
);
45 printf (" = %d\n", *ap
+ *bp
+ *cp
);
46 result
|= *ap
+ *bp
+ *cp
!= 6;
49 printf ("foo = %d\n", *ap
);
54 printf ("bar = %d\n", *bp
);
59 printf ("baz = %d\n", *cp
);