From 7b841a1252c610d817f1ea0fba140834e5443e7f Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Wed, 8 Jul 2015 20:18:00 +0000 Subject: [PATCH] [AArch64] Define TARGET_UNSPEC_MAY_TRAP_P gcc/ * config/aarch64/aarch64.c (aarch64_unspec_may_trap_p): New function. (TARGET_UNSPEC_MAY_TRAP_P): Define as aarch64_unspec_may_trap_p. From-SVN: r225581 --- gcc/ChangeLog | 5 +++++ gcc/config/aarch64/aarch64.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bbab89b..3432adb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-07-08 Jiong Wang + + * config/aarch64/aarch64.c (aarch64_unspec_may_trap_p): New function. + (TARGET_UNSPEC_MAY_TRAP_P): Define as aarch64_unspec_may_trap_p. + 2015-07-08 H.J. Lu PR target/66746 diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index cb00ad3..6c13a078 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -11890,6 +11890,24 @@ aarch64_use_pseudo_pic_reg (void) return aarch64_cmodel == AARCH64_CMODEL_SMALL_SPIC; } +/* Implement TARGET_UNSPEC_MAY_TRAP_P. */ + +static int +aarch64_unspec_may_trap_p (const_rtx x, unsigned flags) +{ + switch (XINT (x, 1)) + { + case UNSPEC_GOTSMALLPIC: + case UNSPEC_GOTSMALLPIC28K: + case UNSPEC_GOTTINYPIC: + return 0; + default: + break; + } + + return default_unspec_may_trap_p (x, flags); +} + #undef TARGET_ADDRESS_COST #define TARGET_ADDRESS_COST aarch64_address_cost @@ -12168,6 +12186,9 @@ aarch64_use_pseudo_pic_reg (void) #undef TARGET_SCHED_FUSION_PRIORITY #define TARGET_SCHED_FUSION_PRIORITY aarch64_sched_fusion_priority +#undef TARGET_UNSPEC_MAY_TRAP_P +#define TARGET_UNSPEC_MAY_TRAP_P aarch64_unspec_may_trap_p + #undef TARGET_USE_PSEUDO_PIC_REG #define TARGET_USE_PSEUDO_PIC_REG aarch64_use_pseudo_pic_reg -- 2.7.4