+2018-04-04 Kito Cheng <kito.cheng@gmail.com>
+ Monk Chiang <sh.chiang04@gmail.com>
+
+ * config/nds32/nds32.md (movmisalign<mode>): New pattern.
+
2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
* config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
}
})
+(define_expand "movmisalign<mode>"
+ [(set (match_operand:SIDI 0 "general_operand" "")
+ (match_operand:SIDI 1 "general_operand" ""))]
+ ""
+{
+ rtx addr;
+ if (MEM_P (operands[0]) && !REG_P (operands[1]))
+ operands[1] = force_reg (<MODE>mode, operands[1]);
+
+ if (MEM_P (operands[0]))
+ {
+ addr = force_reg (Pmode, XEXP (operands[0], 0));
+ emit_insn (gen_unaligned_store<mode> (addr, operands[1]));
+ }
+ else
+ {
+ addr = force_reg (Pmode, XEXP (operands[1], 0));
+ emit_insn (gen_unaligned_load<mode> (operands[0], addr));
+ }
+ DONE;
+})
(define_expand "movsi"
[(set (match_operand:SI 0 "general_operand" "")