summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-27 09:44:00 +0000
committergingold <gingold@138bc75d-0d04-0410-961f-82ee72b054a4>2012-03-27 09:44:00 +0000
commita2295d74e8fdc2f6fe05d206fca8a3d36bdc3c44 (patch)
tree08ced2df68811a8af9a6d918db35a23416627a23
parentbd647a177d36e5be6fe66f5a02848e7ff7738a4b (diff)
downloadgcc-a2295d74e8fdc2f6fe05d206fca8a3d36bdc3c44.tar.gz
2012-03-27 Tristan Gingold <gingold@adacore.com>
* config/ia64/vms.h (CASE_VECTOR_MODE): Define. * config/ia64/ia64.md: Remove mode in template. Sign extend operand in expand_simple_binop. * config/ia64/ia64.h (ASM_OUTPUT_ADDR_DIFF_ELT): Use CASE_VECTOR_MODE instead of TARGET_ILP32. (ADDR_VEC_ALIGN): Make it depends on CASE_VECTOR_MODE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185851 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/ia64/ia64.h6
-rw-r--r--gcc/config/ia64/ia64.md4
-rw-r--r--gcc/config/ia64/vms.h4
4 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7452da90f47..8321a8e2750 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2012-03-27 Tristan Gingold <gingold@adacore.com>
+
+ * config/ia64/vms.h (CASE_VECTOR_MODE): Define.
+ * config/ia64/ia64.md: Remove mode in template.
+ Sign extend operand in expand_simple_binop.
+ * config/ia64/ia64.h (ASM_OUTPUT_ADDR_DIFF_ELT): Use
+ CASE_VECTOR_MODE instead of TARGET_ILP32.
+ (ADDR_VEC_ALIGN): Make it depends on CASE_VECTOR_MODE.
+
2012-03-26 Steven Bosscher <steven@gcc.gnu.org>
* varasm.c (assemble_external): #if 0 out the new assert from the
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index a3ccd6fe8a9..2f0a9295877 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1484,15 +1484,15 @@ do { \
#define ASM_OUTPUT_ADDR_DIFF_ELT(STREAM, BODY, VALUE, REL) \
do { \
- if (TARGET_ILP32) \
+ if (CASE_VECTOR_MODE == SImode) \
fprintf (STREAM, "\tdata4 @pcrel(.L%d)\n", VALUE); \
else \
fprintf (STREAM, "\tdata8 @pcrel(.L%d)\n", VALUE); \
} while (0)
-/* Jump tables only need 8 byte alignment. */
+/* Jump tables only need 4 or 8 byte alignment. */
-#define ADDR_VEC_ALIGN(ADDR_VEC) 3
+#define ADDR_VEC_ALIGN(ADDR_VEC) (CASE_VECTOR_MODE == SImode ? 2 : 3)
/* Assembler Commands for Exception Regions. */
diff --git a/gcc/config/ia64/ia64.md b/gcc/config/ia64/ia64.md
index 129cec80fcf..349da7ba996 100644
--- a/gcc/config/ia64/ia64.md
+++ b/gcc/config/ia64/ia64.md
@@ -4578,7 +4578,7 @@
[(set_attr "itanium_class" "br")])
(define_expand "tablejump"
- [(parallel [(set (pc) (match_operand:DI 0 "memory_operand" ""))
+ [(parallel [(set (pc) (match_operand 0 "memory_operand" ""))
(use (label_ref (match_operand 1 "" "")))])]
""
{
@@ -4614,7 +4614,7 @@
from the entry to the label. Thus to convert to an absolute address
we add the address of the memory from which the value is loaded. */
operands[0] = expand_simple_binop (DImode, PLUS, op0, addr,
- NULL_RTX, 1, OPTAB_DIRECT);
+ NULL_RTX, 0, OPTAB_DIRECT);
})
(define_insn "*tablejump_internal"
diff --git a/gcc/config/ia64/vms.h b/gcc/config/ia64/vms.h
index 3e0c6531686..11f017663b5 100644
--- a/gcc/config/ia64/vms.h
+++ b/gcc/config/ia64/vms.h
@@ -146,6 +146,10 @@ STATIC func_ptr __CTOR_LIST__[1] \
#undef TARGET_PROMOTE_FUNCTION_MODE
#define TARGET_PROMOTE_FUNCTION_MODE default_promote_function_mode_always_promote
+/* Code is always in P0/P1 (lower 32 bit addresses) on VMS. */
+#undef CASE_VECTOR_MODE
+#define CASE_VECTOR_MODE SImode
+
/* IA64 VMS doesn't fully support COMDAT sections. */
#define SUPPORTS_ONE_ONLY 0