[ARC] Update sleep builtin.
gcc/ 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove. * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers and short u6 immediate. (check_if_valid_sleep_operand): Remove. * config/arc/arc.md (Sleep): Accepts registers and u6 immediates. changelog From-SVN: r259557
This commit is contained in:
parent
6dfcb0c474
commit
31d2e01ad4
@ -1,3 +1,11 @@
|
|||||||
|
2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
|
||||||
|
|
||||||
|
* config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
|
||||||
|
* config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
|
||||||
|
and short u6 immediate.
|
||||||
|
(check_if_valid_sleep_operand): Remove.
|
||||||
|
* config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
|
||||||
|
|
||||||
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
|
2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
|
||||||
|
|
||||||
* config/nds32/nds32.c (nds32_compute_stack_frame): Consider
|
* config/nds32/nds32.c (nds32_compute_stack_frame): Consider
|
||||||
|
@ -59,7 +59,6 @@ void arc_asm_output_aligned_decl_local (FILE *, tree, const char *,
|
|||||||
unsigned HOST_WIDE_INT);
|
unsigned HOST_WIDE_INT);
|
||||||
extern rtx arc_return_addr_rtx (int , rtx);
|
extern rtx arc_return_addr_rtx (int , rtx);
|
||||||
extern bool check_if_valid_regno_const (rtx *, int);
|
extern bool check_if_valid_regno_const (rtx *, int);
|
||||||
extern bool check_if_valid_sleep_operand (rtx *, int);
|
|
||||||
extern bool arc_legitimate_constant_p (machine_mode, rtx);
|
extern bool arc_legitimate_constant_p (machine_mode, rtx);
|
||||||
extern bool arc_legitimate_pic_addr_p (rtx);
|
extern bool arc_legitimate_pic_addr_p (rtx);
|
||||||
extern bool arc_raw_symbolic_reference_mentioned_p (rtx, bool);
|
extern bool arc_raw_symbolic_reference_mentioned_p (rtx, bool);
|
||||||
|
@ -6555,11 +6555,6 @@ arc_expand_builtin (tree exp,
|
|||||||
fold (arg0);
|
fold (arg0);
|
||||||
op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
|
op0 = expand_expr (arg0, NULL_RTX, VOIDmode, EXPAND_NORMAL);
|
||||||
|
|
||||||
if (!CONST_INT_P (op0) || !satisfies_constraint_L (op0))
|
|
||||||
{
|
|
||||||
error ("builtin operand should be an unsigned 6-bit value");
|
|
||||||
return NULL_RTX;
|
|
||||||
}
|
|
||||||
gcc_assert (icode != 0);
|
gcc_assert (icode != 0);
|
||||||
emit_insn (GEN_FCN (icode) (op0));
|
emit_insn (GEN_FCN (icode) (op0));
|
||||||
return NULL_RTX;
|
return NULL_RTX;
|
||||||
@ -6907,27 +6902,6 @@ check_if_valid_regno_const (rtx *operands, int opno)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check that after all the constant folding, whether the operand to
|
|
||||||
__builtin_arc_sleep is an unsigned int of 6 bits. If not, flag an error. */
|
|
||||||
|
|
||||||
bool
|
|
||||||
check_if_valid_sleep_operand (rtx *operands, int opno)
|
|
||||||
{
|
|
||||||
switch (GET_CODE (operands[opno]))
|
|
||||||
{
|
|
||||||
case CONST :
|
|
||||||
case CONST_INT :
|
|
||||||
if( UNSIGNED_INT6 (INTVAL (operands[opno])))
|
|
||||||
return true;
|
|
||||||
/* FALLTHRU */
|
|
||||||
default:
|
|
||||||
fatal_error (input_location,
|
|
||||||
"operand for sleep instruction must be an unsigned 6 bit compile-time constant");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Return true if it is ok to make a tail-call to DECL. */
|
/* Return true if it is ok to make a tail-call to DECL. */
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -4778,9 +4778,9 @@
|
|||||||
|
|
||||||
|
|
||||||
(define_insn "sleep"
|
(define_insn "sleep"
|
||||||
[(unspec_volatile [(match_operand:SI 0 "immediate_operand" "L")]
|
[(unspec_volatile [(match_operand:SI 0 "nonmemory_operand" "Lr")]
|
||||||
VUNSPEC_ARC_SLEEP)]
|
VUNSPEC_ARC_SLEEP)]
|
||||||
"check_if_valid_sleep_operand(operands,0)"
|
""
|
||||||
"sleep %0"
|
"sleep %0"
|
||||||
[(set_attr "length" "4")
|
[(set_attr "length" "4")
|
||||||
(set_attr "type" "misc")])
|
(set_attr "type" "misc")])
|
||||||
|
Loading…
Reference in New Issue
Block a user