Skip to content

Commit

Permalink
Remove nonexistent lasx instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
jiegec committed Dec 14, 2023
1 parent 0965215 commit 3c78221
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 41 deletions.
6 changes: 4 additions & 2 deletions code/gen_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -753,8 +753,10 @@
file=f,
)
print(f"}}", file=f)
with open(f"{prefix}pickve2gr_{width}.h", "w") as f:
print(f"dst = a.{m}[idx];", file=f)
# skip xvpickve2gr_b/bu/h/hu
if prefix != "xv" or (width[0] != "b" and width[0] != "h"):
with open(f"{prefix}pickve2gr_{width}.h", "w") as f:
print(f"dst = a.{m}[idx];", file=f)

for width in ["b", "bu", "h", "hu", "w", "wu", "d", "du"]:
double_width = double_widths[width]
Expand Down
3 changes: 0 additions & 3 deletions code/xvinsgr2vr_b.h

This file was deleted.

3 changes: 0 additions & 3 deletions code/xvinsgr2vr_h.h

This file was deleted.

1 change: 0 additions & 1 deletion code/xvpickve2gr_b.h

This file was deleted.

1 change: 0 additions & 1 deletion code/xvpickve2gr_bu.h

This file was deleted.

1 change: 0 additions & 1 deletion code/xvpickve2gr_h.h

This file was deleted.

1 change: 0 additions & 1 deletion code/xvpickve2gr_hu.h

This file was deleted.

3 changes: 0 additions & 3 deletions code/xvreplvei_b.h

This file was deleted.

3 changes: 0 additions & 3 deletions code/xvreplvei_d.h

This file was deleted.

3 changes: 0 additions & 3 deletions code/xvreplvei_h.h

This file was deleted.

3 changes: 0 additions & 3 deletions code/xvreplvei_w.h

This file was deleted.

11 changes: 0 additions & 11 deletions docs/lasx/misc.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
{{ xvilvl('w') }}
{{ xvilvl('d') }}

{{ xvinsgr2vr('b') }}
{{ xvinsgr2vr('h') }}
{{ xvinsgr2vr('w') }}
{{ xvinsgr2vr('d') }}

Expand Down Expand Up @@ -45,10 +43,6 @@
{{ xvpickev('w') }}
{{ xvpickev('d') }}

{{ xvpickve2gr('b') }}
{{ xvpickve2gr('bu') }}
{{ xvpickve2gr('h') }}
{{ xvpickve2gr('hu') }}
{{ xvpickve2gr('w') }}
{{ xvpickve2gr('wu') }}
{{ xvpickve2gr('d') }}
Expand All @@ -74,11 +68,6 @@
{{ xvreplve('w') }}
{{ xvreplve('d') }}

{{ xvreplvei('b') }}
{{ xvreplvei('h') }}
{{ xvreplvei('w') }}
{{ xvreplvei('d') }}

{{ xvsat('b') }}
{{ xvsat('bu') }}
{{ xvsat('h') }}
Expand Down
8 changes: 4 additions & 4 deletions gcc_lasxintrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,10 @@ __m256i __lasx_xvssub_hu (__m256i, __m256i);
__m256i __lasx_xvssub_w (__m256i, __m256i);
__m256i __lasx_xvssub_wu (__m256i, __m256i);
void __lasx_xvst (__m256i, void *, imm_n2048_2047);
void __lasx_xvstelm_b (__m256i, void *, imm_n128_127, imm0_15);
void __lasx_xvstelm_d (__m256i, void *, imm_n128_127, imm0_1);
void __lasx_xvstelm_h (__m256i, void *, imm_n128_127, imm0_7);
void __lasx_xvstelm_w (__m256i, void *, imm_n128_127, imm0_3);
void __lasx_xvstelm_b (__m256i, void *, imm_n128_127, imm0_31);
void __lasx_xvstelm_d (__m256i, void *, imm_n128_127, imm0_3);
void __lasx_xvstelm_h (__m256i, void *, imm_n128_127, imm0_15);
void __lasx_xvstelm_w (__m256i, void *, imm_n128_127, imm0_7);
void __lasx_xvstx (__m256i, void *, long int);
__m256i __lasx_xvsub_b (__m256i, __m256i);
__m256i __lasx_xvsub_d (__m256i, __m256i);
Expand Down
6 changes: 4 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,9 @@ def vilvl(name):

@my_macro(env)
def vinsgr2vr(name):
global cur_vlen
width = widths[name]
imm_upper = 128 // width - 1
imm_upper = cur_vlen // width - 1
if name == "d":
long = "long "
else:
Expand Down Expand Up @@ -685,8 +686,9 @@ def vpcnt(name):

@my_macro(env)
def vstelm(name):
global cur_vlen
width = widths[name]
imm_upper = 128 // width - 1
imm_upper = cur_vlen // width - 1
return instruction(
intrinsic=f"void __lsx_vstelm_{name} (__m128i data, void * addr, imm_n128_127 offset, imm0_{imm_upper} lane)",
instr=f"vstelm.{name} vr, r, imm, imm",
Expand Down

0 comments on commit 3c78221

Please sign in to comment.