diff options
author | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-05-05 11:39:57 +0000 |
---|---|---|
committer | xleroy <xleroy@fca1b0fc-160b-0410-b1d3-a4f43f01ea2e> | 2014-05-05 11:39:57 +0000 |
commit | af2b5e2efd6bf7d682e74a3fde5d54e960fa34af (patch) | |
tree | 50a50efc714ac699660edf905b28f89d70f80e4e /test | |
parent | f126a1c0f2bc6434b6478c863ad910bf996ffbe1 (diff) | |
download | compcert-af2b5e2efd6bf7d682e74a3fde5d54e960fa34af.tar.gz compcert-af2b5e2efd6bf7d682e74a3fde5d54e960fa34af.zip |
Fused multiply-add for IA32.
git-svn-id: https://yquem.inria.fr/compcert/svn/compcert/trunk@2481 fca1b0fc-160b-0410-b1d3-a4f43f01ea2e
Diffstat (limited to 'test')
-rw-r--r-- | test/regression/builtins-ia32.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/regression/builtins-ia32.c b/test/regression/builtins-ia32.c index 4ce54889..91455188 100644 --- a/test/regression/builtins-ia32.c +++ b/test/regression/builtins-ia32.c @@ -8,6 +8,7 @@ int main(int argc, char ** argv) unsigned int y = 0xDEADBEEF; double a = 3.14159; double b = 2.718; + double c = 1.414; unsigned short s = 0x1234; printf("bswap(%x) = %x\n", x, __builtin_bswap(x)); @@ -17,6 +18,13 @@ int main(int argc, char ** argv) printf("fmin(%f, %f) = %f\n", a, b, __builtin_fmin(a, b)); printf("fmax(%f, %f) = %f\n", a, b, __builtin_fmax(a, b)); +#ifdef FMA3 + printf("fmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fmadd(a, b, c)); + printf("fmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fmsub(a, b, c)); + printf("fnmadd(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmadd(a, b, c)); + printf("fnmsub(%f, %f, %f) = %f\n", a, b, c, __builtin_fnmsub(a, b, c)); +#endif + printf ("read_16_rev = %x\n", __builtin_read16_reversed(&s)); printf ("read_32_rev = %x\n", __builtin_read32_reversed(&y)); __builtin_write16_reversed(&s, 0x789A); |