Message ID | 20201017022901.78425-1-richard.henderson@linaro.org |
---|---|
Headers | show |
Series | target/s390x: Improve carry computation | expand |
On 10/20/20 7:17 AM, David Hildenbrand wrote: >> + case CC_OP_ADDU: > > Can you give me a hint how we're converting the carry into a borrow? > > Can we apply something similar to compute_carry()? > >> + tcg_gen_subi_i64(cc_src, cc_src, 1); Right here: subtract one. carry = {1,0} -> borrow = {0,-1} I'll add some more comments for v2. r~
On 20.10.20 17:11, Richard Henderson wrote: > On 10/20/20 7:17 AM, David Hildenbrand wrote: >>> + case CC_OP_ADDU: >> >> Can you give me a hint how we're converting the carry into a borrow? >> >> Can we apply something similar to compute_carry()? >> >>> + tcg_gen_subi_i64(cc_src, cc_src, 1); > > Right here: subtract one. > > carry = {1,0} -> borrow = {0,-1} Ok, so it's really that simple :) Thanks!