summaryrefslogtreecommitdiff
path: root/lang/ocaml/patches/patch-ah
blob: bd94f03d8cf1143930b593f7b092d4e4bf570225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$NetBSD: patch-ah,v 1.1 2003/06/29 23:04:19 jtb Exp $

--- asmcomp/power/emit.mlp.orig
+++ asmcomp/power/emit.mlp
@@ -65,7 +65,7 @@
 
 let emit_symbol =
   match Config.system with
-    "aix" | "elf" -> (fun s -> Emitaux.emit_symbol '.' s)
+    "aix" | "elf" | "bsd" -> (fun s -> Emitaux.emit_symbol '.' s)
   | "rhapsody"    -> (fun s -> emit_char '_'; Emitaux.emit_symbol '$' s)
   | _ -> assert false
 
@@ -78,7 +78,7 @@
 let label_prefix =
   match Config.system with
     "aix" -> "L.."
-  | "elf" -> ".L"
+  | "elf" | "bsd" -> ".L"
   | "rhapsody" -> "L"
   | _ -> assert false
 
@@ -90,21 +90,21 @@
 let data_space =
   match Config.system with
     "aix" -> "	.csect  .data[RW]\n"
-  | "elf" -> "	.section \".data\"\n"
+  | "elf" | "bsd" -> "	.section \".data\"\n"
   | "rhapsody" -> "	.data\n"
   | _ -> assert false
 
 let code_space =
   match Config.system with
     "aix" -> "	.csect  .text[PR]\n"
-  | "elf" -> "	.section \".text\"\n"
+  | "elf" | "bsd" -> "	.section \".text\"\n"
   | "rhapsody" -> "	.text\n"
   | _ -> assert false
 
 let rodata_space =
   match Config.system with
     "aix" -> "	.csect  .data[RW]\n" (* ?? *)
-  | "elf" -> "	.section \".rodata\"\n"
+  | "elf" | "bsd" -> "	.section \".rodata\"\n"
   | "rhapsody" -> "	.const\n"
   | _ -> assert false
 
@@ -157,7 +157,7 @@
 
 let emit_upper emit_fun arg =
   match Config.system with
-    "elf" ->
+    "elf" | "bsd" ->
       emit_fun arg; emit_string "@ha"
   | "rhapsody" ->
       emit_string "ha16("; emit_fun arg; emit_string ")"
@@ -165,7 +165,7 @@
 
 let emit_lower emit_fun arg =
   match Config.system with
-    "elf" ->
+    "elf" | "bsd" ->
       emit_fun arg; emit_string "@l"
   | "rhapsody" ->
       emit_string "lo16("; emit_fun arg; emit_string ")"
@@ -951,7 +951,7 @@
       `	.csect	{emit_symbol fundecl.fun_name}[DS]\n`;
       `{emit_symbol fundecl.fun_name}:\n`;
       `	.long	.{emit_symbol fundecl.fun_name}, TOC[tc0], 0\n`
-  | "elf" ->
+  | "elf" | "bsd" ->
       `	.type	{emit_symbol fundecl.fun_name}, @function\n`
   | _ -> ()
   end;
@@ -996,7 +996,7 @@
 
 let declare_global_data s =
   `	.globl	{emit_symbol s}\n`;
-  if Config.system = "elf" then
+  if Config.system = "elf" || Config.system = "bsd" then
     `	.type	{emit_symbol s}, @object\n`
 
 let emit_item = function