aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/asm-function-11.C
blob: c46d4c5a292d6f855b4b84fa6b3edc292fed6427 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* APPLE LOCAL file CW asm blocks */
/* { dg-do assemble { target powerpc*-*-darwin* } } */
/* { dg-options "-fasm-blocks" } */

struct tDummyStruct
{
	unsigned long fDummy;
	unsigned long fSample;
};

asm void foo()
{
	lwz		r1,-8+tDummyStruct.fSample(r2)
	stw		r1,-8+tDummyStruct.fSample(r2)
	lwz		r1,-8-(tDummyStruct.fSample-tDummyStruct.fDummy)(r2)
	stw		r1,-8-(tDummyStruct.fSample-tDummyStruct.fDummy)(r2)
}

int main (int argc, char * const argv[]) 
{
	foo();
}