-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
89 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "common.h" | ||
|
||
v128 vbsll_v(v128 a, int imm) { | ||
v128 dst; | ||
#include "vbsll_v.h" | ||
return dst; | ||
} | ||
|
||
void test() { | ||
FUZZ1(vbsll_v, 0); | ||
FUZZ1(vbsll_v, 3); | ||
FUZZ1(vbsll_v, 7); | ||
FUZZ1(vbsll_v, 8); | ||
FUZZ1(vbsll_v, 16); | ||
FUZZ1(vbsll_v, 24); | ||
FUZZ1(vbsll_v, 25); | ||
FUZZ1(vbsll_v, 31); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
int shift = (imm * 8) % 128; | ||
dst.qword[0] = (u128)a.qword[0] << shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "common.h" | ||
|
||
v128 vbsrl_v(v128 a, int imm) { | ||
v128 dst; | ||
#include "vbsrl_v.h" | ||
return dst; | ||
} | ||
|
||
void test() { | ||
FUZZ1(vbsrl_v, 0); | ||
FUZZ1(vbsrl_v, 3); | ||
FUZZ1(vbsrl_v, 7); | ||
FUZZ1(vbsrl_v, 8); | ||
FUZZ1(vbsrl_v, 16); | ||
FUZZ1(vbsrl_v, 24); | ||
FUZZ1(vbsrl_v, 25); | ||
FUZZ1(vbsrl_v, 31); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
int shift = (imm * 8) % 128; | ||
dst.qword[0] = (u128)a.qword[0] >> shift; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Shift | ||
|
||
## __m128i __lsx_vbsll_v (__m128i a, imm0_31 imm) | ||
|
||
### Synopsis | ||
|
||
```c++ | ||
__m128i __lsx_vbsll_v (__m128i a, imm0_31 imm) | ||
#include <lsxintrin.h> | ||
Instruction: vbsll.v vr, vr, imm | ||
CPU Flags: LSX | ||
``` | ||
### Description | ||
Compute 128-bit `a` shifted left by `imm * 8` bits. | ||
### Operation | ||
```c++ | ||
{% include 'vbsll_v.h' %} | ||
``` | ||
|
||
## __m128i __lsx_vbsrl_v (__m128i a, imm0_31 imm) | ||
|
||
### Synopsis | ||
|
||
```c++ | ||
__m128i __lsx_vbsrl_v (__m128i a, imm0_31 imm) | ||
#include <lsxintrin.h> | ||
Instruction: vbsrl.v vr, vr, imm | ||
CPU Flags: LSX | ||
``` | ||
### Description | ||
Compute 128-bit `a` shifted right by `imm * 8` bits. | ||
### Operation | ||
```c++ | ||
{% include 'vbsrl_v.h' %} | ||
``` |