You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 1444 Reporter: administrator Status: closed (set by @mshinwell on 2016-12-07T13:58:29Z) Resolution: won't fix Priority: normal Severity: feature Category: ~DO NOT USE (was: OCaml general) Tags: patch Monitored by: jm
Size of object files and libraries can be slightly reduced
by using deltas(instead of offsets) in frametables, linking
time will also be reduced (less relocations to consider).
Following small patch implements this for i386:
diff -ur ocaml/asmcomp/i386/emit.mlp work/asmcomp/i386/emit.mlp
--- ocaml/asmcomp/i386/emit.mlp Mon Jul 22 20:37:50 2002
+++ work/asmcomp/i386/emit.mlp Sat Oct 19 19:07:48 2002
@@ -178,7 +178,7 @@
let lbl = record_frame_label live in {emit_label lbl}:\n
Original bug ID: 1444
Reporter: administrator
Status: closed (set by @mshinwell on 2016-12-07T13:58:29Z)
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)
Tags: patch
Monitored by: jm
Bug description
Full_Name: Vassili Karpov
Version: 3.06
OS: Linux/Windows
Submission from: cache1-kh.comex.ru (217.10.35.250)
Size of object files and libraries can be slightly reduced
by using deltas(instead of offsets) in frametables, linking
time will also be reduced (less relocations to consider).
Following small patch implements this for i386:
diff -ur ocaml/asmcomp/i386/emit.mlp work/asmcomp/i386/emit.mlp
--- ocaml/asmcomp/i386/emit.mlp Mon Jul 22 20:37:50 2002
+++ work/asmcomp/i386/emit.mlp Sat Oct 19 19:07:48 2002
@@ -178,7 +178,7 @@
let lbl = record_frame_label live in
{emit_label lbl}:\n
let emit_frame fd =
.long {emit_label fd.fd_lbl}\n
;.long {emit_label fd.fd_lbl} - bias\n
;{emit_string word_dir} {emit_int fd.fd_frame_size}\n
;{emit_string word_dir} {emit_int (List.length fd.fd_live_offset)}\n
;List.iter
@@ -812,6 +812,7 @@
{emit_symbol lbl_begin}:\n
;let lbl_begin = Compilenv.current_unit_name() ^ "__code_begin" in
.text\n
;bias={emit_symbol lbl_begin}\n
;.globl {emit_symbol lbl_begin}\n
;{emit_symbol lbl_begin}:\n
@@ -826,6 +827,7 @@
{emit_symbol lbl_end}:\n
;.long 0\n
;let lbl = Compilenv.current_unit_name() ^ "__frametable" in
.data 1\n
;.globl {emit_symbol lbl}\n
;{emit_symbol lbl}:\n
;.long {emit_int (List.length !frame_descriptors)}\n
;diff -ur ocaml/asmcomp/i386/emit_nt.mlp work/asmcomp/i386/emit_nt.mlp
--- ocaml/asmcomp/i386/emit_nt.mlp Fri Feb 8 19:55:31 2002
+++ work/asmcomp/i386/emit_nt.mlp Sat Oct 19 19:27:17 2002
@@ -161,7 +161,7 @@
let lbl = record_frame_label live in
{emit_label lbl}:\n
let emit_frame fd =
DWORD {emit_label fd.fd_lbl}\n
;DWORD {emit_label fd.fd_lbl} - bias\n
;WORD {emit_int fd.fd_frame_size}\n
;WORD {emit_int (List.length fd.fd_live_offset)}\n
;List.iter
@@ -797,7 +797,8 @@
let lbl_begin = Compilenv.current_unit_name() ^ "__code_begin" in
add_def_symbol lbl_begin;
PUBLIC {emit_symbol lbl_begin}\n
;{emit_symbol lbl_begin} LABEL DWORD\n
{emit_symbol lbl_begin} LABEL DWORD\n
;bias LABEL DWORD\n
let end_assembly() =
.CODE\n
;diff -ur ocaml/asmrun/roots.c work/asmrun/roots.c
--- ocaml/asmrun/roots.c Mon Jan 21 01:20:51 2002
+++ work/asmrun/roots.c Sat Oct 19 19:12:10 2002
@@ -46,12 +46,16 @@
#define Hash_retaddr(addr)
(((unsigned long)(addr) >> 3) & frame_descriptors_mask)
+struct segment { char * begin; char * end; };
+
static void init_frame_descriptors(void)
{
long num_descr, tblsize, i, j, len;
long * tbl;
frame_descr * d;
unsigned long h, bias;
struct segment *seg = caml_code_segments;
/* Count the frame descriptors */
num_descr = 0;
@@ -73,8 +77,13 @@
for (i = 0; caml_frametable[i] != 0; i++) {
tbl = caml_frametable[i];
len = *tbl;
if (i != 1) {
} else bias = 0;
d = (frame_descr *)(tbl + 1);
for (j = 0; j < len; j++) {
The text was updated successfully, but these errors were encountered: