diff options
author | Bernhard Schommer <bernhardschommer@gmail.com> | 2018-09-19 09:47:30 +0200 |
---|---|---|
committer | Bernhard Schommer <bernhardschommer@gmail.com> | 2018-09-19 09:47:30 +0200 |
commit | 020be062488d755236f296fff760c7491e11997b (patch) | |
tree | 3175d0e87dd8972813f595b686ce00f389bd9403 | |
parent | e891a43f00680d1d99063c3b8231fb862738e0e3 (diff) | |
download | compcert-020be062488d755236f296fff760c7491e11997b.tar.gz compcert-020be062488d755236f296fff760c7491e11997b.zip |
Switch conditions for eref plattforms.
Otherwise an isel is generated if no isel is needed at all.
Bug 24516
-rw-r--r-- | powerpc/Asmexpand.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/powerpc/Asmexpand.ml b/powerpc/Asmexpand.ml index 62e65951..8c473a7f 100644 --- a/powerpc/Asmexpand.ml +++ b/powerpc/Asmexpand.ml @@ -415,12 +415,12 @@ let expand_int64_arith conflict rl fn = and with 64-bit integer registers. *) let expand_integer_cond_move a1 a2 a3 res = - if eref then begin + if a2 = a3 then + emit (Pmr (res, a2)) + else if eref then begin emit (Pcmpwi (a1,Cint (Int.zero))); emit (Pisel (res,a3,a2,CRbit_2)) - end else if a2 = a3 then - emit (Pmr (res, a2)) - else begin + end else begin (* a1 has type _Bool, hence it is 0 or 1 *) emit (Psubfic (GPR0, a1, Cint _0)); (* r0 = -1 (all ones) if a1 is true, r0 = 0 if a1 is false *) |