From 233cea585caf6824e1176d5777d29ae3289663f0 Mon Sep 17 00:00:00 2001 From: Denis Drakhnia Date: Thu, 4 Jan 2024 06:07:15 +0200 Subject: [PATCH] asm: add some f80 tests --- tests/asm/f80/fxaddxx-1.S | 14 ++++++++++++++ tests/asm/f80/fxmulxx-1.S | 14 ++++++++++++++ tests/asm/f80/fxsubxx-1.S | 14 ++++++++++++++ tests/asm/f80/movif-movfi-1.S | 10 ++++++++++ tests/asm/meson.build | 6 ++++++ 5 files changed, 58 insertions(+) create mode 100644 tests/asm/f80/fxaddxx-1.S create mode 100644 tests/asm/f80/fxmulxx-1.S create mode 100644 tests/asm/f80/fxsubxx-1.S create mode 100644 tests/asm/f80/movif-movfi-1.S diff --git a/tests/asm/f80/fxaddxx-1.S b/tests/asm/f80/fxaddxx-1.S new file mode 100644 index 0000000..c3f246e --- /dev/null +++ b/tests/asm/f80/fxaddxx-1.S @@ -0,0 +1,14 @@ +#include "test_start.S" + + setwd wsz=8, nfx=0 + shld,0 1, 63, %r0 + { + movif,0 %r0, 0x4000, %r0 + movif,1 %r0, 0x4001, %r1 + } + fxaddxx,0 %r0, %r1, %r2 + movfi,0 %r2, %r3 + assert_eq_i64(%r2, 0xc000000000000000) + assert_eq_i32(%r3, 0x4001) + +#include "test_end.S" diff --git a/tests/asm/f80/fxmulxx-1.S b/tests/asm/f80/fxmulxx-1.S new file mode 100644 index 0000000..d82ce05 --- /dev/null +++ b/tests/asm/f80/fxmulxx-1.S @@ -0,0 +1,14 @@ +#include "test_start.S" + + setwd wsz=8, nfx=0 + shld,0 1, 63, %r0 + { + movif,0 %r0, 0x4000, %r0 + movif,1 %r0, 0x4001, %r1 + } + fxmulxx,0 %r0, %r1, %r2 + movfi,0 %r2, %r3 + assert_eq_i64(%r2, 0x8000000000000000) + assert_eq_i32(%r3, 0x4002) + +#include "test_end.S" diff --git a/tests/asm/f80/fxsubxx-1.S b/tests/asm/f80/fxsubxx-1.S new file mode 100644 index 0000000..bd74534 --- /dev/null +++ b/tests/asm/f80/fxsubxx-1.S @@ -0,0 +1,14 @@ +#include "test_start.S" + + setwd wsz=8, nfx=0 + shld,0 1, 63, %r0 + { + movif,0 %r0, 0x4000, %r0 + movif,1 %r0, 0x4001, %r1 + } + fxsubxx,0 %r0, %r1, %r2 + movfi,0 %r2, %r3 + assert_eq_i64(%r2, 0x8000000000000000) + assert_eq_i32(%r3, 0xc000) + +#include "test_end.S" diff --git a/tests/asm/f80/movif-movfi-1.S b/tests/asm/f80/movif-movfi-1.S new file mode 100644 index 0000000..ea42ff2 --- /dev/null +++ b/tests/asm/f80/movif-movfi-1.S @@ -0,0 +1,10 @@ +#include "test_start.S" + + setwd wsz=8, nfx=0 + addd,0 0, 0xaaaaaaaa, %g16 + movif %g16, 0xbeef, %g17 + movfi %g17, %g18 + assert_eq_i64(%g17, 0xaaaaaaaa) + assert_eq_i32(%g18, 0xbeef) + +#include "test_end.S" diff --git a/tests/asm/meson.build b/tests/asm/meson.build index 99c1e81..12ae9d7 100644 --- a/tests/asm/meson.build +++ b/tests/asm/meson.build @@ -190,6 +190,12 @@ asm_tests = { 'invalid-arg-1': {}, 'invalid-arg-hi-1': {}, }, + 'f80': { + 'movif-movfi-1': {}, + 'fxaddxx-1': {}, + 'fxsubxx-1': {}, + 'fxmulxx-1': {}, + }, } foreach suite, tests : asm_tests