- New language features - New tools - Faster type-checking of functor applications. - Referencing an interface compiled with -rectypes from a module not compiled with -rectypes is now an error. - Revised the "fragile matching" warning. - Print a stack backtrace on an uncaught exception. - Stack overflow detection on MS Windows 32 bits. - Stack overflow detection on MacOS X PPC and Intel. - Intel/AMD 64 bits: generate position-independent code by default. - Fixed bug involving -for-pack and missing .cmx files. - Fixed bug causing duplication of literals. - C/Caml interface functions take "char const *" arguments instead of "char *" when appropriate. - Faster string comparisons (fast case if strings are ==). - Other
35 lines
1 KiB
Text
35 lines
1 KiB
Text
$NetBSD: patch-ac,v 1.5 2007/09/14 15:34:10 adam Exp $
|
|
|
|
--- asmcomp/power/emit.mlp.orig 2007-05-10 18:41:12.000000000 +0200
|
|
+++ asmcomp/power/emit.mlp
|
|
@@ -825,6 +825,30 @@ let rec emit_all i =
|
|
emit_instr i None;
|
|
emit_all i.next
|
|
|
|
+(* Emission of the profiling prelude *)
|
|
+
|
|
+let emit_profile () =
|
|
+ match Config.system with
|
|
+ "bsd" ->
|
|
+ ` stwu 1, -32(1)\n`;
|
|
+ ` mflr 0\n`;
|
|
+ ` stw 0, 4(1)\n`;
|
|
+ ` stw 2, 8(1)\n`;
|
|
+ ` stw 3, 12(1)\n`;
|
|
+ ` stw 4, 16(1)\n`;
|
|
+ ` stw 5, 20(1)\n`;
|
|
+ ` stw 6, 24(1)\n`;
|
|
+ ` stw 7, 28(1)\n`;
|
|
+ ` bl {emit_symbol "_mcount"}\n`;
|
|
+ ` lwz 2, 8(1)\n`;
|
|
+ ` lwz 3, 12(1)\n`;
|
|
+ ` lwz 4, 16(1)\n`;
|
|
+ ` lwz 5, 20(1)\n`;
|
|
+ ` lwz 6, 24(1)\n`;
|
|
+ ` lwz 7, 28(1)\n`;
|
|
+ ` addic 1, 1, 32\n`;
|
|
+ | _ -> () (*unsupported yet*)
|
|
+
|
|
(* Emission of a function declaration *)
|
|
|
|
let fundecl fundecl =
|