PR#6222: The mls instruction is not available on ARMv6.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14261 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Benedikt Meurer 2013-11-04 11:27:03 +00:00
parent 20efbfefe2
commit be7a0310a2
1 changed files with 8 additions and 2 deletions

View File

@ -667,8 +667,14 @@ let emit_instr i =
` movs {emit_reg r}, {emit_reg r}, asr #{emit_int p}\n`;
` add {emit_reg r}, {emit_reg r}, {emit_reg a}, lsr #31\n`;
let ninstr = ninstr + emit_intconst r12 (Int32.of_int n) in
if !arch >= ARMv6T2 then begin
` mls {emit_reg r}, {emit_reg r}, r12, {emit_reg a}\n`;
ninstr + 4
end else begin
` mul {emit_reg r}, {emit_reg r}, r12\n`;
` sub {emit_reg r}, {emit_reg a}, {emit_reg r}\n`;
ninstr + 5
end
end
| Lop(Iintop_imm((Ilsl | Ilsr | Iasr as op), n)) ->
let shift = name_for_shift_operation op in