Commit 34a94290 authored by andre's avatar andre
Browse files

[project @ 1997-05-30 21:58:21 by andre]

AIX/RS6000 patches
parent 291b7ab4
...@@ -512,10 +512,6 @@ sub mangle_asm { ...@@ -512,10 +512,6 @@ sub mangle_asm {
# I guess this is never entered, since all _upds are # I guess this is never entered, since all _upds are
# either vtbl_'s or ret_'s, caught above. - andre # either vtbl_'s or ret_'s, caught above. - andre
$chksymb[$i] = ''; $chksymb[$i] = '';
# if ($TargetPlatform =~ /^powerpc-/)
# { $chksymb[$i] = $symbtmp;}
# else { $chksymb[$i] = ''; };
} elsif ( $TargetPlatform =~ /^i386-.*-solaris2/ } elsif ( $TargetPlatform =~ /^i386-.*-solaris2/
&& /^(_uname|uname|stat|fstat):/ ) { && /^(_uname|uname|stat|fstat):/ ) {
...@@ -577,7 +573,6 @@ sub mangle_asm { ...@@ -577,7 +573,6 @@ sub mangle_asm {
# HPPAs, MIPSen: also start medding at chunk 1 # HPPAs, MIPSen: also start medding at chunk 1
# AIX hack for the moment, to join up multiple identical tocs
if ($TargetPlatform =~ /^powerpc|^rs6000/) { if ($TargetPlatform =~ /^powerpc|^rs6000/) {
print OUTASM $T_HDR_toc; # yes, we have to put a .toc print OUTASM $T_HDR_toc; # yes, we have to put a .toc
# in the beginning of every file! # in the beginning of every file!
...@@ -587,6 +582,7 @@ sub mangle_asm { ...@@ -587,6 +582,7 @@ sub mangle_asm {
$chk[$i] =~ s/\[RW\]//g; $chk[$i] =~ s/\[RW\]//g;
$chk[$i] =~ s/\[DS\]//g; $chk[$i] =~ s/\[DS\]//g;
$chk[$i] =~ s/^\.csect .*\[DS\]$//g; $chk[$i] =~ s/^\.csect .*\[DS\]$//g;
if ( $chkcat[$i] eq 'toc' && $chk[$i] !~ /\.byte/ ) if ( $chkcat[$i] eq 'toc' && $chk[$i] !~ /\.byte/ )
{ $chk[$i] =~ s/$T_MOVE_DIRVS//g; { $chk[$i] =~ s/$T_MOVE_DIRVS//g;
$chk[$i] =~ s/\t\.tc (\S+)\[TC\],(\S+_fast\d+)/\t\.tc \1\[TC\],\.\2/; $chk[$i] =~ s/\t\.tc (\S+)\[TC\],(\S+_fast\d+)/\t\.tc \1\[TC\],\.\2/;
......
...@@ -559,33 +559,20 @@ gets whatever it's after. ...@@ -559,33 +559,20 @@ gets whatever it's after.
\begin{code} \begin{code}
#if powerpc_TARGET_ARCH || rs6000_TARGET_ARCH #if powerpc_TARGET_ARCH || rs6000_TARGET_ARCH
/* shift 4 arg registers down one */
#define MAGIC_CALL_SETUP \ #define MAGIC_CALL_SETUP \
register void (*f)() __asm__("$2"); \ register void (*f)() __asm__("$2"); \
__asm__ volatile ( \ __asm__ volatile ( \
"move $2,$4\n" \
"not used!!!????\n" \ "not used!!!????\n" \
"\tmove $4,$5\n" \
"\tmove $5,$6\n" \
"\tmove $6,$7\n" \
"\tlw $7,16($sp)\n" \
"\taddu $sp,$sp,4\n" \
: : : "$2" ); : : : "$2" );
#define MAGIC_CALL \ #define MAGIC_CALL \
(*f)(); \ (*f)(); \
__asm__ volatile ( \ __asm__ volatile ( \
"subu $sp,$sp,4\n" \ "not used!!!????\n");
"\ts.d $f0, -8($sp)\n" \
"not used!!!????\n" \
"\tsw $2, -12($sp)");
#define MAGIC_RETURN \ #define MAGIC_RETURN \
__asm__ volatile ( \ __asm__ volatile ( \
"l.d $f0, -8($sp)\n" \ "not used!!!????\n");
"not used!!!????\n" \
"\tlw $2, -12($sp)");
#define WRAPPER_NAME(f) /* nothing */ #define WRAPPER_NAME(f) /* nothing */
...@@ -600,7 +587,7 @@ We defeat it by saving the registers in the stack again. :-( */ ...@@ -600,7 +587,7 @@ We defeat it by saving the registers in the stack again. :-( */
do {RestoreAllStgRegs(); if(x) JMP_(EnterNodeCode);} while(0); \ do {RestoreAllStgRegs(); if(x) JMP_(EnterNodeCode);} while(0); \
__asm__ volatile ( \ __asm__ volatile ( \
"cal 1,136(1)\n" \ "cal 1,136(1)\n" \
"\tstm 13,-76(1)\n" \ "\tstm 14,-72(1)\n" \
"\tstu 1,-136(1)"); "\tstu 1,-136(1)");
#define SEPARATE_WRAPPER_RESTORE /* none */ #define SEPARATE_WRAPPER_RESTORE /* none */
......
...@@ -345,16 +345,16 @@ stgAllocForGMP (size_in_bytes) ...@@ -345,16 +345,16 @@ stgAllocForGMP (size_in_bytes)
*/ */
data_size_in_words = BYTES_TO_STGWORDS(size_in_bytes); data_size_in_words = BYTES_TO_STGWORDS(size_in_bytes);
total_size_in_words = DATA_HS + data_size_in_words; total_size_in_words = DATA_HS + data_size_in_words;
#ifdef ALLOC_DEBUG #ifdef ALLOC_DEBUG
/* Check that we are within the current budget */ /* Check that we are within the current budget */
if (DEBUG_GMPAllocBudget < total_size_in_words) { if (DEBUG_GMPAllocBudget < total_size_in_words) {
fprintf(stderr, "stgAllocForGMP: budget error: %ld %ld\n", fprintf(stderr, "stgAllocForGMP: budget error: %ld %ld\n",
DEBUG_GMPAllocBudget, total_size_in_words); DEBUG_GMPAllocBudget, total_size_in_words);
abort(); abort();
} }
else else {
DEBUG_GMPAllocBudget -= total_size_in_words; DEBUG_GMPAllocBudget -= total_size_in_words;
}
#endif #endif
/* if it's a DATA thingy, we'd better fill it in. /* if it's a DATA thingy, we'd better fill it in.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment