* config/avr/avr.md (adjust_len): Add lpm.
(reload_in<mode>): Use avr_out_lpm for output. Use "lpm" for
adjust_len.
* config/avr/avr-protos.h (avr_out_lpm): New prototype.
* config/avr/avr.c (avr_out_lpm): Make global.
(adjust_insn_length): Handle ADJUST_LEN_LPM.
From-SVN: r191825
+2012-09-28 Georg-Johann Lay <avr@gjlay.de>
+
+ * config/avr/avr.md (adjust_len): Add lpm.
+ (reload_in<mode>): Use avr_out_lpm for output. Use "lpm" for
+ adjust_len.
+ * config/avr/avr-protos.h (avr_out_lpm): New prototype.
+ * config/avr/avr.c (avr_out_lpm): Make global.
+ (adjust_insn_length): Handle ADJUST_LEN_LPM.
+
2012-09-28 Richard Guenther <rguenther@suse.de>
PR lto/47799
extern const char* output_reload_inhi (rtx*, rtx, int*);
extern const char* output_reload_insisf (rtx*, rtx, int*);
extern const char* avr_out_reload_inpsi (rtx*, rtx, int*);
+extern const char* avr_out_lpm (rtx, rtx*, int*);
extern void notice_update_cc (rtx body, rtx insn);
extern int reg_unused_after (rtx insn, rtx reg);
extern int _reg_unused_after (rtx insn, rtx reg);
If PLEN != 0 set *PLEN to the length in words of the instruction sequence.
Return "". */
-static const char*
+const char*
avr_out_lpm (rtx insn, rtx *op, int *plen)
{
rtx xop[7];
case ADJUST_LEN_MOV32: output_movsisf (insn, op, &len); break;
case ADJUST_LEN_MOVMEM: avr_out_movmem (insn, op, &len); break;
case ADJUST_LEN_XLOAD: avr_out_xload (insn, op, &len); break;
+ case ADJUST_LEN_LPM: avr_out_lpm (insn, op, &len); break;
case ADJUST_LEN_SFRACT: avr_out_fract (insn, op, true, &len); break;
case ADJUST_LEN_UFRACT: avr_out_fract (insn, op, false, &len); break;
tsthi, tstpsi, tstsi, compare, compare64, call,
mov8, mov16, mov24, mov32, reload_in16, reload_in24, reload_in32,
ufract, sfract,
- xload, movmem,
+ xload, lpm, movmem,
ashlqi, ashrqi, lshrqi,
ashlhi, ashrhi, lshrhi,
ashlsi, ashrsi, lshrsi,
[(set (match_operand:MOVMODE 0 "register_operand" "=r")
(match_operand:MOVMODE 1 "memory_operand" "m"))
(clobber (match_operand:QI 2 "d_register_operand" "=d"))]
- "MEM_P (operands[1])
- && !ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (operands[1]))"
+ ;; Fixme: The insn condition must not test the address space.
+ ;; Because the gen tools refuse to generate insns for address spaces
+ ;; and will generate insn-codes.h to look like:
+ ;; #define CODE_FOR_reload_inhi CODE_FOR_nothing
+ "reload_completed || reload_in_progress"
{
- return output_movqi (insn, operands, NULL);
+ return avr_out_lpm (insn, operands, NULL);
}
- [(set_attr "adjust_len" "mov8")
+ [(set_attr "adjust_len" "lpm")
(set_attr "cc" "clobber")])