diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-23 06:37:23 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-11-23 06:37:23 +0000 |
commit | b60f0749927261334c21891aa8cd76349029b361 (patch) | |
tree | 5c0256af6368b27411a55e15e137d7e09aea0433 /gcc/final.c | |
parent | 393fac7b1fdbbfbe75b3d5edc177cb6062ac7366 (diff) | |
download | gcc-b60f0749927261334c21891aa8cd76349029b361.tar.gz |
* final.c (output_addr_const) [LABEL_REF]: Simplify.
[MINUS]: Enclose non-CONST_INTs in parentheses.
[default]: Try OUTPUT_ADDR_CONST_EXTRA.
* tm.texi (OUTPUT_ADDR_CONST_EXTRA): Document it.
* varasm.c (decode_rtx_const) [CONST]: If it's not something
PLUS or MINUS a CONST_INT, use the whole CONST with offset 0
instead of abort()ing.
* sh.c (output_pic_addr_const): Removed. Fixed all callers.
* sh.h (OUTPUT_ADDR_CONST_EXTRA): New. Handle the UNSPECs
formerly handled in output_pic_addr_const.
* sh.md (sym_label2reg, symPLT_label2reg): Enclose UNSPEC
operands of MINUS in CONSTs so that decode_rtx_const() will
accept them.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37691 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/final.c')
-rw-r--r-- | gcc/final.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/final.c b/gcc/final.c index c83f722f03e..46c09ee8e34 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -3677,10 +3677,8 @@ output_addr_const (file, x) break; case LABEL_REF: - ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (XEXP (x, 0))); - assemble_name (file, buf); - break; - + x = XEXP (x, 0); + /* Fall through. */ case CODE_LABEL: ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (x)); assemble_name (file, buf); @@ -3741,8 +3739,9 @@ output_addr_const (file, x) output_addr_const (file, XEXP (x, 0)); fprintf (file, "-"); - if (GET_CODE (XEXP (x, 1)) == CONST_INT - && INTVAL (XEXP (x, 1)) < 0) + if ((GET_CODE (XEXP (x, 1)) == CONST_INT + && INTVAL (XEXP (x, 1)) < 0) + || GET_CODE (XEXP (x, 1)) != CONST_INT) { fprintf (file, "%s", ASM_OPEN_PAREN); output_addr_const (file, XEXP (x, 1)); @@ -3758,6 +3757,12 @@ output_addr_const (file, x) break; default: +#ifdef OUTPUT_ADDR_CONST_EXTRA + OUTPUT_ADDR_CONST_EXTRA (file, x, fail); + break; + + fail: +#endif output_operand_lossage ("invalid expression as operand"); } } |