Native test runner: Support FPSCR

This commit is contained in:
Dr. Chat 2017-05-13 23:12:53 -05:00
parent 84758a3a3f
commit 6e2bf0b4b1
2 changed files with 8 additions and 1 deletions

View File

@ -37,6 +37,7 @@ struct Context {
double f[32]; // 0x100
vec128_t v[32]; // 0x200 For now, only support 32 vector registers.
uint32_t cr; // 0x400 Condition register
uint64_t fpscr; // 0x404 FPSCR
};
typedef std::vector<std::pair<std::string, std::string>> AnnotationList;

View File

@ -10,9 +10,12 @@
# r3 = context
# this does not touch r1, r3, r4, r13
.load_registers_ctx:
lwz r2, 0x400(r3) # CR
lwz r2, 0x400(r3) # CR
mtcrf 0xFF, r2
lfd f0, 0x404(r3) # FPSCR
mtfsf 0xFF, f0
li r2, 0
mtxer r2
@ -286,6 +289,9 @@
mfcr r2 # CR
stw r2, 0x400(r3)
mffs f0 # FPSCR
stfd f0, 0x404(r3)
blr
# void xe_call_native(Context* ctx, void* func)