/[qemu]/qemu/helper-i386.c
ViewVC logotype

Diff of /qemu/helper-i386.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by bellard, Mon Jun 9 15:25:54 2003 UTC revision 1.3 by bellard, Sun Jun 15 19:49:16 2003 UTC
# Line 19  Line 19 
19   */   */
20  #include "exec-i386.h"  #include "exec-i386.h"
21    
22    const uint8_t parity_table[256] = {
23        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
24        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
25        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
26        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
27        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
28        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
29        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
30        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
31        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
32        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
33        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
34        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
35        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
36        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
37        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
38        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
39        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
40        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
41        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
42        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
43        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
44        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
45        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
46        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
47        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
48        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
49        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
50        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
51        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
52        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
53        CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0,
54        0, CC_P, CC_P, 0, CC_P, 0, 0, CC_P,
55    };
56    
57    /* modulo 17 table */
58    const uint8_t rclw_table[32] = {
59        0, 1, 2, 3, 4, 5, 6, 7,
60        8, 9,10,11,12,13,14,15,
61       16, 0, 1, 2, 3, 4, 5, 6,
62        7, 8, 9,10,11,12,13,14,
63    };
64    
65    /* modulo 9 table */
66    const uint8_t rclb_table[32] = {
67        0, 1, 2, 3, 4, 5, 6, 7,
68        8, 0, 1, 2, 3, 4, 5, 6,
69        7, 8, 0, 1, 2, 3, 4, 5,
70        6, 7, 8, 0, 1, 2, 3, 4,
71    };
72    
73  const CPU86_LDouble f15rk[7] =  const CPU86_LDouble f15rk[7] =
74  {  {
75      0.00000000000000000000L,      0.00000000000000000000L,
# Line 693  void helper_fsincos(void) Line 744  void helper_fsincos(void)
744    
745  void helper_frndint(void)  void helper_frndint(void)
746  {  {
747      ST0 = rint(ST0);      CPU86_LDouble a;
748    
749        a = ST0;
750    #ifdef __arm__
751        switch(env->fpuc & RC_MASK) {
752        default:
753        case RC_NEAR:
754            asm("rndd %0, %1" : "=f" (a) : "f"(a));
755            break;
756        case RC_DOWN:
757            asm("rnddm %0, %1" : "=f" (a) : "f"(a));
758            break;
759        case RC_UP:
760            asm("rnddp %0, %1" : "=f" (a) : "f"(a));
761            break;
762        case RC_CHOP:
763            asm("rnddz %0, %1" : "=f" (a) : "f"(a));
764            break;
765        }
766    #else
767        a = rint(a);
768    #endif
769        ST0 = a;
770  }  }
771    
772  void helper_fscale(void)  void helper_fscale(void)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26