Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/sharedRuntimeTrans.cpp @ 18041:52b4284cb496
Merge with jdk8u20-b26
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 15 Oct 2014 16:02:50 +0200 |
parents | 4ca6dc0799b6 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
17606:45d7b2c7029d | 18041:52b4284cb496 |
---|---|
54 #else | 54 #else |
55 # define __HI(x) *(int*)&x | 55 # define __HI(x) *(int*)&x |
56 # define __LO(x) *(1+(int*)&x) | 56 # define __LO(x) *(1+(int*)&x) |
57 #endif | 57 #endif |
58 | 58 |
59 #if !defined(AIX) | |
59 double copysign(double x, double y) { | 60 double copysign(double x, double y) { |
60 __HI(x) = (__HI(x)&0x7fffffff)|(__HI(y)&0x80000000); | 61 __HI(x) = (__HI(x)&0x7fffffff)|(__HI(y)&0x80000000); |
61 return x; | 62 return x; |
62 } | 63 } |
64 #endif | |
63 | 65 |
64 /* | 66 /* |
65 * ==================================================== | 67 * ==================================================== |
66 * Copyright (c) 1998 Oracle and/or its affiliates. All rights reserved. | 68 * Copyright (c) 1998 Oracle and/or its affiliates. All rights reserved. |
67 * | 69 * |
83 two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ | 85 two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ |
84 twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ | 86 twom54 = 5.55111512312578270212e-17, /* 0x3C900000, 0x00000000 */ |
85 hugeX = 1.0e+300, | 87 hugeX = 1.0e+300, |
86 tiny = 1.0e-300; | 88 tiny = 1.0e-300; |
87 | 89 |
90 #if !defined(AIX) | |
88 double scalbn (double x, int n) { | 91 double scalbn (double x, int n) { |
89 int k,hx,lx; | 92 int k,hx,lx; |
90 hx = __HI(x); | 93 hx = __HI(x); |
91 lx = __LO(x); | 94 lx = __LO(x); |
92 k = (hx&0x7ff00000)>>20; /* extract exponent */ | 95 k = (hx&0x7ff00000)>>20; /* extract exponent */ |
109 } | 112 } |
110 k += 54; /* subnormal result */ | 113 k += 54; /* subnormal result */ |
111 __HI(x) = (hx&0x800fffff)|(k<<20); | 114 __HI(x) = (hx&0x800fffff)|(k<<20); |
112 return x*twom54; | 115 return x*twom54; |
113 } | 116 } |
117 #endif | |
114 | 118 |
115 /* __ieee754_log(x) | 119 /* __ieee754_log(x) |
116 * Return the logrithm of x | 120 * Return the logrithm of x |
117 * | 121 * |
118 * Method : | 122 * Method : |