Revision 4373f3ce target-arm/op_neon.h
b/target-arm/op_neon.h | ||
---|---|---|
14 | 14 |
#define NFS &env->vfp.fp_status |
15 | 15 |
#define NEON_OP(name) void OPPROTO op_neon_##name (void) |
16 | 16 |
|
17 |
/* Helper routines to perform bitwise copies between float and int. */ |
|
18 |
static inline float32 vfp_itos(uint32_t i) |
|
19 |
{ |
|
20 |
union { |
|
21 |
uint32_t i; |
|
22 |
float32 s; |
|
23 |
} v; |
|
24 |
|
|
25 |
v.i = i; |
|
26 |
return v.s; |
|
27 |
} |
|
28 |
|
|
29 |
static inline uint32_t vfp_stoi(float32 s) |
|
30 |
{ |
|
31 |
union { |
|
32 |
uint32_t i; |
|
33 |
float32 s; |
|
34 |
} v; |
|
35 |
|
|
36 |
v.s = s; |
|
37 |
return v.i; |
|
38 |
} |
|
39 |
|
|
17 | 40 |
NEON_OP(getreg_T0) |
18 | 41 |
{ |
19 | 42 |
T0 = *(uint32_t *)((char *) env + PARAM1); |
... | ... | |
754 | 777 |
#undef NEON_FN |
755 | 778 |
#undef NEON_QDMULH32 |
756 | 779 |
|
757 |
NEON_OP(recps_f32) |
|
758 |
{ |
|
759 |
T0 = vfp_stoi(helper_recps_f32(vfp_itos(T0), vfp_itos(T1))); |
|
760 |
FORCE_RET(); |
|
761 |
} |
|
762 |
|
|
763 |
NEON_OP(rsqrts_f32) |
|
764 |
{ |
|
765 |
T0 = vfp_stoi(helper_rsqrts_f32(vfp_itos(T0), vfp_itos(T1))); |
|
766 |
FORCE_RET(); |
|
767 |
} |
|
768 |
|
|
769 | 780 |
/* Floating point comparisons produce an integer result. */ |
770 | 781 |
#define NEON_VOP_FCMP(name, cmp) \ |
771 | 782 |
NEON_OP(name) \ |
... | ... | |
1702 | 1713 |
FORCE_RET(); |
1703 | 1714 |
} |
1704 | 1715 |
|
1705 |
/* Reciprocal/root estimate. */ |
|
1706 |
NEON_OP(recpe_u32) |
|
1707 |
{ |
|
1708 |
T0 = helper_recpe_u32(T0); |
|
1709 |
} |
|
1710 |
|
|
1711 |
NEON_OP(rsqrte_u32) |
|
1712 |
{ |
|
1713 |
T0 = helper_rsqrte_u32(T0); |
|
1714 |
} |
|
1715 |
|
|
1716 |
NEON_OP(recpe_f32) |
|
1717 |
{ |
|
1718 |
FT0s = helper_recpe_f32(FT0s); |
|
1719 |
} |
|
1720 |
|
|
1721 |
NEON_OP(rsqrte_f32) |
|
1722 |
{ |
|
1723 |
FT0s = helper_rsqrte_f32(FT0s); |
|
1724 |
} |
|
1725 |
|
|
1726 | 1716 |
/* Table lookup. This accessed the register file directly. */ |
1727 | 1717 |
NEON_OP(tbl) |
1728 | 1718 |
{ |
Also available in: Unified diff