aboutsummaryrefslogtreecommitdiff
path: root/gdb/p-exp.y
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2007-06-12 15:33:04 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2007-06-12 15:33:04 +0000
commit9a76efb656a6acbc22e23976770e79e7a111893b (patch)
tree8d1af2f6edabf3656a353408a47b23c9309f4940 /gdb/p-exp.y
parent272dfcfd78cd900157ff2e4c8c8ed95645dae4f6 (diff)
downloadfsf-binutils-gdb-9a76efb656a6acbc22e23976770e79e7a111893b.zip
fsf-binutils-gdb-9a76efb656a6acbc22e23976770e79e7a111893b.tar.gz
fsf-binutils-gdb-9a76efb656a6acbc22e23976770e79e7a111893b.tar.bz2
2007-06-12 Markus Deuling <deuling@de.ibm.com>
* gdbarch.sh (TARGET_SHORT_BIT): Replace by gdbarch_int_bit. * ada-lang.c (ada_create_fundamental_type) (ada_language_arch_info): Likewise. * c-lang.c (c_create_fundamental_type): Likewise. * f-lang.c (f_create_fundamental_type, build_fortran_types): Likewise. * gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise. * m2-lang.c (m2_create_fundamental_type): Likewise. * objc-lang.c (objc_create_fundamental_type): Likewise. * p-lang.c (pascal_create_fundamental_type): Likewise. * gdbarch.sh (TARGET_INT_BIT): Replace by gdbarch_int_bit. * c-exp.y (parse_number): Likewise. * objc-exp.y (parse_number): Likewise. * ada-lex.l (processInt): Likewise. * f-exp.y (parse_number): Likewise. * p-exp.y (parse_number): Likewise. * ada-lang.c (ada_create_fundamental_type, ada_language_arch_info) (gdbtypes_post_init, build_gdbtypes): Likewise. * p-lang.c (pascal_create_fundamental_type): Likewise. * parse.c (build_parse): Likewise. * xcoffread.c (_initialize_xcoffread): Likewise. * stabsread.c (define_symbol, read_one_struct_field, read_enum_type) (read_range_type): Likewise. * objc-lang.c (objc_create_fundamental_type): Likewise. * f-lang.c (build_fortran_types, f_create_fundamental_type): Likewise. * m2-lang.c (m2_create_fundamental_type, _initialize_m2_language) (m2_create_fundamental_type): Likewise. * c-lang.c (c_create_fundamental_type): Likewise. * coffread.c (coff_read_enum_type): Likewise. * mdebugread.c (parse_symbol, _initialize_mdebugread): Likewise. * dwarf2read.c (new_symbol): Likewise. * gdbarch.sh (TARGET_LONG_BIT): Replace by gdbarch_long_bit. * c-exp.y (parse_number): Likewise. * objc-exp.y (parse_number): Likewise. * ada-lex.l (processInt): Likewise. * f-exp.y (parse_number): Likewise. * p-exp.y (parse_number): Likewise. * valarith.c (value_binop): Likewise. * symfile.c (read_target_long_array, simple_overlay_update_1): Likewise. * ada-lang.c (ada_create_fundamental_type) (ada_language_arch_info): Likewise. * gdbtypes.c (build_gdbtypes, gdbtypes_post_init): Likewise. * symfile.c (TARGET_LONG_BYTES): Likewise. * p-lang.c (pascal_create_fundamental_type): Likewise. * objc-lang.c (objc_create_fundamental_type): Likewise. * m2-lang.c (m2_create_fundamental_type): Likewise. * f-lang.c (f_create_fundamental_type): Likewise. * c-lang.c (c_create_fundamental_type): Likewise. * coffread.c (decode_base_type): Likewise. * gdbarch.sh (TARGET_LONG_LONG_BIT): Replace by gdbarch_long_long_bit. * c-exp.y (parse_number): Likewise. * objc-exp.y (parse_number): Likewise. * p-exp.y (parse_number): Likewise. * ada-lang.c (ada_create_fundamental_type) (ada_language_arch_info): Likewise. * gdbtypes.c (gdbtypes_post_init, build_gdbtypes): Likewise. * stabsread.c (read_range_type): Likewise. * p-lang.c (pascal_create_fundamental_type): Likewise. * objc-lang.c (objc_create_fundamental_type): Likewise. * m2-lang.c (m2_create_fundamental_type): Likewise. * f-lang.c (f_create_fundamental_type): Likewise. * c-lang.c (c_create_fundamental_type): Likewise. * gdbarch.c, gdbarch.h: Regenerate.
Diffstat (limited to 'gdb/p-exp.y')
-rw-r--r--gdb/p-exp.y17
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/p-exp.y b/gdb/p-exp.y
index 68e1a15..6834441 100644
--- a/gdb/p-exp.y
+++ b/gdb/p-exp.y
@@ -909,16 +909,16 @@ parse_number (p, len, parsed_float, putithere)
shift it right and see whether anything remains. Note that we
can't shift sizeof (LONGEST) * HOST_CHAR_BIT bits or more in one
operation, because many compilers will warn about such a shift
- (which always produces a zero result). Sometimes TARGET_INT_BIT
- or TARGET_LONG_BIT will be that big, sometimes not. To deal with
+ (which always produces a zero result). Sometimes gdbarch_int_bit
+ or gdbarch_long_bit will be that big, sometimes not. To deal with
the case where it is we just always shift the value more than
once, with fewer bits each time. */
un = (ULONGEST)n >> 2;
if (long_p == 0
- && (un >> (TARGET_INT_BIT - 2)) == 0)
+ && (un >> (gdbarch_int_bit (current_gdbarch) - 2)) == 0)
{
- high_bit = ((ULONGEST)1) << (TARGET_INT_BIT-1);
+ high_bit = ((ULONGEST)1) << (gdbarch_int_bit (current_gdbarch) - 1);
/* A large decimal (not hex or octal) constant (between INT_MAX
and UINT_MAX) is a long or unsigned long, according to ANSI,
@@ -930,20 +930,21 @@ parse_number (p, len, parsed_float, putithere)
signed_type = builtin_type_int;
}
else if (long_p <= 1
- && (un >> (TARGET_LONG_BIT - 2)) == 0)
+ && (un >> (gdbarch_long_bit (current_gdbarch) - 2)) == 0)
{
- high_bit = ((ULONGEST)1) << (TARGET_LONG_BIT-1);
+ high_bit = ((ULONGEST)1) << (gdbarch_long_bit (current_gdbarch) - 1);
unsigned_type = builtin_type_unsigned_long;
signed_type = builtin_type_long;
}
else
{
int shift;
- if (sizeof (ULONGEST) * HOST_CHAR_BIT < TARGET_LONG_LONG_BIT)
+ if (sizeof (ULONGEST) * HOST_CHAR_BIT
+ < gdbarch_long_long_bit (current_gdbarch))
/* A long long does not fit in a LONGEST. */
shift = (sizeof (ULONGEST) * HOST_CHAR_BIT - 1);
else
- shift = (TARGET_LONG_LONG_BIT - 1);
+ shift = (gdbarch_long_long_bit (current_gdbarch) - 1);
high_bit = (ULONGEST) 1 << shift;
unsigned_type = builtin_type_unsigned_long_long;
signed_type = builtin_type_long_long;