Search
lxdream.org :: lxdream/src/sh4/ia64abi.h :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/sh4/ia64abi.h
changeset 590:4db6a084ca3c
prev586:2a3ba82cf243
next596:dfc0c93d882e
author nkeynes
date Wed Jan 16 09:39:16 2008 +0000 (12 years ago)
permissions -rw-r--r--
last change Ensure PC correctness in presence of delay-slot exceptions
file annotate diff log raw
1.1 --- a/src/sh4/ia64abi.h Tue Jan 15 20:50:23 2008 +0000
1.2 +++ b/src/sh4/ia64abi.h Wed Jan 16 09:39:16 2008 +0000
1.3 @@ -110,13 +110,30 @@
1.4
1.5 /**
1.6 * Exit the block with sh4r.pc already written
1.7 - * Bytes: 15
1.8 */
1.9 void exit_block_pcset( sh4addr_t pc )
1.10 {
1.11 load_imm32( R_ECX, ((pc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
1.12 ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) ); // 6
1.13 - load_spreg( R_EAX, REG_OFFSET(pc) );
1.14 + load_spreg( R_EAX, R_PC );
1.15 + if( sh4_x86.tlb_on ) {
1.16 + call_func1(xlat_get_code_by_vma,R_EAX);
1.17 + } else {
1.18 + call_func1(xlat_get_code,R_EAX);
1.19 + }
1.20 + POP_r32(R_EBP);
1.21 + RET();
1.22 +}
1.23 +
1.24 +/**
1.25 + * Exit the block with sh4r.new_pc written with the target address
1.26 + */
1.27 +void exit_block_newpcset( sh4addr_t pc )
1.28 +{
1.29 + load_imm32( R_ECX, ((pc - sh4_x86.block_start_pc)>>1)*sh4_cpu_period ); // 5
1.30 + ADD_r32_sh4r( R_ECX, REG_OFFSET(slice_cycle) ); // 6
1.31 + load_spreg( R_EAX, R_NEW_PC );
1.32 + store_spreg( R_EAX, R_PC );
1.33 if( sh4_x86.tlb_on ) {
1.34 call_func1(xlat_get_code_by_vma,R_EAX);
1.35 } else {
.