aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr44281.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr44281.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr44281.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr44281.c b/gcc/testsuite/gcc.target/i386/pr44281.c
new file mode 100644
index 00000000000..e8e9edef319
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr44281.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-std=gnu99 -O2" } */
+/* { dg-final { scan-assembler "salq\[ \\t\]+\\\$8, %rbx" } } */
+
+#include <stdint.h>
+
+register uint64_t global_flag_stack __asm__("rbx");
+
+void push_flag_into_global_reg_var(uint64_t a, uint64_t b) {
+ uint64_t flag = (a==b);
+ global_flag_stack <<= 8;
+ global_flag_stack |= flag;
+}