This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: powerpc & unaligned block moves with fp registers



> > 	What is your definition of "unaligned"?  Anything other than
> > natural alignment?
> 
> The intent is "anything that causes a trap".

Here's an example:

typedef struct {
  char a[8];
} X;

static char v[1] = { 3 };
static X i = {1}, j = {2};

foo()
{
  i = j;
}

./cc1 -quiet -O2 -mno-strict-align dj.c

trimmed output:

	.section	".data"
	.align 2
v:
	.byte 3
i:
	.byte 1
	.space	7
j:
	.byte 2
	.space	7
	.section	".text"
	.align 2
foo:
	lis 9,j@ha
	la 9,j@l(9)
	lfd 0,0(9)
	lis 9,i@ha
	la 9,i@l(9)
	stfd 0,0(9)
	blr


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]