test.c

来自「纯C论坛·电子杂志·2004.10期.SP1(总第1期)SP1」· C语言 代码 · 共 36 行

C
36
字号
/* ---------------------------- test.c ------------------------------------ */void f(int x[]){        int f[] = {1,2,3,4,5,6,7,8,9} ;/*----------------------------- A 部分 ------------------------------*/        __asm__( "fildl %0"::"m"(f[0]) ) ;        __asm__( "fildl %0"::"m"(f[1]) ) ;        __asm__( "fildl %0"::"m"(f[2]) ) ;        __asm__( "fildl %0"::"m"(f[3]) ) ;        __asm__( "fildl %0"::"m"(f[4]) ) ;        __asm__( "fildl %0"::"m"(f[5]) ) ;        __asm__( "fildl %0"::"m"(f[6]) ) ;        __asm__( "fildl %0"::"m"(f[7]) ) ;        // __asm__( "fildl %0"::"m"(f[8]) ) ;                              (*)        // __asm__( "fst %st(3)" ) ;                                       (**)/* ------------------------------ B部分 ---------------------------------*/        __asm__( "fistpl %0"::"m"(x[0]) ) ;        __asm__( "fistpl %0"::"m"(x[1]) ) ;        __asm__( "fistpl %0"::"m"(x[2]) ) ;        __asm__( "fistpl %0"::"m"(x[3]) ) ;        __asm__( "fistpl %0"::"m"(x[4]) ) ;        __asm__( "fistpl %0"::"m"(x[5]) ) ;        __asm__( "fistpl %0"::"m"(x[6]) ) ;        __asm__( "fistpl %0"::"m"(x[7]) ) ;}void main(){        int x[8] , j ;        f(x) ;        for( j = 0 ; j < 8 ; ++j )                printf( "%d\n" , x[j] ) ;}

⌨️ 快捷键说明

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