Re: Remove non-GAS non-ELF support in alpha backend

2017-09-26 Thread Bernhard Reutner-Fischer
On Wed, Mar 14, 2012 at 07:02:33PM +0100, Rainer Orth wrote:
> Richard Henderson  writes:
> 
> > On 03/14/12 09:09, Rainer Orth wrote:
> >
> > Nearly ok.
> >
> >> +  targetm.asm_file_start_file_directive = 0;
> >
> > This is default and may be deleted.
> 
> Or would be if alpha.c didn't override the default.
> 
> This is what I actually committed after retesting.

Looking at ASM_OUTPUT_SOURCE_FILENAME i wonder why both alpha and mips
do not use the default hook nowadays?
mmix seems to do something different for real, fwiw.

TIA,
> 
>   Rainer
> 
> 
> 2012-03-09  Rainer Orth  
> 
>   * config/alpha/alpha.c [HAVE_STAMP_H]: Remove.
>   (alpha_file_start) [MS_STAMP]: Remove.
> 
>   * config/alpha/elf.h (TARGET_GAS): Remove.
>   * config/alpha/freebsd.h (TARGET_DEFAULT): Remove.
>   * config/alpha/linux.h (TARGET_DEFAULT): Remove.
>   * config/alpha/netbsd.h (TARGET_DEFAULT): Remove.
>   * config/alpha/vms.h (TARGET_DEFAULT): Remove.
>   * config.gcc (alpha*-*-linux*): Remove target_cpu_default.
>   (alpha*-*-freebsd*): Likewise.
>   (alpha*-*-netbsd*): Likewise.
>   (alpha*-*-openbsd*): Likewise.
>   (alpha*-*-*): Remove target_cpu_default2.
>   * config/alpha/alpha.c (alpha_output_filename): Remove !TARGET_GAS
>   handling.
>   * config/alpha/alpha.h (TARGET_AS_CAN_SUBTRACT_LABELS): Remove.
>   (TARGET_AS_SLASH_BEFORE_SUFFIX): Remove.
>   * config/alpha/alpha.c (print_operand): Always assume
>   TARGET_AS_SLASH_BEFORE_SUFFIX.
>   * config/alpha/alpha.md ("*builtin_setjmp_receiver_er_sl_1"):
>   Remove TARGET_AS_CAN_SUBTRACT_LABELS.
>   ("*builtin_setjmp_receiver_er_1"): Remove.
>   * config/alpha/alpha.opt (malpha-as): Remove.
>   (mgas): Ignore.
>   * doc/invoke.texi (Option Summary, DEC Alpha Options): Remove
>   -malpha-as, -mgas.
>   Remove DEC Unix reference.
> 
>   * config/alpha/alpha.h (OBJECT_FORMAT_COFF): Remove.
>   (EXTENDED_COFF): Remove.
>   * config/alpha/elf.h (OBJECT_FORMAT_COFF): Don't undef.
>   (EXTENDED_COFF): Don't undef.
>   * config/alpha/alpha.c (alpha_file_start): Always assume
>   OBJECT_FORMAT_ELF.
>   Don't set targetm.asm_file_start_file_directive.
>   [!OBJECT_FORMAT_ELF]: Remove.
>   (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Remove.
> 
>   * config/alpha/alpha.h (SDB_DEBUGGING_INFO): Remove.
>   (DBX_DEBUGGING_INFO): Remove.
>   (MIPS_DEBUGGING_INFO): Remove.
>   (PREFERRED_DEBUGGING_TYPE): Remove.
>   (DBX_OUTPUT_SOURCE_LINE): Remove.
>   (SDB_OUTPUT_SOURCE_LINE): Remove.
>   (DBX_CONTIN_LENGTH): Remove.
>   (NO_DBX_FUNCTION_END): Remove.
>   (ASM_STABS_OP): Remove.
>   (ASM_STABN_OP): Remove.
>   (ASM_STABD_OP): Remove.
>   (SDB_ALLOW_FORWARD_REFERENCES): Remove.
>   (SDB_ALLOW_UNKNOWN_REFERENCES): Remove.
>   (PUT_SDB_DEF): Remove.
>   (PUT_SDB_PLAIN_DEF): Remove.
>   (PUT_SDB_TYPE): Remove.
>   (sdb_label_count): Remove.
>   (PUT_SDB_BLOCK_START): Remove.
>   (PUT_SDB_BLOCK_END): Remove.
>   (PUT_SDB_FUNCTION_START): Remove.
>   (PUT_SDB_FUNCTION_END): Remove.
>   (PUT_SDB_EPILOGUE_END): Remove.
>   * config/alpha/elf.h (SDB_DEBUGGING_INFO): Don't undef.
>   (MIPS_DEBUGGING_INFO): Don't undef.
>   (DBX_DEBUGGING_INFO): Don't undef.
>   * config/alpha/vms.h (SDB_DEBUGGING_INFO): Don't undef.
>   (MIPS_DEBUGGING_INFO): Don't undef.
>   (DBX_DEBUGGING_INFO): Don't undef.
>   * config/alpha/freebsd.h (DBX_CONTIN_CHAR): Remove.
>   * config/alpha/alpha.c (alpha_option_override): Remove SDB_DEBUG
>   handling.
>   (alpha_start_function): Likewise.
>   (sdb_label_count): Remove.
>   (alpha_output_filename): Remove DBX_DEBUG handling.
>   (alpha_file_start): Likewise.
> 


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-14 Thread Rainer Orth
Richard Henderson  writes:

> On 03/14/12 09:09, Rainer Orth wrote:
>
> Nearly ok.
>
>> +  targetm.asm_file_start_file_directive = 0;
>
> This is default and may be deleted.

Or would be if alpha.c didn't override the default.

This is what I actually committed after retesting.

Rainer


2012-03-09  Rainer Orth  

* config/alpha/alpha.c [HAVE_STAMP_H]: Remove.
(alpha_file_start) [MS_STAMP]: Remove.

* config/alpha/elf.h (TARGET_GAS): Remove.
* config/alpha/freebsd.h (TARGET_DEFAULT): Remove.
* config/alpha/linux.h (TARGET_DEFAULT): Remove.
* config/alpha/netbsd.h (TARGET_DEFAULT): Remove.
* config/alpha/vms.h (TARGET_DEFAULT): Remove.
* config.gcc (alpha*-*-linux*): Remove target_cpu_default.
(alpha*-*-freebsd*): Likewise.
(alpha*-*-netbsd*): Likewise.
(alpha*-*-openbsd*): Likewise.
(alpha*-*-*): Remove target_cpu_default2.
* config/alpha/alpha.c (alpha_output_filename): Remove !TARGET_GAS
handling.
* config/alpha/alpha.h (TARGET_AS_CAN_SUBTRACT_LABELS): Remove.
(TARGET_AS_SLASH_BEFORE_SUFFIX): Remove.
* config/alpha/alpha.c (print_operand): Always assume
TARGET_AS_SLASH_BEFORE_SUFFIX.
* config/alpha/alpha.md ("*builtin_setjmp_receiver_er_sl_1"):
Remove TARGET_AS_CAN_SUBTRACT_LABELS.
("*builtin_setjmp_receiver_er_1"): Remove.
* config/alpha/alpha.opt (malpha-as): Remove.
(mgas): Ignore.
* doc/invoke.texi (Option Summary, DEC Alpha Options): Remove
-malpha-as, -mgas.
Remove DEC Unix reference.

* config/alpha/alpha.h (OBJECT_FORMAT_COFF): Remove.
(EXTENDED_COFF): Remove.
* config/alpha/elf.h (OBJECT_FORMAT_COFF): Don't undef.
(EXTENDED_COFF): Don't undef.
* config/alpha/alpha.c (alpha_file_start): Always assume
OBJECT_FORMAT_ELF.
Don't set targetm.asm_file_start_file_directive.
[!OBJECT_FORMAT_ELF]: Remove.
(TARGET_ASM_FILE_START_FILE_DIRECTIVE): Remove.

* config/alpha/alpha.h (SDB_DEBUGGING_INFO): Remove.
(DBX_DEBUGGING_INFO): Remove.
(MIPS_DEBUGGING_INFO): Remove.
(PREFERRED_DEBUGGING_TYPE): Remove.
(DBX_OUTPUT_SOURCE_LINE): Remove.
(SDB_OUTPUT_SOURCE_LINE): Remove.
(DBX_CONTIN_LENGTH): Remove.
(NO_DBX_FUNCTION_END): Remove.
(ASM_STABS_OP): Remove.
(ASM_STABN_OP): Remove.
(ASM_STABD_OP): Remove.
(SDB_ALLOW_FORWARD_REFERENCES): Remove.
(SDB_ALLOW_UNKNOWN_REFERENCES): Remove.
(PUT_SDB_DEF): Remove.
(PUT_SDB_PLAIN_DEF): Remove.
(PUT_SDB_TYPE): Remove.
(sdb_label_count): Remove.
(PUT_SDB_BLOCK_START): Remove.
(PUT_SDB_BLOCK_END): Remove.
(PUT_SDB_FUNCTION_START): Remove.
(PUT_SDB_FUNCTION_END): Remove.
(PUT_SDB_EPILOGUE_END): Remove.
* config/alpha/elf.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/vms.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/freebsd.h (DBX_CONTIN_CHAR): Remove.
* config/alpha/alpha.c (alpha_option_override): Remove SDB_DEBUG
handling.
(alpha_start_function): Likewise.
(sdb_label_count): Remove.
(alpha_output_filename): Remove DBX_DEBUG handling.
(alpha_file_start): Likewise.

# HG changeset patch
# Parent e37bb02d4dc18d8d19c6c63e92941d726831687f
Remove non-GAS non-ELF support in alpha backend

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -761,25 +761,21 @@ case ${target} in
 alpha*-*-linux*)
 	tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
 	extra_options="${extra_options} alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-freebsd*)
 	tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
 	extra_options="${extra_options} alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-netbsd*)
 	tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
 		   alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-openbsd*)
 	tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
 	tm_file="alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h alpha/openbsd.h openbsd-libpthread.h"
 	extra_options="${extra_options} openbsd.opt alpha/elf.opt"
 	# default x-alpha is only appropriate for dec-osf.
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-dec-*vms*)
 	tm_file="${tm_file} vms/vms.h alpha/vms.h"
@@ -3407,13 +3403,6 @@ esac
 # Set some miscellaneous flags for particular targets.
 target_cpu_default2=
 case ${target} in
-	alpha*-*-*)
-		if test x$gas =

Re: Remove non-GAS non-ELF support in alpha backend

2012-03-14 Thread Richard Henderson
On 03/14/12 09:09, Rainer Orth wrote:

Nearly ok.

> +  targetm.asm_file_start_file_directive = 0;

This is default and may be deleted.


r~


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-14 Thread Rainer Orth
Richard Henderson  writes:

> On 03/12/12 09:22, Rainer Orth wrote:
>> There are only two issues:
>> 
>> * In alpha.c (alpha_option_override), it's unclear if the optimize > 0
>>   test can be removed completely.
>
> Yeah, I guess leave that for now.
>
>> * During testing, I ran into this error:
>> 
>>   alpha.md:5861: `*builtin_setjmp_receiver_er_1' matches 
>> `*builtin_setjmp_receiver_er_sl_1'
>>   alpha.md:5856: previous definition of `*builtin_setjmp_receiver_er_sl_1'
>
> Delete builtin_setjmp_receiver_er_1, which ought to have had && 
> !TARGET_AS_CAN_SUBTRACT_LABELS,
> but since patterns are matched in order, was implied by the filtering of the 
> previous pattern.

Here's the revised patch, retested by building cc1 in a i386-solaris2.11
x alpha-freebsd6.0 cross.

Ok for mainline now?

Rainer


2012-03-09  Rainer Orth  

* config/alpha/alpha.c [HAVE_STAMP_H]: Remove.
(alpha_file_start) [MS_STAMP]: Remove.

* config/alpha/elf.h (TARGET_GAS): Remove.
* config/alpha/freebsd.h (TARGET_DEFAULT): Remove.
* config/alpha/linux.h (TARGET_DEFAULT): Remove.
* config/alpha/netbsd.h (TARGET_DEFAULT): Remove.
* config/alpha/vms.h (TARGET_DEFAULT): Remove.
* config.gcc (alpha*-*-linux*): Remove target_cpu_default.
(alpha*-*-freebsd*): Likewise.
(alpha*-*-netbsd*): Likewise.
(alpha*-*-openbsd*): Likewise.
(alpha*-*-*): Remove target_cpu_default2.
* config/alpha/alpha.c (alpha_output_filename): Remove !TARGET_GAS
handling.
* config/alpha/alpha.h (TARGET_AS_CAN_SUBTRACT_LABELS): Remove.
(TARGET_AS_SLASH_BEFORE_SUFFIX): Remove.
* config/alpha/alpha.c (print_operand): Always assume
TARGET_AS_SLASH_BEFORE_SUFFIX.
* config/alpha/alpha.md ("*builtin_setjmp_receiver_er_sl_1"):
Remove TARGET_AS_CAN_SUBTRACT_LABELS.
("*builtin_setjmp_receiver_er_1"): Remove.
* config/alpha/alpha.opt (malpha-as): Remove.
(mgas): Ignore.
* doc/invoke.texi (Option Summary, DEC Alpha Options): Remove
-malpha-as, -mgas.
Remove DEC Unix reference.

* config/alpha/alpha.h (OBJECT_FORMAT_COFF): Remove.
(EXTENDED_COFF): Remove.
* config/alpha/elf.h (OBJECT_FORMAT_COFF): Don't undef.
(EXTENDED_COFF): Don't undef.
* config/alpha/alpha.c (alpha_file_start): Always assume
OBJECT_FORMAT_ELF.
[!OBJECT_FORMAT_ELF]: Remove.

* config/alpha/alpha.h (SDB_DEBUGGING_INFO): Remove.
(DBX_DEBUGGING_INFO): Remove.
(MIPS_DEBUGGING_INFO): Remove.
(PREFERRED_DEBUGGING_TYPE): Remove.
(DBX_OUTPUT_SOURCE_LINE): Remove.
(SDB_OUTPUT_SOURCE_LINE): Remove.
(DBX_CONTIN_LENGTH): Remove.
(NO_DBX_FUNCTION_END): Remove.
(ASM_STABS_OP): Remove.
(ASM_STABN_OP): Remove.
(ASM_STABD_OP): Remove.
(SDB_ALLOW_FORWARD_REFERENCES): Remove.
(SDB_ALLOW_UNKNOWN_REFERENCES): Remove.
(PUT_SDB_DEF): Remove.
(PUT_SDB_PLAIN_DEF): Remove.
(PUT_SDB_TYPE): Remove.
(sdb_label_count): Remove.
(PUT_SDB_BLOCK_START): Remove.
(PUT_SDB_BLOCK_END): Remove.
(PUT_SDB_FUNCTION_START): Remove.
(PUT_SDB_FUNCTION_END): Remove.
(PUT_SDB_EPILOGUE_END): Remove.
* config/alpha/elf.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/vms.h (SDB_DEBUGGING_INFO): Don't undef.
(MIPS_DEBUGGING_INFO): Don't undef.
(DBX_DEBUGGING_INFO): Don't undef.
* config/alpha/freebsd.h (DBX_CONTIN_CHAR): Remove.
* config/alpha/alpha.c (alpha_option_override): Remove SDB_DEBUG
handling.
(alpha_start_function): Likewise.
(sdb_label_count): Remove.
(alpha_output_filename): Remove DBX_DEBUG handling.
(alpha_file_start): Likewise.

# HG changeset patch
# Parent 465e0a61b396af5b96f194a4eecaa8d2103c3cfb
Remove non-GAS non-ELF support in alpha backend

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -763,25 +763,21 @@ case ${target} in
 alpha*-*-linux*)
 	tm_file="${tm_file} alpha/elf.h alpha/linux.h alpha/linux-elf.h glibc-stdint.h"
 	extra_options="${extra_options} alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-freebsd*)
 	tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
 	extra_options="${extra_options} alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-netbsd*)
 	tm_file="${tm_file} netbsd.h alpha/elf.h netbsd-elf.h alpha/netbsd.h"
 	extra_options="${extra_options} netbsd.opt netbsd-elf.opt \
 		   alpha/elf.opt"
-	target_cpu_default="MASK_GAS"
 	;;
 alpha*-*-openbsd*)
 	tm_defines="${tm_defines} OBSD_HAS_DECLARE_FUNCTION_NAME OBSD_HAS_DECLARE_FUNCTION_SIZE OBSD_HAS_DECLARE_OBJECT"
 	tm_file="alpha/alpha.h alpha/elf.h openbsd.h openbsd-stdint.h

Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Richard Henderson
On 03/12/12 09:57, Joseph S. Myers wrote:
> I wonder whether it will be possible for a future cleanup to make alpha 
> targets use toplevel elfos.h, and for Alpha GNU/Linux toplevel gnu-user.h 
> and linux.h as well?

Probably we can, at least to a fairly large degree.


r~


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Joseph S. Myers
On Mon, 12 Mar 2012, Rainer Orth wrote:

> While having the osf removal patch reviewed, it turned out that with the
> last non-gas non-ELF alpha port gone, there's considerable cleanup
> potential in the alpha backend.  The following patch implements this:

I wonder whether it will be possible for a future cleanup to make alpha 
targets use toplevel elfos.h, and for Alpha GNU/Linux toplevel gnu-user.h 
and linux.h as well?

-- 
Joseph S. Myers
jos...@codesourcery.com


Re: Remove non-GAS non-ELF support in alpha backend

2012-03-12 Thread Richard Henderson
On 03/12/12 09:22, Rainer Orth wrote:
> There are only two issues:
> 
> * In alpha.c (alpha_option_override), it's unclear if the optimize > 0
>   test can be removed completely.

Yeah, I guess leave that for now.

> * During testing, I ran into this error:
> 
>   alpha.md:5861: `*builtin_setjmp_receiver_er_1' matches 
> `*builtin_setjmp_receiver_er_sl_1'
>   alpha.md:5856: previous definition of `*builtin_setjmp_receiver_er_sl_1'

Delete builtin_setjmp_receiver_er_1, which ought to have had && 
!TARGET_AS_CAN_SUBTRACT_LABELS,
but since patterns are matched in order, was implied by the filtering of the 
previous pattern.


r~