displ / 4 ==> displ asr 2
Utiliser asr au lieu de lsr dans emit_label. git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1384 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
6ed63a09c4
commit
e751678a85
|
@ -90,11 +90,11 @@ let extend_label_table needed =
|
|||
label_table := new_table
|
||||
|
||||
let backpatch (pos, orig) =
|
||||
let displ = (!out_position - orig) / 4 in
|
||||
let displ = (!out_position - orig) asr 2 in
|
||||
!out_buffer.[pos] <- Char.unsafe_chr displ;
|
||||
!out_buffer.[pos+1] <- Char.unsafe_chr (displ lsr 8);
|
||||
!out_buffer.[pos+2] <- Char.unsafe_chr (displ lsr 16);
|
||||
!out_buffer.[pos+3] <- Char.unsafe_chr (displ lsr 24)
|
||||
!out_buffer.[pos+1] <- Char.unsafe_chr (displ asr 8);
|
||||
!out_buffer.[pos+2] <- Char.unsafe_chr (displ asr 16);
|
||||
!out_buffer.[pos+3] <- Char.unsafe_chr (displ asr 24)
|
||||
|
||||
let define_label lbl =
|
||||
if lbl >= Array.length !label_table then extend_label_table lbl;
|
||||
|
@ -109,7 +109,7 @@ let out_label_with_orig orig lbl =
|
|||
if lbl >= Array.length !label_table then extend_label_table lbl;
|
||||
match (!label_table).(lbl) with
|
||||
Label_defined def ->
|
||||
out_int((def - orig) / 4)
|
||||
out_int((def - orig) asr 2)
|
||||
| Label_undefined patchlist ->
|
||||
(!label_table).(lbl) <-
|
||||
Label_undefined((!out_position, orig) :: patchlist);
|
||||
|
|
Loading…
Reference in New Issue