openh264 icon indicating copy to clipboard operation
openh264 copied to clipboard

loogarch64 ---__lasx_xvpickve_d

Open sunjunlishi opened this issue 2 years ago • 1 comments

macihne's is /* Assembly instruction format: xd, xj, ui2 / / Data types in instruction templates: V4DI, V4DI, V4DI, UQI / #define __lasx_xvpickve_d(/__m256i*/ _1, /__m256i/ _2, /ui2/ _3) ((__m256i)__builtin_lasx_xvpickve_d((v4i64)(_1), (v4i64)(_2), (_3)))

but openh264,it does not match the machine's code

codec/encoder/core/loongarch/dct_lasx.c: In function ‘WelsIDctT4Rec_lasx’: codec/encoder/core/loongarch/dct_lasx.c:247:35: error: macro "__lasx_xvpickve_d" requires 3 arguments, but only 2 given src1 = __lasx_xvpickve_d(src0, 1); ^ codec/encoder/core/loongarch/dct_lasx.c:247:10: error: ‘__lasx_xvpickve_d’ undeclared (first use in this function); did you mean ‘__lasx_xvpickod_d’? src1 = __lasx_xvpickve_d(src0, 1); ^~~~~~~~~~~~~~~~~ __lasx_xvpickod_d codec/encoder/core/loongarch/dct_lasx.c:247:10: note: each undeclared identifier is reported only once for each function it appears in codec/encoder/core/loongarch/dct_lasx.c:248:35: error: macro "__lasx_xvpickve_d" requires 3 arguments, but only 2 given src2 = __lasx_xvpickve_d(src0, 2); ^ codec/encoder/core/loongarch/dct_lasx.c:249:35: error: macro "__lasx_xvpickve_d" requires 3 arguments, but only 2 given src3 = __lasx_xvpickve_d(src0, 3);

sunjunlishi avatar Sep 01 '23 10:09 sunjunlishi

In latest gcc on loongarch ,it defines: /* Assembly instruction format: xd, xj, ui2. / / Data types in instruction templates: V4DI, V4DI, UQI. / #define __lasx_xvpickve_d(/__m256i*/ _1, /ui2/ _2) ((__m256i)__builtin_lasx_xvpickve_d((v4i64)(_1), (_2)))

so, maybe you need to update gcc version, i'm using Loongnix 8.3.0-6.lnd.vec.36.

jinboson avatar Nov 22 '23 08:11 jinboson