summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/libgcc2.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2013-12-18 19:07:29 +0000
committerpfg <pfg@FreeBSD.org>2013-12-18 19:07:29 +0000
commit6f93e9ad10bb17a8b07e0cab16df0097d5ba6090 (patch)
tree234e9f04b601b7b9c9ff48f56f79bcd379485350 /contrib/gcc/libgcc2.c
parenta70f2adf579c967cdf8017632ea2266fe2e9eb4a (diff)
downloadFreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.zip
FreeBSD-src-6f93e9ad10bb17a8b07e0cab16df0097d5ba6090.tar.gz
MFC r258428, r258445
gcc: another round of merges from the gcc pre-43 branch. Bring The following revisions from the gcc43 branch[1]: 118360, 118361, 118363, 118576, 119820, 123906, 125246, and 125721. They all have in common that the were merged long ago into Apple's gcc and should help improve the general quality of the compiler and make it easier to bring new features from Apple's gcc42. For details please review the additions to the files: gcc/ChangeLog.gcc43 gcc/cp/ChangeLog.gcc43 (new, adds previous revisions) Fix crosscompilation (r258445 by andreast) Reference: [1] http://gcc.gnu.org/viewcvs/gcc/trunk/?pathrev=126700 Obtained from: gcc pre4.3 (GPLv2) branch MFC after: 3 weeks
Diffstat (limited to 'contrib/gcc/libgcc2.c')
-rw-r--r--contrib/gcc/libgcc2.c26
1 files changed, 25 insertions, 1 deletions
diff --git a/contrib/gcc/libgcc2.c b/contrib/gcc/libgcc2.c
index 851bdd0..58ad320 100644
--- a/contrib/gcc/libgcc2.c
+++ b/contrib/gcc/libgcc2.c
@@ -492,6 +492,30 @@ __ashrdi3 (DWtype u, word_type b)
}
#endif
+#ifdef L_bswapsi2
+UWtype
+__bswapsi2 (UWtype u)
+{
+ return ((((u) & 0xff000000) >> 24)
+ | (((u) & 0x00ff0000) >> 8)
+ | (((u) & 0x0000ff00) << 8)
+ | (((u) & 0x000000ff) << 24));
+}
+#endif
+#ifdef L_bswapdi2
+UDWtype
+__bswapdi2 (UDWtype u)
+{
+ return ((((u) & 0xff00000000000000ull) >> 56)
+ | (((u) & 0x00ff000000000000ull) >> 40)
+ | (((u) & 0x0000ff0000000000ull) >> 24)
+ | (((u) & 0x000000ff00000000ull) >> 8)
+ | (((u) & 0x00000000ff000000ull) << 8)
+ | (((u) & 0x0000000000ff0000ull) << 24)
+ | (((u) & 0x000000000000ff00ull) << 40)
+ | (((u) & 0x00000000000000ffull) << 56));
+}
+#endif
#ifdef L_ffssi2
#undef int
int
@@ -1862,7 +1886,7 @@ CONCAT3(__div,MODE,3) (MTYPE a, MTYPE b, MTYPE c, MTYPE d)
{
MTYPE denom, ratio, x, y;
- /* ??? We can get better behavior from logarithmic scaling instead of
+ /* ??? We can get better behavior from logarithmic scaling instead of
the division. But that would mean starting to link libgcc against
libm. We could implement something akin to ldexp/frexp as gcc builtins
fairly easily... */
OpenPOWER on IntegriCloud