+2019-03-18 Claudiu Zissulescu <claziss@synopsys.com>
+
+ * config/arc/arc.opt (mcode-density-frame): Get the inital value
+ from TARGET_CODE_DENSITY_FRAME_DEFAULT.
+ * config/arc/elf.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define.
+ * config/arc/linux.h (TARGET_CODE_DENSITY_FRAME_DEFAULT): Define.
+ * config/arc/arc.md (pop_multi_fp_blink): Adjust constraints to
+ match what the ops is doing.
+ (push_multi_fp_blink): Likewise.
+ * config/arc/arc.c (arc_override_options): Enable enter/leave when
+ compiling for size and elf target.
+ (arc_save_callee_enter): Adjust note to match what enter/leave
+ operation does.
+
2019-03-18 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.md (tst_movb): Fix constraint.
if (arc_size_opt_level == 3)
optimize_size = 1;
+ if (TARGET_V2 && optimize_size && (ATTRIBUTE_PCS == 2))
+ TARGET_CODE_DENSITY_FRAME = 1;
+
if (flag_pic)
target_flags |= MASK_NO_SDATA_SET;
reg = gen_rtx_SET (stack_pointer_rtx,
plus_constant (Pmode,
stack_pointer_rtx,
- nregs * UNITS_PER_WORD));
+ -nregs * UNITS_PER_WORD));
RTX_FRAME_RELATED_P (reg) = 1;
XVECEXP (insn, 0, indx++) = reg;
off = nregs * UNITS_PER_WORD;
(plus:SI (reg:SI SP_REG)
(match_operand 1 "immediate_operand" "")))
(set (mem:SI (plus:SI (reg:SI SP_REG)
- (match_dup 1)))
+ (match_operand 2 "immediate_operand"
+ "")))
(reg:SI 13))])]
"TARGET_CODE_DENSITY"
{
rtx tmp = XVECEXP (operands[0], 0, len - 1);
if (MEM_P (XEXP (tmp, 0)))
{
- operands[2] = XEXP (tmp, 1);
- return "enter_s\\t{r13-%2} ; sp=sp-%1";
+ operands[3] = XEXP (tmp, 1);
+ return "enter_s\\t{r13-%3} ; sp=sp+(%1)";
}
else
{
tmp = XVECEXP (operands[0], 0, len - 3);
- operands[2] = XEXP (tmp, 1);
- return "enter_s\\t{r13-%2, fp} ; sp=sp-%1";
+ operands[3] = XEXP (tmp, 1);
+ return "enter_s\\t{r13-%3, fp} ; sp=sp+(%1)";
}
}
[(set_attr "type" "call_no_delay_slot")
(plus:SI (reg:SI SP_REG)
(match_operand 1 "immediate_operand" "")))
(set (mem:SI (plus:SI (reg:SI SP_REG)
- (match_dup 1)))
+ (match_operand 2 "immediate_operand"
+ "")))
(reg:SI RETURN_ADDR_REGNUM))])]
"TARGET_CODE_DENSITY"
{
rtx tmp = XVECEXP (operands[0], 0, len - 1);
if (MEM_P (XEXP (tmp, 0)))
{
- operands[2] = XEXP (tmp, 1);
- return "enter_s\\t{r13-%2, blink} ; sp=sp-%1";
+ operands[3] = XEXP (tmp, 1);
+ return "enter_s\\t{r13-%3, blink} ; sp=sp+(%1)";
}
else
{
tmp = XVECEXP (operands[0], 0, len - 3);
- operands[2] = XEXP (tmp, 1);
- return "enter_s\\t{r13-%2, fp, blink} ; sp=sp-%1";
+ operands[3] = XEXP (tmp, 1);
+ return "enter_s\\t{r13-%3, fp, blink} ; sp=sp+(%1)";
}
}
[(set_attr "type" "call_no_delay_slot")