On 6 June 2016 at 22:44, Richard Henderson <r...@twiddle.net> wrote:
> On 06/06/2016 03:37 AM, Michael Rolnik wrote:
>>
>> +    if (avr_feature(env, AVR_FEATURE_3_BYTE_PC)) {
>> +        stb_phys(cs->as, env->sp--, (ret & 0x0000ff));
>> +        stb_phys(cs->as, env->sp--, (ret & 0x00ff00) >>  8);
>> +        stb_phys(cs->as, env->sp--, (ret & 0xff0000) >> 16);
>> +    } else if (avr_feature(env, AVR_FEATURE_2_BYTE_PC)) {
>> +        stb_phys(cs->as, env->sp--, (ret & 0x0000ff));
>> +        stb_phys(cs->as, env->sp--, (ret & 0x00ff00) >>  8);
>> +    } else {
>> +        stb_phys(cs->as, env->sp--, (ret & 0x0000ff));
>> +    }
>
>
> It would be better to use cpu_stb_data.

Or address_space_stb() if you want to care about getting
the right behaviour if the store fails (we don't really
care about this on many targets at the moment though).

thanks
-- PMM

Reply via email to