Re: [PATCH 06/24] target-arm: A64: Implement store-exclusive for system mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 22 January 2014 02:19, Hu Tao <hutao@xxxxxxxxxxxxxx> wrote:
> On Tue, Jan 21, 2014 at 08:12:12PM +0000, Peter Maydell wrote:
>> +    if (is_pair) {
>> +        TCGv_i64 addrhi = tcg_temp_new_i64();
>> +        TCGv_i64 tmphi = tcg_temp_new_i64();
>> +
>> +        tcg_gen_addi_i64(addrhi, addr, 1 << size);
>> +        tcg_gen_qemu_ld_i64(tmphi, addrhi, get_mem_index(s), MO_TE + size);
>> +        tcg_gen_brcond_i64(TCG_COND_NE, tmp, cpu_exclusive_high, fail_label);
>
> s/tmp/tmphi/

Thanks, nice catch.

>> +
>> +        tcg_temp_free_i64(tmphi);
>> +        tcg_temp_free_i64(addrhi);
>
> Can addrhi be saved and free after doing store?

It would have to be made a local-temp to avoid the branch
trashing it. I preferred to make it a local and recalculate for
the store on the basis that the TCG backend really ought to
be capable of turning "add tmp, addr, 4; load from tmp" into
a single "load from addr+4" instruction, and having the
constant go into a local-temp would probably defeat that.

thanks
-- PMM
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux