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: 770 Reporter: administrator Status: closed Resolution: fixed Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general) Related to:#7667
Bug description
Full_Name: Mark Brown
Version: 3.04
OS: Debian GNU/Linux unstable
Submission from: 62.31.64.2 (62.31.64.2)
ocaml currently fails to build on PowerPC. The failing portion of
output is:
make[3]: Entering directory `/tmp/ocaml/ocaml-3.04/camlp4/meta'
../../boot/ocamlrun ../boot/camlp4r -nolib -I ../boot pa_extend.cmo
q_MLast.cmo -o pa_r.ppo pa_r.ml
../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../camlp4 -I
../boot -I ../../utils -c -impl pa_r.ppo
/tmp/camlasm0.s: Assembler messages:
/tmp/camlasm0.s:26869: Error: operand out of range (54196 not between
-32768 and 32767)
/tmp/camlasm0.s:27246: Error: operand out of range (52688 not between
-32768 and 32767)
and so on. Looking at the assembler output the failures appear to be
branch instructions attempting to call into what looks like a garbage
collector:
The compiler either needs to be smarter about how it branches into the
GC routine (perhaps inserting the hooks at a higher level) or it needs
to assume that call_gc_label will be out of the range of a conditional jump.
This patch (hopefully) takes the latter approach:
Original bug ID: 770
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Related to: #7667
Bug description
Full_Name: Mark Brown
Version: 3.04
OS: Debian GNU/Linux unstable
Submission from: 62.31.64.2 (62.31.64.2)
ocaml currently fails to build on PowerPC. The failing portion of
output is:
make[3]: Entering directory `/tmp/ocaml/ocaml-3.04/camlp4/meta'
../../boot/ocamlrun ../boot/camlp4r -nolib -I ../boot pa_extend.cmo
q_MLast.cmo -o pa_r.ppo pa_r.ml
../../boot/ocamlrun ../../ocamlopt -I ../../stdlib -I ../camlp4 -I
../boot -I ../../utils -c -impl pa_r.ppo
/tmp/camlasm0.s: Assembler messages:
/tmp/camlasm0.s:26869: Error: operand out of range (54196 not between
-32768 and 32767)
/tmp/camlasm0.s:27246: Error: operand out of range (52688 not between
-32768 and 32767)
and so on. Looking at the assembler output the failures appear to be
branch instructions attempting to call into what looks like a garbage
collector:
| .L1145: bltl .L1144
...
| .L1144:
| b caml_call_gc
| .section ".text"
| .globl Pa_r_code_end
| .type Pa_r_code_end, @object
Grovelling around in asmcomp/power it appears that the only place where
a bltl is emitted is:
| | Lop(Ialloc n) ->
| if !call_gc_label = 0 then call_gc_label := new_label();
|
addi {emit_gpr 31}, {emit_gpr 31}, {emit_int(-n)}\n
;|
cmplw {emit_gpr 31}, {emit_gpr 30}\n
;|
addi {emit_reg i.res.(0)}, {emit_gpr 31}, 4\n
;| record_frame i.live;
|
bltl {emit_label !call_gc_label}\n
The compiler either needs to be smarter about how it branches into the
GC routine (perhaps inserting the hooks at a higher level) or it needs
to assume that call_gc_label will be out of the range of a conditional jump.
This patch (hopefully) takes the latter approach:
--- ocaml-3.04/asmcomp/power/emit.mlp.orig Tue Jan 1 19:40:55 2002
+++ ocaml-3.04/asmcomp/power/emit.mlp Tue Jan 1 19:40:19 2002
@@ -545,12 +545,15 @@
| _ -> "stw" in
emit_load_store storeinstr addr i.arg 1 i.arg.(0)
| Lop(Ialloc n) ->
( Use subfc instead of subf for RS6000 compatibility. *)
subfc {emit_reg i.res.(0)}, {emit_reg i.arg.(1)}, {emit_reg i. arg.(0)}\n
The text was updated successfully, but these errors were encountered: