On 9/12/18 12:34 PM, Uros Bizjak wrote:
> Hello!
> 
> Although reg-stack.c is mostly an x86 affair, attached patch decouples
> it from x86 a bit. The patch changes the default mode of pop and swap
> insns to the reg_raw_mode of FIRST_STACK_REG (= XFmode on x86). Also,
> the patch explicitly constructs swap insn, without calling x86
> specific named insn pattern.
> 
> 2018-09-11  Uros Bizjak  <ubiz...@gmail.com>
> 
>     * reg-stack.c: Include regs.h.
>     (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
>     (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
>     FIRST_STACK_REG, not DFmode.
>     (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
>     FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
>     (change stack): Default register mode to the reg_raw_mode of
>     FIRST_STACK_REG, not DFmode.
>     * config/i386/i386.md (*swap<mode>): Remove insn pattern.
>     (*swapxf): Rename from swapxf.
> 
> Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
> 
> No functional changes, but the patch needs middle-end approval.
> 
> OK for mainline?
OK.
jeff

Reply via email to