Adding fmls instruction
Change-Id: Ia1752196fd50ade2c3160dc401a36618433420d8
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/270822
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp
index 6ce2199..57a646d 100644
--- a/src/core/SkVM.cpp
+++ b/src/core/SkVM.cpp
@@ -1461,6 +1461,7 @@
void Assembler::fcmge4s(V d, V n, V m) { this->op(0b0'1'1'01110'0'0'1, m, 0b1110'0'1, n, d); }
void Assembler::fmla4s(V d, V n, V m) { this->op(0b0'1'0'01110'0'0'1, m, 0b11001'1, n, d); }
+ void Assembler::fmls4s(V d, V n, V m) { this->op(0b0'1'0'01110'1'0'1, m, 0b11001'1, n, d); }
void Assembler::tbl(V d, V n, V m) { this->op(0b0'1'001110'00'0, m, 0b0'00'0'00, n, d); }
diff --git a/src/core/SkVM.h b/src/core/SkVM.h
index 39aaeb0..49873af 100644
--- a/src/core/SkVM.h
+++ b/src/core/SkVM.h
@@ -184,6 +184,9 @@
// d += n*m
void fmla4s(V d, V n, V m);
+ // d -= n*m
+ void fmls4s(V d, V n, V m);
+
// d = op(n,imm)
using DOpNImm = void(V d, V n, int imm);
DOpNImm sli4s,
diff --git a/tests/SkVMTest.cpp b/tests/SkVMTest.cpp
index b0c9699..d9cf7c4 100644
--- a/tests/SkVMTest.cpp
+++ b/tests/SkVMTest.cpp
@@ -1306,6 +1306,7 @@
a.fmax4s(A::v4, A::v3, A::v1);
a.fmla4s(A::v4, A::v3, A::v1);
+ a.fmls4s(A::v4, A::v3, A::v1);
a.fcmeq4s(A::v4, A::v3, A::v1);
a.fcmgt4s(A::v4, A::v3, A::v1);
@@ -1336,6 +1337,7 @@
0x64,0xf4,0x21,0x4e,
0x64,0xcc,0x21,0x4e,
+ 0x64,0xcc,0xa1,0x4e,
0x64,0xe4,0x21,0x4e,
0x64,0xe4,0xa1,0x6e,