|  | /* | 
|  | * Copyright 2023 Google LLC | 
|  | * | 
|  | * Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | * you may not use this file except in compliance with the License. | 
|  | * You may obtain a copy of the License at | 
|  | * | 
|  | *     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | * | 
|  | * Unless required by applicable law or agreed to in writing, software | 
|  | * distributed under the License is distributed on an "AS IS" BASIS, | 
|  | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | * See the License for the specific language governing permissions and | 
|  | * limitations under the License. | 
|  | */ | 
|  |  | 
|  | #include "tests/kelvin_isa/kelvin_test.h" | 
|  |  | 
|  | int main() { | 
|  | test_alu_b_vv("vabsd.b.vv", 0x00, 0x00, 0x00); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x7f, 0x7f, 0x00); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x80, 0x80, 0x00); | 
|  | test_alu_b_vv("vabsd.b.vv", 0xff, 0xff, 0x00); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x7f, 0x80, 0xff); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x80, 0x7f, 0xff); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x7f, 0xff, 0x80); | 
|  | test_alu_b_vv("vabsd.b.vv", 0xff, 0x7f, 0x80); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x80, 0xff, 0x7f); | 
|  | test_alu_b_vv("vabsd.b.vv", 0xff, 0x80, 0x7f); | 
|  | test_alu_b_vv("vabsd.b.vv", 0xcc, 0x55, 0x89); | 
|  | test_alu_b_vv("vabsd.b.vv", 0x55, 0xcc, 0x89); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x0000, 0x0000, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x7fff, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x8000, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0xffff, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x7fff, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x8000, 0x7fff, 0xffff); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x7fff, 0xffff, 0x8000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0xffff, 0x7fff, 0x8000); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x8000, 0xffff, 0x7fff); | 
|  | test_alu_h_vv("vabsd.h.vv", 0xffff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vabsd.h.vv", 0xcccc, 0x5555, 0x8889); | 
|  | test_alu_h_vv("vabsd.h.vv", 0x5555, 0xcccc, 0x8889); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x00000000, 0x00000000, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x7fffffff, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x80000000, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0xffffffff, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x7fffffff, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x80000000, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x7fffffff, 0xffffffff, 0x80000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0xffffffff, 0x7fffffff, 0x80000000); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x80000000, 0xffffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vabsd.w.vv", 0xffffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vabsd.w.vv", 0xcccccccc, 0x55555555, 0x88888889); | 
|  | test_alu_w_vv("vabsd.w.vv", 0x55555555, 0xcccccccc, 0x88888889); | 
|  |  | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x00, 0x00, 0x00); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x7f, 0x7f, 0x00); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x80, 0x80, 0x00); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0xff, 0xff, 0x00); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x7f, 0x80, 0x01); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x80, 0x7f, 0x01); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x7f, 0xff, 0x80); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0xff, 0x7f, 0x80); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x80, 0xff, 0x7f); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0xff, 0x80, 0x7f); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0xcc, 0x55, 0x77); | 
|  | test_alu_b_vv("vabsd.b.u.vv", 0x55, 0xcc, 0x77); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x0000, 0x0000, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x7fff, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x8000, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0xffff, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x7fff, 0x8000, 0x0001); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x8000, 0x7fff, 0x0001); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x7fff, 0xffff, 0x8000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0xffff, 0x7fff, 0x8000); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x8000, 0xffff, 0x7fff); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0xffff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0xcccc, 0x5555, 0x7777); | 
|  | test_alu_h_vv("vabsd.h.u.vv", 0x5555, 0xcccc, 0x7777); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x00000000, 0x00000000, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x7fffffff, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x80000000, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0xffffffff, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x7fffffff, 0x80000000, 0x00000001); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x80000000, 0x7fffffff, 0x00000001); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x7fffffff, 0xffffffff, 0x80000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0xffffffff, 0x7fffffff, 0x80000000); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x80000000, 0xffffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0xffffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0xcccccccc, 0x55555555, 0x77777777); | 
|  | test_alu_w_vv("vabsd.w.u.vv", 0x55555555, 0xcccccccc, 0x77777777); | 
|  |  | 
|  | test_alu_b_vv("vadd.b.vv", 0x00, 0x01, 0x01); | 
|  | test_alu_b_vv("vadd.b.vv", 0xff, 0x01, 0x00); | 
|  | test_alu_b_vv("vadd.b.vv", 0xa0, 0x5f, 0xff); | 
|  | test_alu_h_vv("vadd.h.vv", 0x0000, 0x0001, 0x0001); | 
|  | test_alu_h_vv("vadd.h.vv", 0x00ff, 0x0001, 0x0100); | 
|  | test_alu_h_vv("vadd.h.vv", 0xffff, 0x0001, 0x0000); | 
|  | test_alu_h_vv("vadd.h.vv", 0xa05f, 0x5fa0, 0xffff); | 
|  | test_alu_w_vv("vadd.w.vv", 0x00000000, 0x00000001, 0x00000001); | 
|  | test_alu_w_vv("vadd.w.vv", 0x000000ff, 0x00000001, 0x00000100); | 
|  | test_alu_w_vv("vadd.w.vv", 0x0000ffff, 0x00000001, 0x00010000); | 
|  | test_alu_w_vv("vadd.w.vv", 0xffffffff, 0x00000001, 0x00000000); | 
|  | test_alu_w_vv("vadd.w.vv", 0xa05f1234, 0x5fa0edcb, 0xffffffff); | 
|  |  | 
|  | test_alu_b_vv("vadds.b.vv", 0x00, 0x01, 0x01); | 
|  | test_alu_b_vv("vadds.b.vv", 0x7f, 0x01, 0x7f); | 
|  | test_alu_b_vv("vadds.b.vv", 0xff, 0x01, 0x00); | 
|  | test_alu_b_vv("vadds.b.vv", 0x80, 0x01, 0x81); | 
|  | test_alu_b_vv("vadds.b.vv", 0x80, 0x80, 0x80); | 
|  | test_alu_b_vv("vadds.b.vv", 0x80, 0xff, 0x80); | 
|  | test_alu_b_vv("vadds.b.vv", 0x7f, 0x7f, 0x7f); | 
|  | test_alu_b_vv("vadds.b.vv", 0x7f, 0x80, 0xff); | 
|  | test_alu_b_vv("vadds.b.vv", 0x7f, 0xff, 0x7e); | 
|  | test_alu_b_vv("vadds.b.vv", 0xff, 0xff, 0xfe); | 
|  | test_alu_b_vv("vadds.b.vv", 0xa0, 0x5f, 0xff); | 
|  | test_alu_h_vv("vadds.h.vv", 0x0000, 0x0001, 0x0001); | 
|  | test_alu_h_vv("vadds.h.vv", 0x007f, 0x0001, 0x0080); | 
|  | test_alu_h_vv("vadds.h.vv", 0x00ff, 0x0001, 0x0100); | 
|  | test_alu_h_vv("vadds.h.vv", 0x7fff, 0x0001, 0x7fff); | 
|  | test_alu_h_vv("vadds.h.vv", 0xffff, 0x0001, 0x0000); | 
|  | test_alu_h_vv("vadds.h.vv", 0x0080, 0x0001, 0x0081); | 
|  | test_alu_h_vv("vadds.h.vv", 0x0080, 0x00ff, 0x017f); | 
|  | test_alu_h_vv("vadds.h.vv", 0x8000, 0x0001, 0x8001); | 
|  | test_alu_h_vv("vadds.h.vv", 0x8000, 0x8000, 0x8000); | 
|  | test_alu_h_vv("vadds.h.vv", 0x8000, 0xffff, 0x8000); | 
|  | test_alu_h_vv("vadds.h.vv", 0x7fff, 0x7fff, 0x7fff); | 
|  | test_alu_h_vv("vadds.h.vv", 0x7fff, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vadds.h.vv", 0x7fff, 0xffff, 0x7ffe); | 
|  | test_alu_h_vv("vadds.h.vv", 0xffff, 0xffff, 0xfffe); | 
|  | test_alu_h_vv("vadds.h.vv", 0xa05f, 0x5fa0, 0xffff); | 
|  | test_alu_w_vv("vadds.w.vv", 0x00000000, 0x00000001, 0x00000001); | 
|  | test_alu_w_vv("vadds.w.vv", 0x000000ff, 0x00000001, 0x00000100); | 
|  | test_alu_w_vv("vadds.w.vv", 0x0000ffff, 0x00000001, 0x00010000); | 
|  | test_alu_w_vv("vadds.w.vv", 0x7fffffff, 0x00000001, 0x7fffffff); | 
|  | test_alu_w_vv("vadds.w.vv", 0xffffffff, 0x00000001, 0x00000000); | 
|  | test_alu_w_vv("vadds.w.vv", 0x80000000, 0x00000001, 0x80000001); | 
|  | test_alu_w_vv("vadds.w.vv", 0x80000000, 0x80000000, 0x80000000); | 
|  | test_alu_w_vv("vadds.w.vv", 0x80000000, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.vv", 0x80000000, 0xffffffff, 0x80000000); | 
|  | test_alu_w_vv("vadds.w.vv", 0x7fffffff, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.vv", 0x7fffffff, 0x7fffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vadds.w.vv", 0x7fffffff, 0xffffffff, 0x7ffffffe); | 
|  | test_alu_w_vv("vadds.w.vv", 0xffffffff, 0xffffffff, 0xfffffffe); | 
|  | test_alu_w_vv("vadds.w.vv", 0xa05f1234, 0x5fa0edcb, 0xffffffff); | 
|  |  | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x00, 0x01, 0x01); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x7f, 0x01, 0x80); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0xff, 0x01, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x80, 0x01, 0x81); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x80, 0x80, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x80, 0xff, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x7f, 0x7f, 0xfe); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x7f, 0x80, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0x7f, 0xff, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0xff, 0xff, 0xff); | 
|  | test_alu_b_vv("vadds.b.u.vv", 0xa0, 0x5f, 0xff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x0000, 0x0001, 0x0001); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x007f, 0x0001, 0x0080); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x00ff, 0x0001, 0x0100); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x7fff, 0x0001, 0x8000); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0xffff, 0x0001, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x0080, 0x0001, 0x0081); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x0080, 0x00ff, 0x017f); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x8000, 0x0001, 0x8001); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x8000, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x8000, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x7fff, 0x7fff, 0xfffe); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x7fff, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0x7fff, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0xffff, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vadds.h.u.vv", 0xa05f, 0x5fa0, 0xffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x00000000, 0x00000001, 0x00000001); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x000000ff, 0x00000001, 0x00000100); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x0000ffff, 0x00000001, 0x00010000); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x7fffffff, 0x00000001, 0x80000000); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0xffffffff, 0x00000001, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x80000000, 0x00000001, 0x80000001); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x80000000, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x80000000, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x80000000, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x7fffffff, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x7fffffff, 0x7fffffff, 0xfffffffe); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0x7fffffff, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0xffffffff, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vadds.w.u.vv", 0xa05f1234, 0x5fa0edcb, 0xffffffff); | 
|  |  | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x00, 0x01, 0x0001); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x7f, 0x01, 0x0080); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0xff, 0x01, 0x0000); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x80, 0x01, 0xff81); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x80, 0x80, 0xff00); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x80, 0xff, 0xff7f); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x7f, 0x7f, 0x00fe); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x7f, 0x80, 0xffff); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0x7f, 0xff, 0x007e); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0xff, 0xff, 0xfffe); | 
|  | test_aluw_h_vv("vaddw.h.vv", 0xa0, 0x5f, 0xffff); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x0000, 0x0001, 0x00000001); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x007f, 0x0001, 0x00000080); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x00ff, 0x0001, 0x00000100); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x7fff, 0x0001, 0x00008000); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0xffff, 0x0001, 0x00000000); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x0080, 0x0001, 0x00000081); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x0080, 0x00ff, 0x0000017f); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x8000, 0x0001, 0xffff8001); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x8000, 0x8000, 0xffff0000); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x8000, 0xffff, 0xffff7fff); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x7fff, 0x7fff, 0x0000fffe); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x7fff, 0x8000, 0xffffffff); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0x7fff, 0xffff, 0x00007ffe); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0xffff, 0xffff, 0xfffffffe); | 
|  | test_aluw_w_vv("vaddw.w.vv", 0xa05f, 0x5fa0, 0xffffffff); | 
|  |  | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x00, 0x01, 0x0001); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x7f, 0x01, 0x0080); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0xff, 0x01, 0x0100); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x80, 0x01, 0x0081); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x80, 0x80, 0x0100); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x80, 0xff, 0x017f); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x7f, 0x7f, 0x00fe); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x7f, 0x80, 0x00ff); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0x7f, 0xff, 0x017e); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0xff, 0xff, 0x01fe); | 
|  | test_aluw_h_vv("vaddw.h.u.vv", 0xa0, 0x5f, 0x00ff); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x0000, 0x0001, 0x00000001); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x007f, 0x0001, 0x00000080); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x00ff, 0x0001, 0x00000100); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x7fff, 0x0001, 0x00008000); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0xffff, 0x0001, 0x00010000); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x0080, 0x0001, 0x00000081); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x0080, 0x00ff, 0x0000017f); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x8000, 0x0001, 0x00008001); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x8000, 0x8000, 0x00010000); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x8000, 0xffff, 0x00017fff); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x7fff, 0x7fff, 0x0000fffe); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x7fff, 0x8000, 0x0000ffff); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0x7fff, 0xffff, 0x00017ffe); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0xffff, 0xffff, 0x0001fffe); | 
|  | test_aluw_w_vv("vaddw.w.u.vv", 0xa05f, 0x5fa0, 0x0000ffff); | 
|  |  | 
|  | test_alu_b_vv("vhadd.b.vv", 0x05, 0x08, 0x06); | 
|  | test_alu_b_vv("vhadd.b.vv", 0x7e, 0x7f, 0x7e); | 
|  | test_alu_b_vv("vhadd.b.vv", 0x7f, 0x80, 0xff); | 
|  | test_alu_b_vv("vhadd.b.vv", 0xfe, 0xff, 0xfe); | 
|  | test_alu_b_vv("vhadd.b.vv", 0x55, 0xaa, 0xff); | 
|  | test_alu_b_vv("vhadd.b.vv", 0x33, 0x66, 0x4c); | 
|  | test_alu_h_vv("vhadd.h.vv", 0x0055, 0x0088, 0x006e); | 
|  | test_alu_h_vv("vhadd.h.vv", 0x7ffe, 0x7fff, 0x7ffe); | 
|  | test_alu_h_vv("vhadd.h.vv", 0x7fff, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vhadd.h.vv", 0xfffe, 0xffff, 0xfffe); | 
|  | test_alu_h_vv("vhadd.h.vv", 0x5555, 0xaaaa, 0xffff); | 
|  | test_alu_h_vv("vhadd.h.vv", 0x3333, 0x6666, 0x4ccc); | 
|  | test_alu_w_vv("vhadd.w.vv", 0x00000055, 0x00000088, 0x0000006e); | 
|  | test_alu_w_vv("vhadd.w.vv", 0x7ffffffe, 0x7fffffff, 0x7ffffffe); | 
|  | test_alu_w_vv("vhadd.w.vv", 0x7fffffff, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vhadd.w.vv", 0xfffffffe, 0xffffffff, 0xfffffffe); | 
|  | test_alu_w_vv("vhadd.w.vv", 0x55555555, 0xaaaaaaaa, 0xffffffff); | 
|  | test_alu_w_vv("vhadd.w.vv", 0x33333333, 0x66666666, 0x4ccccccc); | 
|  |  | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0x05, 0x08, 0x06); | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0x7e, 0x7f, 0x7e); | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0x7f, 0x80, 0x7f); | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0xfe, 0xff, 0xfe); | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0x55, 0xaa, 0x7f); | 
|  | test_alu_b_vv("vhadd.b.u.vv", 0x33, 0x66, 0x4c); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0x0055, 0x0088, 0x006e); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0x7ffe, 0x7fff, 0x7ffe); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0x7fff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0xfffe, 0xffff, 0xfffe); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0x5555, 0xaaaa, 0x7fff); | 
|  | test_alu_h_vv("vhadd.h.u.vv", 0x3333, 0x6666, 0x4ccc); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0x00000055, 0x00000088, 0x0000006e); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0x7ffffffe, 0x7fffffff, 0x7ffffffe); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0x7fffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0xfffffffe, 0xffffffff, 0xfffffffe); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0x55555555, 0xaaaaaaaa, 0x7fffffff); | 
|  | test_alu_w_vv("vhadd.w.u.vv", 0x33333333, 0x66666666, 0x4ccccccc); | 
|  |  | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0x05, 0x08, 0x07); | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0x7e, 0x7f, 0x7f); | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0x7f, 0x80, 0x00); | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0xfe, 0xff, 0xff); | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0x55, 0xaa, 0x00); | 
|  | test_alu_b_vv("vhadd.b.r.vv", 0x33, 0x66, 0x4d); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0x0055, 0x0088, 0x006f); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0x7ffe, 0x7fff, 0x7fff); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0x7fff, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0xfffe, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0x5555, 0xaaaa, 0x0000); | 
|  | test_alu_h_vv("vhadd.h.r.vv", 0x3333, 0x6666, 0x4ccd); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0x00000055, 0x00000088, 0x0000006f); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0x7ffffffe, 0x7fffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0x7fffffff, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0xfffffffe, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0x55555555, 0xaaaaaaaa, 0x00000000); | 
|  | test_alu_w_vv("vhadd.w.r.vv", 0x33333333, 0x66666666, 0x4ccccccd); | 
|  |  | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0x05, 0x08, 0x07); | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0x7e, 0x7f, 0x7f); | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0x7f, 0x80, 0x80); | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0xfe, 0xff, 0xff); | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0x55, 0xaa, 0x80); | 
|  | test_alu_b_vv("vhadd.b.ur.vv", 0x33, 0x66, 0x4d); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0x0055, 0x0088, 0x006f); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0x7ffe, 0x7fff, 0x7fff); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0x7fff, 0x8000, 0x8000); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0xfffe, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0x5555, 0xaaaa, 0x8000); | 
|  | test_alu_h_vv("vhadd.h.ur.vv", 0x3333, 0x6666, 0x4ccd); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0x00000055, 0x00000088, 0x0000006f); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0x7ffffffe, 0x7fffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0x7fffffff, 0x80000000, 0x80000000); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0xfffffffe, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0x55555555, 0xaaaaaaaa, 0x80000000); | 
|  | test_alu_w_vv("vhadd.w.ur.vv", 0x33333333, 0x66666666, 0x4ccccccd); | 
|  |  | 
|  | test_alu_b_vv("vhsub.b.vv", 0x05, 0x08, 0xfe); | 
|  | test_alu_b_vv("vhsub.b.vv", 0x7e, 0x7f, 0xff); | 
|  | test_alu_b_vv("vhsub.b.vv", 0x7f, 0x80, 0x7f); | 
|  | test_alu_b_vv("vhsub.b.vv", 0x80, 0x7f, 0x80); | 
|  | test_alu_b_vv("vhsub.b.vv", 0xfe, 0xff, 0xff); | 
|  | test_alu_b_vv("vhsub.b.vv", 0x55, 0xaa, 0x55); | 
|  | test_alu_b_vv("vhsub.b.vv", 0x33, 0x66, 0xe6); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x0055, 0x0087, 0xffe7); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x7ffe, 0x7fff, 0xffff); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x7fff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x8000, 0x7fff, 0x8000); | 
|  | test_alu_h_vv("vhsub.h.vv", 0xfffe, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x5555, 0xaaaa, 0x5555); | 
|  | test_alu_h_vv("vhsub.h.vv", 0x3333, 0x6666, 0xe666); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x00000055, 0x00000088, 0xffffffe6); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x7ffffffe, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x7fffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x80000000, 0x7fffffff, 0x80000000); | 
|  | test_alu_w_vv("vhsub.w.vv", 0xfffffffe, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x55555555, 0xaaaaaaaa, 0x55555555); | 
|  | test_alu_w_vv("vhsub.w.vv", 0x33333333, 0x66666666, 0xe6666666); | 
|  |  | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x05, 0x07, 0xff); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x7e, 0x7f, 0xff); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x7f, 0x80, 0xff); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x80, 0x7f, 0x00); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0xfe, 0xff, 0xff); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x55, 0xaa, 0xd5); | 
|  | test_alu_b_vv("vhsub.b.u.vv", 0x33, 0x66, 0xe6); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x0055, 0x0087, 0xffe7); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x7ffe, 0x7fff, 0xffff); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x7fff, 0x8000, 0xffff); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x8000, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0xfffe, 0xffff, 0xffff); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x5555, 0xaaaa, 0xd555); | 
|  | test_alu_h_vv("vhsub.h.u.vv", 0x3333, 0x6666, 0xe666); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x00000055, 0x00000087, 0xffffffe7); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x7ffffffe, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x7fffffff, 0x80000000, 0xffffffff); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x80000000, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0xfffffffe, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x55555555, 0xaaaaaaaa, 0xd5555555); | 
|  | test_alu_w_vv("vhsub.w.u.vv", 0x33333333, 0x66666666, 0xe6666666); | 
|  |  | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x05, 0x07, 0xff); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x7e, 0x7f, 0x00); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x7f, 0x80, 0x80); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x80, 0x7f, 0x81); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0xfe, 0xff, 0x00); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x55, 0xaa, 0x56); | 
|  | test_alu_b_vv("vhsub.b.r.vv", 0x33, 0x66, 0xe7); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x0055, 0x0087, 0xffe7); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x7ffe, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x7fff, 0x8000, 0x8000); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x8000, 0x7fff, 0x8001); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0xfffe, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x5555, 0xaaaa, 0x5556); | 
|  | test_alu_h_vv("vhsub.h.r.vv", 0x3333, 0x6666, 0xe667); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x00000055, 0x00000087, 0xffffffe7); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x7ffffffe, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x7fffffff, 0x80000000, 0x80000000); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x80000000, 0x7fffffff, 0x80000001); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0xfffffffe, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x55555555, 0xaaaaaaaa, 0x55555556); | 
|  | test_alu_w_vv("vhsub.w.r.vv", 0x33333333, 0x66666666, 0xe6666667); | 
|  |  | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x05, 0x07, 0xff); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x7e, 0x7f, 0x00); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x7f, 0x80, 0x00); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x80, 0x7f, 0x01); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0xfe, 0xff, 0x00); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x55, 0xaa, 0xd6); | 
|  | test_alu_b_vv("vhsub.b.ur.vv", 0x33, 0x66, 0xe7); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x0055, 0x0087, 0xffe7); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x7ffe, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x7fff, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x8000, 0x7fff, 0x0001); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0xfffe, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x5555, 0xaaaa, 0xd556); | 
|  | test_alu_h_vv("vhsub.h.ur.vv", 0x3333, 0x6666, 0xe667); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x00000055, 0x00000087, 0xffffffe7); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x7ffffffe, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x7fffffff, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x80000000, 0x7fffffff, 0x00000001); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0xfffffffe, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x55555555, 0xaaaaaaaa, 0xd5555556); | 
|  | test_alu_w_vv("vhsub.w.ur.vv", 0x33333333, 0x66666666, 0xe6666667); | 
|  |  | 
|  | test_alu_b_vx("vrsub.b.vx", 0x00, 0x00, 0x00); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x12, 0x34, 0x22); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x34, 0x12, 0xde); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x00, 0x00, 0x00); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x00, 0x7f, 0x7f); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x00, 0x80, 0x80); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x00, 0xff, 0xff); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x7f, 0x00, 0x81); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x7f, 0x7f, 0x00); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x7f, 0x80, 0x01); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x7f, 0xff, 0x80); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x80, 0x00, 0x80); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x80, 0x7f, 0xff); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x80, 0x80, 0x00); | 
|  | test_alu_b_vx("vrsub.b.vx", 0x80, 0xff, 0x7f); | 
|  | test_alu_b_vx("vrsub.b.vx", 0xff, 0x00, 0x01); | 
|  | test_alu_b_vx("vrsub.b.vx", 0xff, 0x7f, 0x80); | 
|  | test_alu_b_vx("vrsub.b.vx", 0xff, 0x80, 0x81); | 
|  | test_alu_b_vx("vrsub.b.vx", 0xff, 0xff, 0x00); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x0000, 0x0000, 0x0000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x1234, 0x3456, 0x2222); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x3456, 0x1234, 0xddde); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x0000, 0x0000, 0x0000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x0000, 0x7fff, 0x7fff); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x0000, 0x8000, 0x8000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x0000, 0xffff, 0xffff); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x7fff, 0x0000, 0x8001); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x7fff, 0x7fff, 0x0000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x7fff, 0x8000, 0x0001); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x7fff, 0xffff, 0x8000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x8000, 0x0000, 0x8000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x8000, 0x7fff, 0xffff); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x8000, 0x8000, 0x0000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0x8000, 0xffff, 0x7fff); | 
|  | test_alu_h_vx("vrsub.h.vx", 0xffff, 0x0000, 0x0001); | 
|  | test_alu_h_vx("vrsub.h.vx", 0xffff, 0x7fff, 0x8000); | 
|  | test_alu_h_vx("vrsub.h.vx", 0xffff, 0x8000, 0x8001); | 
|  | test_alu_h_vx("vrsub.h.vx", 0xffff, 0xffff, 0x0000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x00000000, 0x00000000, 0x00000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x12345678, 0x3456789a, 0x22222222); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x3456789a, 0x12345678, 0xddddddde); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x00000000, 0x00000000, 0x00000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x00000000, 0x7fffffff, 0x7fffffff); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x00000000, 0x80000000, 0x80000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x00000000, 0xffffffff, 0xffffffff); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x7fffffff, 0x00000000, 0x80000001); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x7fffffff, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x7fffffff, 0x80000000, 0x00000001); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x7fffffff, 0xffffffff, 0x80000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x80000000, 0x00000000, 0x80000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x80000000, 0x7fffffff, 0xffffffff); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x80000000, 0x80000000, 0x00000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0x80000000, 0xffffffff, 0x7fffffff); | 
|  | test_alu_w_vx("vrsub.w.vx", 0xffffffff, 0x00000000, 0x00000001); | 
|  | test_alu_w_vx("vrsub.w.vx", 0xffffffff, 0x7fffffff, 0x80000000); | 
|  | test_alu_w_vx("vrsub.w.vx", 0xffffffff, 0x80000000, 0x80000001); | 
|  | test_alu_w_vx("vrsub.w.vx", 0xffffffff, 0xffffffff, 0x00000000); | 
|  |  | 
|  | test_alu_b_vv("vsub.b.vv", 0x00, 0x01, 0xff); | 
|  | test_alu_b_vv("vsub.b.vv", 0xff, 0x01, 0xfe); | 
|  | test_alu_b_vv("vsub.b.vv", 0xa0, 0x5f, 0x41); | 
|  | test_alu_h_vv("vsub.h.vv", 0x0000, 0x0001, 0xffff); | 
|  | test_alu_h_vv("vsub.h.vv", 0x00ff, 0x0001, 0x00fe); | 
|  | test_alu_h_vv("vsub.h.vv", 0xffff, 0x0001, 0xfffe); | 
|  | test_alu_h_vv("vsub.h.vv", 0xa05f, 0x5fa0, 0x40bf); | 
|  | test_alu_w_vv("vsub.w.vv", 0x00000000, 0x00000001, 0xffffffff); | 
|  | test_alu_w_vv("vsub.w.vv", 0x000000ff, 0x00000001, 0x000000fe); | 
|  | test_alu_w_vv("vsub.w.vv", 0x0000ffff, 0x00000001, 0x0000fffe); | 
|  | test_alu_w_vv("vsub.w.vv", 0xffffffff, 0x00000001, 0xfffffffe); | 
|  | test_alu_w_vv("vsub.w.vv", 0xa05f1234, 0x5fa0edcb, 0x40be2469); | 
|  |  | 
|  | test_alu_b_vv("vsubs.b.vv", 0x00, 0x01, 0xff); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x7f, 0x01, 0x7e); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x7f, 0x80, 0x7f); | 
|  | test_alu_b_vv("vsubs.b.vv", 0xff, 0x01, 0xfe); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x80, 0x01, 0x80); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x80, 0x80, 0x00); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x80, 0xff, 0x81); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x7f, 0x7f, 0x00); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x7f, 0x80, 0x7f); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x7f, 0xff, 0x7f); | 
|  | test_alu_b_vv("vsubs.b.vv", 0x80, 0x7f, 0x80); | 
|  | test_alu_b_vv("vsubs.b.vv", 0xff, 0xff, 0x00); | 
|  | test_alu_b_vv("vsubs.b.vv", 0xa0, 0x5f, 0x80); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x0000, 0x0001, 0xffff); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x007f, 0x0001, 0x007e); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x00ff, 0x0001, 0x00fe); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x7fff, 0x0001, 0x7ffe); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x7fff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vsubs.h.vv", 0xffff, 0x0001, 0xfffe); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x0080, 0x0001, 0x007f); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x0080, 0x00ff, 0xff81); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x8000, 0x7fff, 0x8000); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x8000, 0x0001, 0x8000); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x8000, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x8000, 0xffff, 0x8001); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x7fff, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x7fff, 0x8000, 0x7fff); | 
|  | test_alu_h_vv("vsubs.h.vv", 0x7fff, 0xffff, 0x7fff); | 
|  | test_alu_h_vv("vsubs.h.vv", 0xffff, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.vv", 0xa05f, 0x5fa0, 0x8000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x00000000, 0x00000001, 0xffffffff); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x000000ff, 0x00000001, 0x000000fe); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x0000ffff, 0x00000001, 0x0000fffe); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x7fffffff, 0x00000001, 0x7ffffffe); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x7fffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vsubs.w.vv", 0xffffffff, 0x00000001, 0xfffffffe); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x80000000, 0x00000001, 0x80000000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x80000000, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x80000000, 0x7fffffff, 0x80000000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x80000000, 0xffffffff, 0x80000001); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x7fffffff, 0x80000000, 0x7fffffff); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x7fffffff, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0x7fffffff, 0xffffffff, 0x7fffffff); | 
|  | test_alu_w_vv("vsubs.w.vv", 0xffffffff, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.vv", 0xa05f1234, 0x5fa0edcb, 0x80000000); | 
|  |  | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x00, 0x01, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x7f, 0x01, 0x7e); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x80, 0x7f, 0x01); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0xff, 0x01, 0xfe); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x80, 0x01, 0x7f); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x80, 0x80, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x80, 0xff, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x7f, 0x7f, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x7f, 0x80, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0x7f, 0xff, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0xff, 0xff, 0x00); | 
|  | test_alu_b_vv("vsubs.b.u.vv", 0xa0, 0x5f, 0x41); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x0000, 0x0001, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x007f, 0x0001, 0x007e); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x00ff, 0x0001, 0x00fe); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x7fff, 0x0001, 0x7ffe); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x7fff, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0xffff, 0x0001, 0xfffe); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x0080, 0x0001, 0x007f); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x0080, 0x00ff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x8000, 0x0001, 0x7fff); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x8000, 0x7fff, 0x0001); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x8000, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x8000, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x7fff, 0x7fff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x7fff, 0x8000, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0x7fff, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0xffff, 0xffff, 0x0000); | 
|  | test_alu_h_vv("vsubs.h.u.vv", 0xa05f, 0x5fa0, 0x40bf); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x00000000, 0x00000001, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x000000ff, 0x00000001, 0x000000fe); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x0000ffff, 0x00000001, 0x0000fffe); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x7fffffff, 0x00000001, 0x7ffffffe); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x7fffffff, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0xffffffff, 0x00000001, 0xfffffffe); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x80000000, 0x00000001, 0x7fffffff); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x80000000, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x80000000, 0x7fffffff, 0x00000001); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x80000000, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x7fffffff, 0x80000000, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x7fffffff, 0x7fffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0x7fffffff, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0xffffffff, 0xffffffff, 0x00000000); | 
|  | test_alu_w_vv("vsubs.w.u.vv", 0xa05f1234, 0x5fa0edcb, 0x40be2469); | 
|  |  | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x00, 0x01, 0xffff); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x7f, 0x01, 0x007e); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x80, 0x7f, 0xff01); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0xff, 0x01, 0xfffe); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x80, 0x01, 0xff7f); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x80, 0x80, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x80, 0xff, 0xff81); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x7f, 0x7f, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x7f, 0x80, 0x00ff); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0x7f, 0xff, 0x0080); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0xff, 0xff, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.vv", 0xa0, 0x5f, 0xff41); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x0000, 0x0001, 0xffffffff); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x007f, 0x0001, 0x0000007e); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x00ff, 0x0001, 0x000000fe); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x7fff, 0x0001, 0x00007ffe); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x8000, 0x7fff, 0xffff0001); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0xffff, 0x0001, 0xfffffffe); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x0080, 0x0001, 0x0000007f); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x0080, 0x00ff, 0xffffff81); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x8000, 0x0001, 0xffff7fff); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x8000, 0x8000, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x8000, 0xffff, 0xffff8001); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x7fff, 0x7fff, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x7fff, 0x8000, 0x0000ffff); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0x7fff, 0xffff, 0x00008000); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0xffff, 0xffff, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.vv", 0xa05f, 0x5fa0, 0xffff40bf); | 
|  |  | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x00, 0x01, 0xffff); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x7f, 0x01, 0x007e); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x80, 0x7f, 0x0001); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0xff, 0x01, 0x00fe); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x80, 0x01, 0x007f); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x80, 0x80, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x80, 0xff, 0xff81); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x7f, 0x7f, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x7f, 0x80, 0xffff); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0x7f, 0xff, 0xff80); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0xff, 0xff, 0x0000); | 
|  | test_aluw_h_vv("vsubw.h.u.vv", 0xa0, 0x5f, 0x0041); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x0000, 0x0001, 0xffffffff); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x007f, 0x0001, 0x0000007e); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x00ff, 0x0001, 0x000000fe); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x7fff, 0x0001, 0x00007ffe); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0xffff, 0x0001, 0x0000fffe); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x0080, 0x0001, 0x0000007f); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x0080, 0x00ff, 0xffffff81); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x8000, 0x0001, 0x00007fff); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x8000, 0x7fff, 0x00000001); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x8000, 0x8000, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x8000, 0xffff, 0xffff8001); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x7fff, 0x7fff, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x7fff, 0x8000, 0xffffffff); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0x7fff, 0xffff, 0xffff8000); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0xffff, 0xffff, 0x00000000); | 
|  | test_aluw_w_vv("vsubw.w.u.vv", 0xa05f, 0x5fa0, 0x000040bf); | 
|  |  | 
|  | return 0; | 
|  | } |