vis_helper.c (be8998e046c2a7e434494b75cf468ffd9d536025) vis_helper.c (d3ef26afde77fbdedd5b30282134ff99d0fe5cc5)
1/*
2 * VIS op helpers
3 *
4 * Copyright (c) 2003-2005 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 60 unchanged lines hidden (view full) ---

69
70typedef union {
71 uint8_t b[4];
72 uint16_t w[2];
73 uint32_t l;
74 float32 f;
75} VIS32;
76
1/*
2 * VIS op helpers
3 *
4 * Copyright (c) 2003-2005 Fabrice Bellard
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either

--- 60 unchanged lines hidden (view full) ---

69
70typedef union {
71 uint8_t b[4];
72 uint16_t w[2];
73 uint32_t l;
74 float32 f;
75} VIS32;
76
77uint64_t helper_fpmerge(uint64_t src1, uint64_t src2)
77uint64_t helper_fpmerge(uint32_t src1, uint32_t src2)
78{
78{
79 VIS64 s, d;
79 VIS32 s1, s2;
80 VIS64 d;
80
81
81 s.ll = src1;
82 d.ll = src2;
82 s1.l = src1;
83 s2.l = src2;
84 d.ll = 0;
83
85
84 /* Reverse calculation order to handle overlap */
85 d.VIS_B64(7) = s.VIS_B64(3);
86 d.VIS_B64(6) = d.VIS_B64(3);
87 d.VIS_B64(5) = s.VIS_B64(2);
88 d.VIS_B64(4) = d.VIS_B64(2);
89 d.VIS_B64(3) = s.VIS_B64(1);
90 d.VIS_B64(2) = d.VIS_B64(1);
91 d.VIS_B64(1) = s.VIS_B64(0);
92 /* d.VIS_B64(0) = d.VIS_B64(0); */
86 d.VIS_B64(7) = s1.VIS_B32(3);
87 d.VIS_B64(6) = s2.VIS_B32(3);
88 d.VIS_B64(5) = s1.VIS_B32(2);
89 d.VIS_B64(4) = s2.VIS_B32(2);
90 d.VIS_B64(3) = s1.VIS_B32(1);
91 d.VIS_B64(2) = s2.VIS_B32(1);
92 d.VIS_B64(1) = s1.VIS_B32(0);
93 d.VIS_B64(0) = s2.VIS_B32(0);
93
94 return d.ll;
95}
96
97uint64_t helper_fmul8x16(uint32_t src1, uint64_t src2)
98{
99 VIS64 d;
100 VIS32 s;

--- 265 unchanged lines hidden ---
94
95 return d.ll;
96}
97
98uint64_t helper_fmul8x16(uint32_t src1, uint64_t src2)
99{
100 VIS64 d;
101 VIS32 s;

--- 265 unchanged lines hidden ---