mirror of
https://github.com/dingusdev/dingusppc.git
synced 2025-01-11 20:29:46 +00:00
Fixed an accidental merge from the cachetest branch
This commit is contained in:
parent
82d84c3ee9
commit
e9a4856849
@ -1942,14 +1942,14 @@ void ppc_dcbz(){
|
||||
if (!(ppc_state.ppc_pc & 32) && (ppc_state.ppc_pc < 0xFFFFFFE0UL)){
|
||||
ppc_grab_regsdab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_data_page_insert(0, ppc_effective_address, 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 4), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 8), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 12), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 16), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 20), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 24), 4);
|
||||
ppc_data_page_insert(0, (ppc_effective_address + 28), 4);
|
||||
address_quickinsert_translate(0, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 4), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 8), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 12), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 16), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 20), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 24), 4);
|
||||
address_quickinsert_translate(0, (ppc_effective_address + 28), 4);
|
||||
}
|
||||
else{
|
||||
ppc_exception_handler(0x0600, 0x00000);
|
||||
@ -1962,13 +1962,13 @@ void ppc_stb(){
|
||||
ppc_grab_regssa();
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
|
||||
}
|
||||
|
||||
void ppc_stbx(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
|
||||
}
|
||||
|
||||
void ppc_stbu(){
|
||||
@ -1976,7 +1976,7 @@ void ppc_stbu(){
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
if (reg_a != 0){
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1984,7 +1984,7 @@ void ppc_stbux(){
|
||||
ppc_grab_regssab();
|
||||
if (reg_a != 0){
|
||||
ppc_effective_address = ppc_result_a + reg_b;
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 1);
|
||||
}
|
||||
else{
|
||||
ppc_exception_handler(0x07000, 0x20000);
|
||||
@ -1997,20 +1997,20 @@ void ppc_sth(){
|
||||
ppc_grab_regssa();
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 2);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 2);
|
||||
}
|
||||
|
||||
void ppc_sthu(){
|
||||
ppc_grab_regssa();
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 2);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 2);
|
||||
}
|
||||
|
||||
void ppc_sthux(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 2);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 2);
|
||||
ppc_result_a = ppc_effective_address;
|
||||
ppc_store_result_rega();
|
||||
}
|
||||
@ -2020,27 +2020,27 @@ void ppc_sthx(){
|
||||
if (reg_a != 0){
|
||||
ppc_effective_address = ppc_result_a + ppc_result_b;
|
||||
}
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 2);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 2);
|
||||
}
|
||||
|
||||
void ppc_sthbrx(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_result_d = (uint32_t)(rev_endian16((uint16_t)ppc_result_d));
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 2);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 2);
|
||||
}
|
||||
|
||||
void ppc_stw(){
|
||||
ppc_grab_regssa();
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
}
|
||||
|
||||
void ppc_stwx(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
}
|
||||
|
||||
void ppc_stwcx(){
|
||||
@ -2048,7 +2048,7 @@ void ppc_stwcx(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
if (ppc_state.ppc_reserve){
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
ppc_state.ppc_cr |= (ppc_state.ppc_spr[1] & 0x80000000) ? 0x30000000 : 0x20000000;
|
||||
ppc_state.ppc_reserve = false;
|
||||
}
|
||||
@ -2061,7 +2061,7 @@ void ppc_stwu(){
|
||||
ppc_grab_regssa();
|
||||
grab_d = (uint32_t)((int32_t)((int16_t)(ppc_cur_instruction & 0xFFFF)));
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
ppc_result_a = ppc_effective_address;
|
||||
ppc_store_result_rega();
|
||||
}
|
||||
@ -2069,7 +2069,7 @@ void ppc_stwu(){
|
||||
void ppc_stwux(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
ppc_result_a = ppc_effective_address;
|
||||
ppc_store_result_rega();
|
||||
}
|
||||
@ -2078,7 +2078,7 @@ void ppc_stwbrx(){
|
||||
ppc_grab_regssab();
|
||||
ppc_effective_address = (reg_a == 0)?ppc_result_b:(ppc_result_a + ppc_result_b);
|
||||
ppc_result_d = rev_endian32(ppc_result_d);
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
}
|
||||
|
||||
void ppc_stmw(){
|
||||
@ -2087,7 +2087,7 @@ void ppc_stmw(){
|
||||
ppc_effective_address = (reg_a == 0)?grab_d:(ppc_result_a + grab_d);
|
||||
//How many words to store in memory - using a do-while for this
|
||||
do{
|
||||
ppc_data_page_insert(ppc_result_d, ppc_effective_address, 4);
|
||||
address_quickinsert_translate(ppc_result_d, ppc_effective_address, 4);
|
||||
ppc_effective_address +=4;
|
||||
reg_d++;
|
||||
}while (reg_d < 32);
|
||||
@ -2468,19 +2468,19 @@ void ppc_stswi(){
|
||||
switch(shift_times){
|
||||
case 0:
|
||||
strwrd_replace_value = (ppc_result_d >> 24);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 1:
|
||||
strwrd_replace_value = (ppc_result_d >> 16);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 2:
|
||||
strwrd_replace_value = (ppc_result_d >> 8);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 3:
|
||||
strwrd_replace_value = (ppc_result_d);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
default:
|
||||
printf("Something really horrible happened with stswi.");
|
||||
@ -2507,19 +2507,19 @@ void ppc_stswx(){
|
||||
switch(shift_times){
|
||||
case 0:
|
||||
strwrd_replace_value = (ppc_result_d >> 24);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 1:
|
||||
strwrd_replace_value = (ppc_result_d >> 16);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 2:
|
||||
strwrd_replace_value = (ppc_result_d >> 8);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
case 3:
|
||||
strwrd_replace_value = (ppc_result_d);
|
||||
ppc_data_page_insert(strwrd_replace_value, ppc_effective_address, 1);
|
||||
address_quickinsert_translate(strwrd_replace_value, ppc_effective_address, 1);
|
||||
break;
|
||||
default:
|
||||
printf("Something really horrible happened with stswx.");
|
||||
|
Loading…
x
Reference in New Issue
Block a user