mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-31 14:01:18 +08:00
Further simplify power6 wordcopy by removing switch statements.
This fix replaces switch statements that contain individual [fwd|bwd]_align_merge (<constant>) calls with a single [fwd|bwd]_align_merge (align) call.
This commit is contained in:
parent
b282631e36
commit
6b652f46c3
@ -1,3 +1,12 @@
|
||||
2012-04-18 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/power6/wordcopy.c
|
||||
(_wordcopy_fwd_dest_aligned): Replace switch with a parameterized
|
||||
fwd_align_merge macro call.
|
||||
(_wordcopy_bwd_dest_aligned): Replace switch with a parameterized
|
||||
bwd_align_merge macro call.
|
||||
* sysdeps/powerpc/powerpc32/power6/wordcopy.c: Likewise.
|
||||
|
||||
2012-04-18 Will Schmidt <will_schmidt@vnet.ibm.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/power6/wordcopy.c: Add fwd_align_merge and
|
||||
|
@ -115,18 +115,7 @@ _wordcopy_fwd_dest_aligned (dstp, srcp, len)
|
||||
len -= 1;
|
||||
}
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case 1:
|
||||
fwd_align_merge (1);
|
||||
break;
|
||||
case 2:
|
||||
fwd_align_merge (2);
|
||||
break;
|
||||
case 3:
|
||||
fwd_align_merge (3);
|
||||
break;
|
||||
}
|
||||
fwd_align_merge (align);
|
||||
|
||||
}
|
||||
|
||||
@ -224,16 +213,5 @@ _wordcopy_bwd_dest_aligned (dstp, srcp, len)
|
||||
len -= 1;
|
||||
}
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case 1:
|
||||
bwd_align_merge (1);
|
||||
break;
|
||||
case 2:
|
||||
bwd_align_merge (2);
|
||||
break;
|
||||
case 3:
|
||||
bwd_align_merge (3);
|
||||
break;
|
||||
}
|
||||
bwd_align_merge (align);
|
||||
}
|
||||
|
@ -115,30 +115,7 @@ _wordcopy_fwd_dest_aligned (dstp, srcp, len)
|
||||
len -= 1;
|
||||
}
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case 1:
|
||||
fwd_align_merge (1);
|
||||
break;
|
||||
case 2:
|
||||
fwd_align_merge (2);
|
||||
break;
|
||||
case 3:
|
||||
fwd_align_merge (3);
|
||||
break;
|
||||
case 4:
|
||||
fwd_align_merge (4);
|
||||
break;
|
||||
case 5:
|
||||
fwd_align_merge (5);
|
||||
break;
|
||||
case 6:
|
||||
fwd_align_merge (6);
|
||||
break;
|
||||
case 7:
|
||||
fwd_align_merge (7);
|
||||
break;
|
||||
}
|
||||
fwd_align_merge (align);
|
||||
|
||||
}
|
||||
|
||||
@ -236,28 +213,5 @@ _wordcopy_bwd_dest_aligned (dstp, srcp, len)
|
||||
len -= 1;
|
||||
}
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case 1:
|
||||
bwd_align_merge (1);
|
||||
break;
|
||||
case 2:
|
||||
bwd_align_merge (2);
|
||||
break;
|
||||
case 3:
|
||||
bwd_align_merge (3);
|
||||
break;
|
||||
case 4:
|
||||
bwd_align_merge (4);
|
||||
break;
|
||||
case 5:
|
||||
bwd_align_merge (5);
|
||||
break;
|
||||
case 6:
|
||||
bwd_align_merge (6);
|
||||
break;
|
||||
case 7:
|
||||
bwd_align_merge (7);
|
||||
break;
|
||||
}
|
||||
bwd_align_merge (align);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user