Native test runner: Support FPSCR
This commit is contained in:
parent
84758a3a3f
commit
6e2bf0b4b1
|
@ -37,6 +37,7 @@ struct Context {
|
||||||
double f[32]; // 0x100
|
double f[32]; // 0x100
|
||||||
vec128_t v[32]; // 0x200 For now, only support 32 vector registers.
|
vec128_t v[32]; // 0x200 For now, only support 32 vector registers.
|
||||||
uint32_t cr; // 0x400 Condition register
|
uint32_t cr; // 0x400 Condition register
|
||||||
|
uint64_t fpscr; // 0x404 FPSCR
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::vector<std::pair<std::string, std::string>> AnnotationList;
|
typedef std::vector<std::pair<std::string, std::string>> AnnotationList;
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
lwz r2, 0x400(r3) # CR
|
lwz r2, 0x400(r3) # CR
|
||||||
mtcrf 0xFF, r2
|
mtcrf 0xFF, r2
|
||||||
|
|
||||||
|
lfd f0, 0x404(r3) # FPSCR
|
||||||
|
mtfsf 0xFF, f0
|
||||||
|
|
||||||
li r2, 0
|
li r2, 0
|
||||||
mtxer r2
|
mtxer r2
|
||||||
|
|
||||||
|
@ -286,6 +289,9 @@
|
||||||
|
|
||||||
mfcr r2 # CR
|
mfcr r2 # CR
|
||||||
stw r2, 0x400(r3)
|
stw r2, 0x400(r3)
|
||||||
|
|
||||||
|
mffs f0 # FPSCR
|
||||||
|
stfd f0, 0x404(r3)
|
||||||
blr
|
blr
|
||||||
|
|
||||||
# void xe_call_native(Context* ctx, void* func)
|
# void xe_call_native(Context* ctx, void* func)
|
||||||
|
|
Loading…
Reference in New Issue