diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-09-24 20:34:04 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-09-28 15:56:47 -0700 |
commit | 85c40db208db3e26f507dc6a74a5dc540b504b5c (patch) | |
tree | 88ddd7440be666a4305a55e4ca1130ae7636a4f6 /riscv/insns/fmax_q.h | |
parent | bd85811c35ea38180d27440507fc222d585ef780 (diff) | |
download | spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.zip spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.tar.gz spike-85c40db208db3e26f507dc6a74a5dc540b504b5c.tar.bz2 |
Implement Q extension
Diffstat (limited to 'riscv/insns/fmax_q.h')
-rw-r--r-- | riscv/insns/fmax_q.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/riscv/insns/fmax_q.h b/riscv/insns/fmax_q.h new file mode 100644 index 0000000..719e6d0 --- /dev/null +++ b/riscv/insns/fmax_q.h @@ -0,0 +1,8 @@ +require_extension('Q'); +require_fp; +bool greater = f128_lt_quiet(f128(FRS2), f128(FRS1)) || + (f128_eq(f128(FRS2), f128(FRS1)) && (f128(FRS2).v[1] & F64_SIGN)); +WRITE_FRD(greater || isNaNF128(f128(FRS2)) ? FRS1 : FRS2); +if (isNaNF128(f128(FRS1)) && isNaNF128(f128(FRS2))) + WRITE_FRD(f128(defaultNaNF128())); +set_fp_exceptions; |