diff options
author | Nick Clifton <nickc@cambridge.redhat.com> | 2001-08-31 17:10:57 +0000 |
---|---|---|
committer | Nick Clifton <nickc@cambridge.redhat.com> | 2001-08-31 17:10:57 +0000 |
commit | 04fff3aa1077f05ef037aa244ba1afd6d0dfde86 (patch) | |
tree | eed9675684db1b68b36c9e51e1cd98e170cbc5d9 | |
parent | 555b52a816c75453513fbab99d4a5bad7c2d0ad3 (diff) |
Skip TRUNCATE operators in const pool addresses for v850 short switch tables
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@45326 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/config/v850/v850.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index 281f2199988..5baef15e847 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -1248,6 +1248,18 @@ do { \ #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_" +/* When ASM_OUTPUT_SHORT is used to emit the offsets for a switch + table it can encounter (TRUNCATE:HI (MINUS:SI (LABEL_REF:SI) (LABEL_REF:SI))). + output_addr_const will normally barf at this, but it is OK to omit + the truncate and just emit the difference of the two labels. The + .hword directive will automatically handle the truncation for us. */ + +#define OUTPUT_ADDR_CONST_EXTRA(FILE, X, FAIL) \ + if (GET_CODE (x) == TRUNCATE) \ + return output_addr_const (FILE, XEXP (X, 0)); \ + else \ + goto FAIL; + /* This is how to output an assembler line defining a `double' constant. It is .double or .float, depending. */ |