[project @ 1997-05-30 21:58:21 by andre]
authorandre <unknown>
Fri, 30 May 1997 21:58:24 +0000 (21:58 +0000)
committerandre <unknown>
Fri, 30 May 1997 21:58:24 +0000 (21:58 +0000)
AIX/RS6000 patches

ghc/driver/ghc-asm.lprl
ghc/includes/COptWraps.lh
ghc/runtime/prims/PrimArith.lc

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