;; Machine description of the Lattice Mico32 architecture for GNU C compiler.
;; Contributed by Jon Beniston <jon@beniston.com>
-;; Copyright (C) 2009-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2009-2024 Free Software Foundation, Inc.
;; This file is part of GCC.
}
else if (!flag_pic && reloc_operand (operands[1], GET_MODE (operands[1])))
{
- emit_insn (gen_rtx_SET (SImode, operands[0], gen_rtx_HIGH (SImode, operands[1])));
- emit_insn (gen_rtx_SET (SImode, operands[0], gen_rtx_LO_SUM (SImode, operands[0], operands[1])));
+ emit_insn (gen_rtx_SET (operands[0], gen_rtx_HIGH (SImode, operands[1])));
+ emit_insn (gen_rtx_SET (operands[0], gen_rtx_LO_SUM (SImode, operands[0],
+ operands[1])));
DONE;
}
else if (GET_CODE (operands[1]) == CONST_INT)
}
}")
-(define_expand "movmemsi"
+(define_expand "cpymemsi"
[(parallel [(set (match_operand:BLK 0 "general_operand" "")
(match_operand:BLK 1 "general_operand" ""))
(use (match_operand:SI 2 "" ""))
)
(define_insn "movsi_insn"
- [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,m,r,r,r,r,r")
- (match_operand:SI 1 "movsi_rhs_operand" "m,r,r,J,K,L,U,S,Y"))]
+ [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,m,r,r,r,r,r,r")
+ (match_operand:SI 1 "general_operand" "m,r,r,J,K,L,U,S,Y,n"))]
"lm32_move_ok (SImode, operands)"
"@
lw %0, %1
ori %0, r0, %1
orhi %0, r0, hi(%1)
mva %0, gp(%1)
- orhi %0, r0, hi(%1)"
- [(set_attr "type" "load,arith,store,store,arith,arith,arith,arith,arith")]
+ orhi %0, r0, hi(%1)
+ ori %0, r0, lo(%1); orhi %0, %0, hi(%1)"
+ [(set_attr "type" "load,arith,store,store,arith,arith,arith,arith,arith,arith")]
)
;; ---------------------------------
[(set_attr "type" "uibranch")]
)
-(define_insn "return"
+(define_expand "return"
[(return)]
"lm32_can_use_return ()"
+ ""
+)
+
+(define_expand "simple_return"
+ [(simple_return)]
+ ""
+ ""
+)
+
+(define_insn "*return"
+ [(return)]
+ "reload_completed"
+ "ret"
+ [(set_attr "type" "uibranch")]
+)
+
+(define_insn "*simple_return"
+ [(simple_return)]
+ ""
"ret"
[(set_attr "type" "uibranch")]
)