Revision 426613db target-ppc/op_helper.c
b/target-ppc/op_helper.c | ||
---|---|---|
642 | 642 |
FT0 = p.d; |
643 | 643 |
} |
644 | 644 |
|
645 |
#if defined(TARGET_PPC64) |
|
646 |
void do_fcfid (void) |
|
647 |
{ |
|
648 |
union { |
|
649 |
double d; |
|
650 |
uint64_t i; |
|
651 |
} p; |
|
652 |
|
|
653 |
p.d = FT0; |
|
654 |
FT0 = int64_to_float64(p.i, &env->fp_status); |
|
655 |
} |
|
656 |
|
|
657 |
void do_fctid (void) |
|
658 |
{ |
|
659 |
union { |
|
660 |
double d; |
|
661 |
uint64_t i; |
|
662 |
} p; |
|
663 |
|
|
664 |
p.i = float64_to_int64(FT0, &env->fp_status); |
|
665 |
FT0 = p.d; |
|
666 |
} |
|
667 |
|
|
668 |
void do_fctidz (void) |
|
669 |
{ |
|
670 |
union { |
|
671 |
double d; |
|
672 |
uint64_t i; |
|
673 |
} p; |
|
674 |
|
|
675 |
p.i = float64_to_int64_round_to_zero(FT0, &env->fp_status); |
|
676 |
FT0 = p.d; |
|
677 |
} |
|
678 |
|
|
679 |
#endif |
|
680 |
|
|
645 | 681 |
#if USE_PRECISE_EMULATION |
646 | 682 |
void do_fmadd (void) |
647 | 683 |
{ |
... | ... | |
846 | 882 |
void do_rfi (void) |
847 | 883 |
{ |
848 | 884 |
env->nip = (target_ulong)(env->spr[SPR_SRR0] & ~0x00000003); |
849 |
T0 = (target_ulong)(env->spr[SPR_SRR1] & ~0xFFFF0000UL); |
|
885 |
T0 = (uint32_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL); |
|
886 |
#if defined(TARGET_PPC64) |
|
887 |
ppc_store_msr_32(env, T0); |
|
888 |
#else |
|
850 | 889 |
do_store_msr(env, T0); |
890 |
#endif |
|
851 | 891 |
#if defined (DEBUG_OP) |
852 | 892 |
dump_rfi(); |
853 | 893 |
#endif |
... | ... | |
859 | 899 |
{ |
860 | 900 |
env->nip = (uint32_t)(env->spr[SPR_SRR0] & ~0x00000003); |
861 | 901 |
T0 = (uint32_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL); |
902 |
ppc_store_msr_32(env, T0); |
|
903 |
#if defined (DEBUG_OP) |
|
904 |
dump_rfi(); |
|
905 |
#endif |
|
906 |
env->interrupt_request |= CPU_INTERRUPT_EXITTB; |
|
907 |
} |
|
908 |
|
|
909 |
void do_rfid (void) |
|
910 |
{ |
|
911 |
env->nip = (target_ulong)(env->spr[SPR_SRR0] & ~0x00000003); |
|
912 |
T0 = (uint64_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL); |
|
913 |
do_store_msr(env, T0); |
|
914 |
#if defined (DEBUG_OP) |
|
915 |
dump_rfi(); |
|
916 |
#endif |
|
917 |
env->interrupt_request |= CPU_INTERRUPT_EXITTB; |
|
918 |
} |
|
919 |
|
|
920 |
void do_rfid_32 (void) |
|
921 |
{ |
|
922 |
env->nip = (uint32_t)(env->spr[SPR_SRR0] & ~0x00000003); |
|
923 |
T0 = (uint64_t)(env->spr[SPR_SRR1] & ~0xFFFF0000UL); |
|
862 | 924 |
do_store_msr(env, T0); |
863 | 925 |
#if defined (DEBUG_OP) |
864 | 926 |
dump_rfi(); |
Also available in: Unified diff