* Some fixes for 64bit AIX on POWER/PowerPC that bring us slightly closer
to working (still having some linking problems) This commit was SVN r4327.
Этот коммит содержится в:
родитель
d5232fccc4
Коммит
e1f2548e07
@ -29,3 +29,4 @@ POWERPC32 default-.text-.globl-:-_-L--0-1-1-1 powerpc32-64-osx
|
|||||||
POWERPC32 default-.text-.globl-:--.L-@-1-1-0-0 powerpc32-linux
|
POWERPC32 default-.text-.globl-:--.L-@-1-1-0-0 powerpc32-linux
|
||||||
POWERPC32 aix-.csect .text[PR]-.globl-:-.-L--0-0-0-0 powerpc32-aix
|
POWERPC32 aix-.csect .text[PR]-.globl-:-.-L--0-0-0-0 powerpc32-aix
|
||||||
POWERPC64 default-.text-.globl-:-_-L--0-1-1-1 powerpc64-osx
|
POWERPC64 default-.text-.globl-:-_-L--0-1-1-1 powerpc64-osx
|
||||||
|
POWERPC64 aix-.csect .text[PR]-.globl-:-.-L--0-1-0-1 powerpc64-aix
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
START_FILE
|
||||||
|
|
||||||
TEXT
|
TEXT
|
||||||
|
|
||||||
ALIGN(4)
|
ALIGN(4)
|
||||||
@ -20,13 +22,13 @@ END_FUNC(ompi_atomic_wmb)
|
|||||||
|
|
||||||
|
|
||||||
START_FUNC(ompi_atomic_cmpset_32)
|
START_FUNC(ompi_atomic_cmpset_32)
|
||||||
1: lwarx r0, 0, r3
|
LSYM(1) lwarx r0, 0, r3
|
||||||
cmpw 0, r0, r4
|
cmpw 0, r0, r4
|
||||||
bne- 2f
|
bne- REFLSYM(2)
|
||||||
stwcx. r5, 0, r3
|
stwcx. r5, 0, r3
|
||||||
bne- 1b
|
bne- REFLSYM(1)
|
||||||
sync
|
sync
|
||||||
2:
|
LSYM(2)
|
||||||
cmpw cr7,r0,r4
|
cmpw cr7,r0,r4
|
||||||
mfcr r3
|
mfcr r3
|
||||||
rlwinm r3,r3,31,1
|
rlwinm r3,r3,31,1
|
||||||
@ -39,9 +41,9 @@ START_FUNC(ompi_atomic_cmpset_acq_32)
|
|||||||
std r29,-24(r1)
|
std r29,-24(r1)
|
||||||
std r0,16(r1)
|
std r0,16(r1)
|
||||||
stdu r1,-144(r1)
|
stdu r1,-144(r1)
|
||||||
bl _ompi_atomic_cmpset_32
|
bl REFGSYM(ompi_atomic_cmpset_32)
|
||||||
mr r29,r3
|
mr r29,r3
|
||||||
bl _ompi_atomic_rmb
|
bl REFGSYM(ompi_atomic_rmb)
|
||||||
mr r3,r29
|
mr r3,r29
|
||||||
addi r1,r1,144
|
addi r1,r1,144
|
||||||
ld r0,16(r1)
|
ld r0,16(r1)
|
||||||
@ -61,11 +63,11 @@ START_FUNC(ompi_atomic_cmpset_rel_32)
|
|||||||
mr r29,r3
|
mr r29,r3
|
||||||
mr r28,r4
|
mr r28,r4
|
||||||
mr r27,r5
|
mr r27,r5
|
||||||
bl _ompi_atomic_wmb
|
bl REFGSYM(ompi_atomic_wmb)
|
||||||
mr r3,r29
|
mr r3,r29
|
||||||
mr r4,r28
|
mr r4,r28
|
||||||
mr r5,r27
|
mr r5,r27
|
||||||
bl _ompi_atomic_cmpset_32
|
bl REFGSYM(ompi_atomic_cmpset_32)
|
||||||
addi r1,r1,160
|
addi r1,r1,160
|
||||||
ld r0,16(r1)
|
ld r0,16(r1)
|
||||||
mtlr r0
|
mtlr r0
|
||||||
@ -77,12 +79,12 @@ END_FUNC(ompi_atomic_cmpset_rel_32)
|
|||||||
|
|
||||||
|
|
||||||
START_FUNC(ompi_atomic_cmpset_64)
|
START_FUNC(ompi_atomic_cmpset_64)
|
||||||
1: ldarx r0, 0, r3
|
LSYM(3) ldarx r0, 0, r3
|
||||||
cmpd 0, r0, r4
|
cmpd 0, r0, r4
|
||||||
bne- 2f
|
bne- REFLSYM(4)
|
||||||
stdcx. r5, 0, r3
|
stdcx. r5, 0, r3
|
||||||
bne- 1b
|
bne- REFLSYM(3)
|
||||||
2:
|
LSYM(4)
|
||||||
xor r3,r4,r0
|
xor r3,r4,r0
|
||||||
subfic r2,r3,0
|
subfic r2,r3,0
|
||||||
adde r3,r2,r3
|
adde r3,r2,r3
|
||||||
@ -95,9 +97,9 @@ START_FUNC(ompi_atomic_cmpset_acq_64)
|
|||||||
std r29,-24(r1)
|
std r29,-24(r1)
|
||||||
std r0,16(r1)
|
std r0,16(r1)
|
||||||
stdu r1,-144(r1)
|
stdu r1,-144(r1)
|
||||||
bl _ompi_atomic_cmpset_64
|
bl REFGSYM(ompi_atomic_cmpset_64)
|
||||||
mr r29,r3
|
mr r29,r3
|
||||||
bl _ompi_atomic_rmb
|
bl REFGSYM(ompi_atomic_rmb)
|
||||||
mr r3,r29
|
mr r3,r29
|
||||||
addi r1,r1,144
|
addi r1,r1,144
|
||||||
ld r0,16(r1)
|
ld r0,16(r1)
|
||||||
@ -117,11 +119,11 @@ START_FUNC(ompi_atomic_cmpset_rel_64)
|
|||||||
mr r29,r3
|
mr r29,r3
|
||||||
mr r28,r4
|
mr r28,r4
|
||||||
mr r27,r5
|
mr r27,r5
|
||||||
bl _ompi_atomic_wmb
|
bl REFGSYM(ompi_atomic_wmb)
|
||||||
mr r3,r29
|
mr r3,r29
|
||||||
mr r4,r28
|
mr r4,r28
|
||||||
mr r5,r27
|
mr r5,r27
|
||||||
bl _ompi_atomic_cmpset_64
|
bl REFGSYM(ompi_atomic_cmpset_64)
|
||||||
addi r1,r1,160
|
addi r1,r1,160
|
||||||
ld r0,16(r1)
|
ld r0,16(r1)
|
||||||
mtlr r0
|
mtlr r0
|
||||||
@ -133,10 +135,10 @@ END_FUNC(ompi_atomic_cmpset_rel_64)
|
|||||||
|
|
||||||
|
|
||||||
START_FUNC(ompi_atomic_add_32)
|
START_FUNC(ompi_atomic_add_32)
|
||||||
1: lwarx r0, 0, r3
|
LSYM(5) lwarx r0, 0, r3
|
||||||
add r0, r4, r0
|
add r0, r4, r0
|
||||||
stwcx. r0, 0, r3
|
stwcx. r0, 0, r3
|
||||||
bne- 1b
|
bne- REFLSYM(5)
|
||||||
|
|
||||||
lwz r3,0(r3)
|
lwz r3,0(r3)
|
||||||
extsw r3,r3
|
extsw r3,r3
|
||||||
@ -145,10 +147,10 @@ END_FUNC(ompi_atomic_add_32)
|
|||||||
|
|
||||||
|
|
||||||
START_FUNC(ompi_atomic_sub_32)
|
START_FUNC(ompi_atomic_sub_32)
|
||||||
1: lwarx r0,0,r3
|
LSYM(6) lwarx r0,0,r3
|
||||||
subf r0,r4,r0
|
subf r0,r4,r0
|
||||||
stwcx. r0,0,r3
|
stwcx. r0,0,r3
|
||||||
bne- 1b
|
bne- REFLSYM(6)
|
||||||
|
|
||||||
lwz r3,0(r3)
|
lwz r3,0(r3)
|
||||||
extsw r3,r3
|
extsw r3,r3
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
sub start_file()
|
sub start_file()
|
||||||
{
|
{
|
||||||
my $ret= "\t.toc\n";
|
my $ret = "";
|
||||||
if ($IS64BIT == 1) {
|
if ($IS64BIT == 1) {
|
||||||
$ret .= "\t.machine \"ppc64\"\n";
|
$ret .= "\t.machine \"ppc64\"\n";
|
||||||
}
|
}
|
||||||
|
$ret .= "\t.toc\n";
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,9 +21,9 @@ sub start_func($)
|
|||||||
$ret .= "$func_name$SUFFIX\n";
|
$ret .= "$func_name$SUFFIX\n";
|
||||||
|
|
||||||
if ($IS64BIT == 1) {
|
if ($IS64BIT == 1) {
|
||||||
$ret .= "\t.llong .$1, TOC[tc0], 0\n";
|
$ret .= "\t.llong .$func_name, TOC[tc0], 0\n";
|
||||||
} else {
|
} else {
|
||||||
$ret .= "\t.long .$1, TOC[tc0], 0\n";
|
$ret .= "\t.long .$func_name, TOC[tc0], 0\n";
|
||||||
}
|
}
|
||||||
$ret .= "\t.csect [PR]\n";
|
$ret .= "\t.csect [PR]\n";
|
||||||
|
|
||||||
|
@ -48,9 +48,13 @@ do "$basedir/$CONFIG.conf" or die "Could not open config file $basedir/$CONFIG.c
|
|||||||
while (<INPUT>) {
|
while (<INPUT>) {
|
||||||
s/TEXT/$TEXT/g;
|
s/TEXT/$TEXT/g;
|
||||||
s/GLOBAL/$GLOBAL/g;
|
s/GLOBAL/$GLOBAL/g;
|
||||||
|
s/REFGSYM\((.*)\)/$GSYM$1/g;
|
||||||
|
s/REFLSYM\((.*)\)/$LSYM$1/g;
|
||||||
s/GSYM\((.*)\)/$GSYM$1$SUFFIX/g;
|
s/GSYM\((.*)\)/$GSYM$1$SUFFIX/g;
|
||||||
s/LSYM\((.*)\)/$LSYM$1$SUFFIX/g;
|
s/LSYM\((.*)\)/$LSYM$1$SUFFIX/g;
|
||||||
|
|
||||||
if ($DEL_R_REG == 0) {
|
if ($DEL_R_REG == 0) {
|
||||||
|
s/cr([0-9][0-9]?)/$1/g;
|
||||||
s/r([0-9][0-9]?)/$1/g;
|
s/r([0-9][0-9]?)/$1/g;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user