URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr39911.c] - Rev 378
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do assemble } */ /* { dg-options "-O2" } */ void bar1 () { char foo; asm volatile ("mov%z0 %1, %0": "=m" (foo): "iq" (-23)); asm volatile ("add%z0 %1, %0": "+m" (foo): "iq" (23)); asm volatile ("mov%z0 %1, %0": "=q" (foo): "iq" (-23)); asm volatile ("add%z0 %1, %0": "+q" (foo): "iq" (23)); } void bar2 () { short foo; asm volatile ("mov%z0 %1, %0": "=m" (foo): "ir" (-23)); asm volatile ("add%z0 %1, %0": "+m" (foo): "ir" (23)); asm volatile ("mov%z0 %1, %0": "=r" (foo): "ir" (-23)); asm volatile ("add%z0 %1, %0": "+r" (foo): "ir" (23)); asm volatile ("pop%z0 %0": "=m" (foo)); asm volatile ("pop%z0 %0": "=r" (foo)); } void bar3 () { int foo; asm volatile ("mov%z0 %1, %0": "=m" (foo): "ir" (-23)); asm volatile ("add%z0 %1, %0": "+m" (foo): "ir" (23)); asm volatile ("mov%z0 %1, %0": "=r" (foo): "ir" (-23)); asm volatile ("add%z0 %1, %0": "+r" (foo): "ir" (23)); if (sizeof (void *) == sizeof (int)) { asm volatile ("pop%z0 %0": "=m" (foo)); asm volatile ("pop%z0 %0": "=r" (foo)); } } void bar4 () { if (sizeof (void *) == sizeof (long long)) { long long foo; asm volatile ("mov%z0 %1, %0": "=m" (foo): "er" (-23)); asm volatile ("add%z0 %1, %0": "+m" (foo): "er" (23)); asm volatile ("mov%z0 %1, %0": "=r" (foo): "er" (-23)); asm volatile ("add%z0 %1, %0": "+r" (foo): "er" (23)); asm volatile ("pop%z0 %0": "=m" (foo)); asm volatile ("pop%z0 %0": "=r" (foo)); } }
Go to most recent revision | Compare with Previous | Blame | View Log