Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Side by Side Diff: gcc/longlong.h

Issue 22638012: Use long long builtins of zero counting for x86-64. (Closed) Base URL: http://git.chromium.org/native_client/nacl-gcc.git@master
Patch Set: Sort changelog Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gcc/ChangeLog ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* longlong.h -- definitions for mixed size 32/64 bit arithmetic. 1 /* longlong.h -- definitions for mixed size 32/64 bit arithmetic.
2 Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2 Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6 This file is part of the GNU C Library. 6 This file is part of the GNU C Library.
7 7
8 The GNU C Library is free software; you can redistribute it and/or 8 The GNU C Library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public 9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version. 11 version 2.1 of the License, or (at your option) any later version.
12 12
13 In addition to the permissions in the GNU Lesser General Public 13 In addition to the permissions in the GNU Lesser General Public
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 "=d" ((UDItype) (w1)) \ 400 "=d" ((UDItype) (w1)) \
401 : "%0" ((UDItype) (u)), \ 401 : "%0" ((UDItype) (u)), \
402 "rm" ((UDItype) (v))) 402 "rm" ((UDItype) (v)))
403 #define udiv_qrnnd(q, r, n1, n0, dv) \ 403 #define udiv_qrnnd(q, r, n1, n0, dv) \
404 __asm__ ("div{q} %4" \ 404 __asm__ ("div{q} %4" \
405 : "=a" ((UDItype) (q)), \ 405 : "=a" ((UDItype) (q)), \
406 "=d" ((UDItype) (r)) \ 406 "=d" ((UDItype) (r)) \
407 : "0" ((UDItype) (n0)), \ 407 : "0" ((UDItype) (n0)), \
408 "1" ((UDItype) (n1)), \ 408 "1" ((UDItype) (n1)), \
409 "rm" ((UDItype) (dv))) 409 "rm" ((UDItype) (dv)))
410 #define count_leading_zeros(count, x)» ((count) = __builtin_clzl (x)) 410 #define count_leading_zeros(count, x)» ((count) = __builtin_clzll (x))
411 #define count_trailing_zeros(count, x)» ((count) = __builtin_ctzl (x)) 411 #define count_trailing_zeros(count, x)» ((count) = __builtin_ctzll (x))
412 #define UMUL_TIME 40 412 #define UMUL_TIME 40
413 #define UDIV_TIME 40 413 #define UDIV_TIME 40
414 #endif /* x86_64 */ 414 #endif /* x86_64 */
415 415
416 #if defined (__i960__) && W_TYPE_SIZE == 32 416 #if defined (__i960__) && W_TYPE_SIZE == 32
417 #define umul_ppmm(w1, w0, u, v) \ 417 #define umul_ppmm(w1, w0, u, v) \
418 ({union {UDItype __ll; \ 418 ({union {UDItype __ll; \
419 struct {USItype __l, __h;} __i; \ 419 struct {USItype __l, __h;} __i; \
420 } __xx; \ 420 } __xx; \
421 __asm__ ("emul %2,%1,%0" \ 421 __asm__ ("emul %2,%1,%0" \
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 UWtype __ctz_x = (x); \ 1516 UWtype __ctz_x = (x); \
1517 UWtype __ctz_c; \ 1517 UWtype __ctz_c; \
1518 count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \ 1518 count_leading_zeros (__ctz_c, __ctz_x & -__ctz_x); \
1519 (count) = W_TYPE_SIZE - 1 - __ctz_c; \ 1519 (count) = W_TYPE_SIZE - 1 - __ctz_c; \
1520 } while (0) 1520 } while (0)
1521 #endif 1521 #endif
1522 1522
1523 #ifndef UDIV_NEEDS_NORMALIZATION 1523 #ifndef UDIV_NEEDS_NORMALIZATION
1524 #define UDIV_NEEDS_NORMALIZATION 0 1524 #define UDIV_NEEDS_NORMALIZATION 0
1525 #endif 1525 #endif
OLDNEW
« no previous file with comments | « gcc/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698