Commit fd2d9121 by Richard Henderson Committed by Richard Henderson

Add and use HOST_WIDEST_INT_C, HOST_WIDE_INT_C.

From-SVN: r188535
parent db8c4965
2012-06-13 Richard Henderson <rth@redhat.com>
* hwint.h (HOST_WIDEST_INT_C): New.
(HOST_WIDE_INT_C): New.
(HOST_WIDE_INT_1): Use it.
* config/alpha/alpha.c (alpha_trampoline_init): Use it.
2012-06-13 Alexandre Oliva <aoliva@redhat.com> 2012-06-13 Alexandre Oliva <aoliva@redhat.com>
PR debug/49888 PR debug/49888
......
...@@ -5451,8 +5451,6 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) ...@@ -5451,8 +5451,6 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
chain_value = convert_memory_address (Pmode, chain_value); chain_value = convert_memory_address (Pmode, chain_value);
#endif #endif
#define HWI_HEX2(X,Y) (((HOST_WIDE_INT)0x ## X ## u << 32) | 0x ## Y ## u)
if (TARGET_ABI_OPEN_VMS) if (TARGET_ABI_OPEN_VMS)
{ {
const char *fnname; const char *fnname;
...@@ -5471,7 +5469,8 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) ...@@ -5471,7 +5469,8 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
the VMS calling standard. This is stored in the first quadword. */ the VMS calling standard. This is stored in the first quadword. */
word1 = force_reg (DImode, gen_const_mem (DImode, fnaddr)); word1 = force_reg (DImode, gen_const_mem (DImode, fnaddr));
word1 = expand_and (DImode, word1, word1 = expand_and (DImode, word1,
GEN_INT (HWI_HEX2(ffff0fff,0000fff0)), NULL); GEN_INT (HOST_WIDE_INT_C (0xffff0fff0000fff0)),
NULL);
} }
else else
{ {
...@@ -5482,12 +5481,10 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value) ...@@ -5482,12 +5481,10 @@ alpha_trampoline_init (rtx m_tramp, tree fndecl, rtx chain_value)
nop nop
We don't bother setting the HINT field of the jump; the nop We don't bother setting the HINT field of the jump; the nop
is merely there for padding. */ is merely there for padding. */
word1 = GEN_INT (HWI_HEX2 (a77b0010,a43b0018)); word1 = GEN_INT (HOST_WIDE_INT_C (0xa77b0010a43b0018));
word2 = GEN_INT (HWI_HEX2 (47ff041f,6bfb0000)); word2 = GEN_INT (HOST_WIDE_INT_C (0x47ff041f6bfb0000));
} }
#undef HWI_HEX2
/* Store the first two words, as computed above. */ /* Store the first two words, as computed above. */
mem = adjust_address (m_tramp, DImode, 0); mem = adjust_address (m_tramp, DImode, 0);
emit_move_insn (mem, word1); emit_move_insn (mem, word1);
......
/* HOST_WIDE_INT definitions for the GNU compiler. /* HOST_WIDE_INT definitions for the GNU compiler.
Copyright (C) 1998, 2002, 2004, 2008, 2009, 2010 Copyright (C) 1998, 2002, 2004, 2008, 2009, 2010, 2012
Free Software Foundation, Inc. Free Software Foundation, Inc.
This file is part of GCC. This file is part of GCC.
...@@ -60,20 +60,25 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1]; ...@@ -60,20 +60,25 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1];
#if HOST_BITS_PER_LONG >= 64 || !defined NEED_64BIT_HOST_WIDE_INT #if HOST_BITS_PER_LONG >= 64 || !defined NEED_64BIT_HOST_WIDE_INT
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG # define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONG
# define HOST_WIDE_INT long # define HOST_WIDE_INT long
# define HOST_WIDE_INT_C(X) X ## L
#else #else
# if HOST_BITS_PER_LONGLONG >= 64 # if HOST_BITS_PER_LONGLONG >= 64
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG # define HOST_BITS_PER_WIDE_INT HOST_BITS_PER_LONGLONG
# define HOST_WIDE_INT long long # define HOST_WIDE_INT long long
# define HOST_WIDE_INT_C(X) X ## LL
# else # else
# if HOST_BITS_PER___INT64 >= 64 # if HOST_BITS_PER___INT64 >= 64
# define HOST_BITS_PER_WIDE_INT HOST_BITS_PER___INT64 # define HOST_BITS_PER_WIDE_INT HOST_BITS_PER___INT64
# define HOST_WIDE_INT __int64 # define HOST_WIDE_INT __int64
# define HOST_WIDE_INT_C(X) X ## i64
# else # else
#error "Unable to find a suitable type for HOST_WIDE_INT" #error "Unable to find a suitable type for HOST_WIDE_INT"
# endif # endif
# endif # endif
#endif #endif
#define HOST_WIDE_INT_1 HOST_WIDE_INT_C(1)
/* This is a magic identifier which allows GCC to figure out the type /* This is a magic identifier which allows GCC to figure out the type
of HOST_WIDE_INT for %wd specifier checks. You must issue this of HOST_WIDE_INT for %wd specifier checks. You must issue this
typedef before using the __asm_fprintf__ format attribute. */ typedef before using the __asm_fprintf__ format attribute. */
...@@ -84,7 +89,6 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__; ...@@ -84,7 +89,6 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__;
#if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG #if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
# define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT # define HOST_WIDE_INT_PRINT HOST_LONG_FORMAT
# define HOST_WIDE_INT_PRINT_C "L" # define HOST_WIDE_INT_PRINT_C "L"
# define HOST_WIDE_INT_1 1L
/* 'long' might be 32 or 64 bits, and the number of leading zeroes /* 'long' might be 32 or 64 bits, and the number of leading zeroes
must be tweaked accordingly. */ must be tweaked accordingly. */
# if HOST_BITS_PER_WIDE_INT == 64 # if HOST_BITS_PER_WIDE_INT == 64
...@@ -97,7 +101,6 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__; ...@@ -97,7 +101,6 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__;
#else #else
# define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT # define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT
# define HOST_WIDE_INT_PRINT_C "LL" # define HOST_WIDE_INT_PRINT_C "LL"
# define HOST_WIDE_INT_1 1LL
/* We can assume that 'long long' is at least 64 bits. */ /* We can assume that 'long long' is at least 64 bits. */
# define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \
"0x%" HOST_LONG_LONG_FORMAT "x%016" HOST_LONG_LONG_FORMAT "x" "0x%" HOST_LONG_LONG_FORMAT "x%016" HOST_LONG_LONG_FORMAT "x"
...@@ -122,14 +125,17 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__; ...@@ -122,14 +125,17 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__;
# define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED # define HOST_WIDEST_INT_PRINT_UNSIGNED HOST_WIDE_INT_PRINT_UNSIGNED
# define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX # define HOST_WIDEST_INT_PRINT_HEX HOST_WIDE_INT_PRINT_HEX
# define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX # define HOST_WIDEST_INT_PRINT_DOUBLE_HEX HOST_WIDE_INT_PRINT_DOUBLE_HEX
# define HOST_WIDEST_INT_C(X) HOST_WIDE_INT(X)
#else #else
# if HOST_BITS_PER_LONGLONG >= 64 # if HOST_BITS_PER_LONGLONG >= 64
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER_LONGLONG
# define HOST_WIDEST_INT long long # define HOST_WIDEST_INT long long
# define HOST_WIDEST_INT_C(X) X ## LL
# else # else
# if HOST_BITS_PER___INT64 >= 64 # if HOST_BITS_PER___INT64 >= 64
# define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER___INT64 # define HOST_BITS_PER_WIDEST_INT HOST_BITS_PER___INT64
# define HOST_WIDEST_INT __int64 # define HOST_WIDEST_INT __int64
# define HOST_WIDEST_INT_C(X) X ## i64
# else # else
#error "This line should be impossible to reach" #error "This line should be impossible to reach"
# endif # endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment