z Systems: subtract immediate has its own range of valid immediate values (#9860)
Because it is turned into add immediate opposite in emit.mlp.master
parent
41f0522df3
commit
4c1654f135
3
Changes
3
Changes
|
@ -400,6 +400,9 @@ Working version
|
|||
- #9848, #9855: Fix double free of bytecode in toplevel
|
||||
(Stephen Dolan, report by Sampsa Kiiskinen, review by Gabriel Scherer)
|
||||
|
||||
- #9860: wrong range constraint for subtract immediate on zSystems / s390x
|
||||
(Xavier Leroy, review by Stephen Dolan)
|
||||
|
||||
|
||||
OCaml 4.11
|
||||
----------
|
||||
|
|
|
@ -80,6 +80,12 @@ method! select_operation op args dbg =
|
|||
match (op, args) with
|
||||
(* Z does not support immediate operands for multiply high *)
|
||||
(Cmulhi, _) -> (Iintop Imulh, args)
|
||||
(* sub immediate is turned into add immediate opposite,
|
||||
hence the immediate range is special *)
|
||||
| (Csubi, [arg; Cconst_int (n, _)]) when self#is_immediate (-n) ->
|
||||
(Iintop_imm(Isub, n), [arg])
|
||||
| (Csubi, _) ->
|
||||
(Iintop Isub, args)
|
||||
(* The and, or and xor instructions have a different range of immediate
|
||||
operands than the other instructions *)
|
||||
| (Cand, _) ->
|
||||
|
|
Loading…
Reference in New Issue