⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 builtin-apply-mmx.c

📁 用于进行gcc测试
💻 C
字号:
/* __builtin_apply_args () and __builtin_return () built-in functions does   not function properly when -mmmx is used in compile flags.   __builtin_apply_args () saves all registers that pass arguments to a   function, including %mm0-%mm3, to a memory block, and __builtin_return ()   restores %mm0, from a return memory block, as it can be used as a   function return register.  Unfortunatelly, when MMX registers are touched,   i387 FPU switches to MMX mode, and no FP operation is possible until emms   instruction is issued.  *//* This test case is adapted from gcc.dg/builtin-apply4.c.  */ /* { dg-do run { xfail "*-*-*" } } *//* { dg-options "-O2 -mmmx" } *//* { dg-require-effective-target ilp32 } */#include "mmx-check.h"extern void abort (void);doublefoo (double arg){  if (arg != 116.0)    abort ();  return arg + 1.0;}inline doublebar (double arg){  foo (arg);  __builtin_return (__builtin_apply ((void (*)()) foo,				     __builtin_apply_args (), 16));}static voidmmx_test (void){  if (bar (116.0) != 117.0)    abort ();}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -