View | Details | Raw Unified | Return to bug 18427 | Differences between
and this patch

Collapse All | Expand All

(-)a/gas/config/tc-hppa.c (-6 / +18 lines)
Lines 616-621 static label_symbol_struct *label_symbols_rootp = NULL; Link Here
616
   by pa_parse_number.  */
616
   by pa_parse_number.  */
617
static int strict;
617
static int strict;
618
618
619
/* PR 18427:  Enable legacy support for multiple segments.  */
620
static bfd_boolean enable_multi_seg_support = FALSE;
621
619
/* pa_parse_number returns values in `pa_number'.  Mostly
622
/* pa_parse_number returns values in `pa_number'.  Mostly
620
   pa_parse_number is used to return a register number, with floating
623
   pa_parse_number is used to return a register number, with floating
621
   point registers being numbered from FP_REG_BASE upwards.
624
   point registers being numbered from FP_REG_BASE upwards.
Lines 1125-1131 pa_get_label (void) Link Here
1125
      return label_chain;
1128
      return label_chain;
1126
#endif
1129
#endif
1127
#ifdef OBJ_ELF
1130
#ifdef OBJ_ELF
1128
    if (now_seg == label_chain->lss_segment && label_chain->lss_label)
1131
    if (label_chain->lss_label
1132
	&& (! enable_multi_seg_support || now_seg == label_chain->lss_segment))
1129
      return label_chain;
1133
      return label_chain;
1130
#endif
1134
#endif
1131
    }
1135
    }
Lines 1185-1191 pa_undefine_label (void) Link Here
1185
	  && current_space == label_chain->lss_space && label_chain->lss_label
1189
	  && current_space == label_chain->lss_space && label_chain->lss_label
1186
#endif
1190
#endif
1187
#ifdef OBJ_ELF
1191
#ifdef OBJ_ELF
1188
	  && now_seg == label_chain->lss_segment && label_chain->lss_label
1192
	  && (! enable_multi_seg_support || now_seg == label_chain->lss_segment)
1193
	  && label_chain->lss_label
1189
#endif
1194
#endif
1190
	  )
1195
	  )
1191
	{
1196
	{
Lines 1661-1675 md_estimate_size_before_relax (fragS *fragP, asection *segment ATTRIBUTE_UNUSED) Link Here
1661
1666
1662
#ifdef OBJ_ELF
1667
#ifdef OBJ_ELF
1663
# ifdef WARN_COMMENTS
1668
# ifdef WARN_COMMENTS
1664
const char *md_shortopts = "Vc";
1669
const char *md_shortopts = "Vce";
1665
# else
1670
# else
1666
const char *md_shortopts = "V";
1671
const char *md_shortopts = "Ve";
1667
# endif
1672
# endif
1668
#else
1673
#else
1669
# ifdef WARN_COMMENTS
1674
# ifdef WARN_COMMENTS
1670
const char *md_shortopts = "c";
1675
const char *md_shortopts = "ce";
1671
# else
1676
# else
1672
const char *md_shortopts = "";
1677
const char *md_shortopts = "e";
1673
# endif
1678
# endif
1674
#endif
1679
#endif
1675
1680
Lines 1678-1683 struct option md_longopts[] = Link Here
1678
#ifdef WARN_COMMENTS
1683
#ifdef WARN_COMMENTS
1679
  {"warn-comment", no_argument, NULL, 'c'},
1684
  {"warn-comment", no_argument, NULL, 'c'},
1680
#endif
1685
#endif
1686
  {"enable-multi-seg-support", no_argument, NULL, 'e'},
1681
  {NULL, no_argument, NULL, 0}
1687
  {NULL, no_argument, NULL, 0}
1682
};
1688
};
1683
size_t md_longopts_size = sizeof (md_longopts);
1689
size_t md_longopts_size = sizeof (md_longopts);
Lines 1700-1705 md_parse_option (int c, char *arg ATTRIBUTE_UNUSED) Link Here
1700
      warn_comment = 1;
1706
      warn_comment = 1;
1701
      break;
1707
      break;
1702
#endif
1708
#endif
1709
    case 'e':
1710
      enable_multi_seg_support = TRUE;
1711
      break;
1703
    }
1712
    }
1704
1713
1705
  return 1;
1714
  return 1;
Lines 1708-1713 md_parse_option (int c, char *arg ATTRIBUTE_UNUSED) Link Here
1708
void
1717
void
1709
md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
1718
md_show_usage (FILE *stream ATTRIBUTE_UNUSED)
1710
{
1719
{
1720
  fprintf (stream, "\nHPPA Specific options:\n");
1711
#ifdef OBJ_ELF
1721
#ifdef OBJ_ELF
1712
  fprintf (stream, _("\
1722
  fprintf (stream, _("\
1713
  -Q                      ignored\n"));
1723
  -Q                      ignored\n"));
Lines 1716-1721 md_show_usage (FILE *stream ATTRIBUTE_UNUSED) Link Here
1716
  fprintf (stream, _("\
1726
  fprintf (stream, _("\
1717
  -c                      print a warning if a comment is found\n"));
1727
  -c                      print a warning if a comment is found\n"));
1718
#endif
1728
#endif
1729
  fprintf (stream, _("\
1730
  -e                      enable legacy code for supporting multiple segments\n"));
1719
}
1731
}
1720
1732
1721
/* We have no need to default values of symbols.  */
1733
/* We have no need to default values of symbols.  */
(-)a/gas/doc/as.texinfo (-2 / +7 lines)
Lines 319-325 gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. Link Here
319
   [-h-tick-hex]
319
   [-h-tick-hex]
320
@end ifset
320
@end ifset
321
@ifset HPPA
321
@ifset HPPA
322
@c HPPA has no machine-dependent assembler options (yet).
322
323
@emph{Target HPPA options:}
324
   [@b{-Q}]
325
   [@b{-c}|@b{--warn-comment}]
326
   [@b{-e}|@b{--enable-multi-seg-support}]
323
@end ifset
327
@end ifset
324
@ifset I80386
328
@ifset I80386
325
329
Lines 484-490 gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. Link Here
484
@ifset RL78
488
@ifset RL78
485
489
486
@emph{Target RL78 options:}
490
@emph{Target RL78 options:}
487
   [@b{-mg10}]
491
   [@b{-mg10}][@b{-mg13}][@b{-mg14}]
488
   [@b{-m32bit-doubles}|@b{-m64bit-doubles}]
492
   [@b{-m32bit-doubles}|@b{-m64bit-doubles}]
489
@end ifset
493
@end ifset
490
@ifset RX
494
@ifset RX
Lines 496-501 gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}. Link Here
496
   [@b{-msmall-data-limit}]
500
   [@b{-msmall-data-limit}]
497
   [@b{-mpid}]
501
   [@b{-mpid}]
498
   [@b{-mrelax}]
502
   [@b{-mrelax}]
503
   [@b{-mno-allow-string-insns}]
499
   [@b{-mint-register=@var{number}}]
504
   [@b{-mint-register=@var{number}}]
500
   [@b{-mgcc-abi}|@b{-mrx-abi}]
505
   [@b{-mgcc-abi}|@b{-mrx-abi}]
501
@end ifset
506
@end ifset
(-)a/gas/doc/c-hppa.texi (-1 / +27 lines)
Lines 33-39 support will be added as it becomes necessary. Link Here
33
33
34
@node HPPA Options
34
@node HPPA Options
35
@section Options
35
@section Options
36
@code{@value{AS}} has no machine-dependent command-line options for the HPPA.
36
@cindex HPPA options
37
@cindex options for HPPA
38
@table @code
39
40
@item -Q
41
This option is ignored.  It is supported in order to provide command
42
line compatibility with other assemblers.
43
44
@item -c
45
@itemx --warn-comment
46
Prints a warning message, once per input source file, if a comment
47
starting with a semicolon is detected in the file.  The HPPA assembler
48
uses the semicolon as the start-of-comment character, but other
49
architectures often use this character as a line-separator.  When
50
porting code from some other architecure to the HPPA this can cause
51
problems - hence the command line option.
52
53
@item -e
54
@itemx --enable-multi-seg-support
55
Enables the code that locates the previous label in the current
56
segment in the case where the input source repeatedly switches between
57
different segments.  This support code has a large overhead on the
58
assembly time of some files, and it is not needed for files produced
59
by GCC, so it is disabled by default.  Hand crafted assembler files
60
might need it, as might files some 64-bit HP/UX source files.
61
62
@end table
37
63
38
@cindex HPPA Syntax
64
@cindex HPPA Syntax
39
@node HPPA Syntax
65
@node HPPA Syntax

Return to bug 18427