mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-13 06:33:56 +00:00
none/tests/x86/insn_fpu works correctly. git-svn-id: svn://svn.valgrind.org/vex/trunk@598
44 lines
660 B
C
44 lines
660 B
C
|
|
#include <stdio.h>
|
|
|
|
void fldcw_default ( void )
|
|
{
|
|
asm(" pushw $0x037F ; fldcw (%esp) ; addl $2, %esp");
|
|
}
|
|
|
|
void fldcw_exns ( void )
|
|
{
|
|
asm(" pushw $0x037E ; fldcw (%esp) ; addl $2, %esp");
|
|
}
|
|
|
|
void fldcw_precision ( void )
|
|
{
|
|
asm(" pushw $0x007F ; fldcw (%esp) ; addl $2, %esp");
|
|
}
|
|
|
|
void fldcw_rounding ( void )
|
|
{
|
|
asm(" pushw $0x077F ; fldcw (%esp) ; addl $2, %esp");
|
|
}
|
|
|
|
int main ( void )
|
|
{
|
|
printf("default\n");
|
|
fldcw_default();
|
|
printf("\n");
|
|
|
|
printf("exns\n");
|
|
fldcw_exns();
|
|
printf("\n");
|
|
|
|
printf("precision\n");
|
|
fldcw_precision();
|
|
printf("\n");
|
|
|
|
printf("rounding\n");
|
|
fldcw_rounding();
|
|
printf("\n");
|
|
|
|
return 0;
|
|
}
|