📄 m88k.md
字号:
DONE; } operands[1] = m88k_compare_reg;")(define_expand "ble" [(set (pc) (if_then_else (le (match_dup 1) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "if (m88k_compare_reg == 0) { emit_bcnd (LE, operands[0]); DONE; } operands[1] = m88k_compare_reg;")(define_expand "bleu" [(set (pc) (if_then_else (leu (match_dup 1) (const_int 0)) (label_ref (match_operand 0 "" "")) (pc)))] "" "if (m88k_compare_reg == 0) { emit_jump_insn (gen_bxx (emit_test (LEU, VOIDmode), operands[0])); DONE; } operands[1] = m88k_compare_reg;");; The actual conditional branch instruction (both directions). This;; uses two unusual template patterns, %Rx and %Px. %Rx is a prefix code;; for the immediately following condition and reverses the condition iff;; operand `x' is a LABEL_REF. %Px does nothing if `x' is PC and outputs;; the operand if `x' is a LABEL_REF.(define_insn "" [(set (pc) (if_then_else (match_operator 0 "relop" [(match_operand:CC 1 "register_operand" "r") (const_int 0)]) (match_operand 2 "pc_or_label_ref" "") (match_operand 3 "pc_or_label_ref" "")))] "" "*{ if (mostly_false_jump (insn, operands[0])) return \"bb0%. %R2%C0,%1,%P2%P3\"; else return \"bb1%. %R3%C0,%1,%P2%P3\";}" [(set_attr "type" "branch")]);; Branch conditional on scc values. These arise from manipulations on;; compare words above.(define_insn "" [(set (pc) (if_then_else (ne (match_operator 0 "relop" [(match_operand:CC 1 "register_operand" "r") (const_int 0)]) (const_int 0)) (match_operand 2 "pc_or_label_ref" "") (match_operand 3 "pc_or_label_ref" "")))] "" "bb1%. %R3%C0,%1,%P2%P3" [(set_attr "type" "branch")])(define_insn "" [(set (pc) (if_then_else (eq (match_operator 0 "relop" [(match_operand:CC 1 "register_operand" "r") (const_int 0)]) (const_int 0)) (match_operand 2 "pc_or_label_ref" "") (match_operand 3 "pc_or_label_ref" "")))] "" "bb0%. %R3%C0,%1,%P2%P3" [(set_attr "type" "branch")])(define_insn "locate1" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (unspec:SI [(label_ref (match_operand 1 "" ""))] 0)))] "" "or.u %0,%#r0,%#hi16(%1#abdiff)")(define_insn "locate2" [(parallel [(set (reg:SI 1) (pc)) (set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_dup 0) (unspec:SI [(label_ref (match_operand 1 "" ""))] 0)))])] "" "bsr.n %1\;or %0,%0,%#lo16(%1#abdiff)\\n%1:" [(set_attr "length" "2")]);; SImode move instructions(define_expand "movsi" [(set (match_operand:SI 0 "general_operand" "") (match_operand:SI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, SImode, 0)) DONE;}")(define_expand "reload_insi" [(set (match_operand:SI 0 "register_operand" "=r") (match_operand:SI 1 "general_operand" "")) (clobber (match_operand:SI 2 "register_operand" "=&r"))] "" "{ if (emit_move_sequence (operands, SImode, operands[2])) DONE; /* We don't want the clobber emitted, so handle this ourselves. */ emit_insn (gen_rtx (SET, VOIDmode, operands[0], operands[1])); DONE;}")(define_insn "" [(set (match_operand:SI 0 "nonimmediate_operand" "=r,r,m,r,r,r,x,x,x,m") (match_operand:SI 1 "move_operand" "rI,m,rO,J,M,x,r,x,m,x"))] "(register_operand (operands[0], SImode) || register_operand (operands[1], SImode) || operands[1] == const0_rtx)" "@ or %0,%#r0,%1 %V1ld %0,%1 %v0st %r1,%0 subu %0,%#r0,%n1 set %0,%#r0,%s1 mov.s %0,%1 mov.s %0,%1 mov %0,%1 %V1ld %0,%1 %v0st %1,%0" [(set_attr "type" "arith,load,store,arith,bit,mov,mov,mov,load,store")])(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r,r,r,r,r") (match_operand:SI 1 "arith32_operand" "rI,J,L,M,n"))] "" "@ or %0,%#r0,%1 subu %0,%#r0,%n1 or.u %0,%#r0,%X1 set %0,%#r0,%s1 or.u %0,%#r0,%X1\;or %0,%0,%x1" [(set_attr "type" "arith,arith,arith,bit,marith")]);; @@ Why the constraint "in"? Doesn't `i' include `n'?(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")))] "" "or %0,%1,%#lo16(%g2)")(define_insn "" [(set (match_operand:SI 0 "register_operand" "=r") (high:SI (match_operand 1 "" "")))] "" "or.u %0,%#r0,%#hi16(%g1)");; HImode move instructions(define_expand "movhi" [(set (match_operand:HI 0 "general_operand" "") (match_operand:HI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, HImode, 0)) DONE;}")(define_insn "" [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r") (match_operand:HI 1 "move_operand" "rP,m,rO,N"))] "(register_operand (operands[0], HImode) || register_operand (operands[1], HImode) || operands[1] == const0_rtx)" "@ or %0,%#r0,%h1 %V1ld.hu %0,%1 %v0st.h %r1,%0 subu %0,%#r0,%H1" [(set_attr "type" "arith,load,store,arith")])(define_insn "" [(set (match_operand:HI 0 "register_operand" "=r") (subreg:HI (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")) 0))] "!flag_pic" "or %0,%1,%#lo16(%2)");; QImode move instructions(define_expand "movqi" [(set (match_operand:QI 0 "general_operand" "") (match_operand:QI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, QImode, 0)) DONE;}")(define_insn "" [(set (match_operand:QI 0 "nonimmediate_operand" "=r,r,m,r") (match_operand:QI 1 "move_operand" "rP,m,rO,N"))] "(register_operand (operands[0], QImode) || register_operand (operands[1], QImode) || operands[1] == const0_rtx)" "@ or %0,%#r0,%q1 %V1ld.bu %0,%1 %v0st.b %r1,%0 subu %r0,%#r0,%Q1" [(set_attr "type" "arith,load,store,arith")])(define_insn "" [(set (match_operand:QI 0 "register_operand" "=r") (subreg:QI (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")) 0))] "!flag_pic" "or %0,%1,%#lo16(%2)");; DImode move instructions(define_expand "movdi" [(set (match_operand:DI 0 "general_operand" "") (match_operand:DI 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, DImode, 0)) DONE;}")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r,x") (const_int 0))] "" "@ or %0,%#r0,0\;or %d0,%#r0,0 mov %0,%#x0" [(set_attr "type" "marith,mov")])(define_insn "" [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,m,r,x,x,x,m") (match_operand:DI 1 "nonimmediate_operand" "r,m,r,x,r,x,m,x"))] "" "@ or %0,%#r0,%1\;or %d0,%#r0,%d1 %V1ld.d %0,%1 %v0st.d %1,%0 mov.d %0,%1 mov.d %0,%1 mov %0,%1 %V1ld.d %0,%1 %v0st.d %1,%0" [(set_attr "type" "marith,loadd,store,mov,mov,mov,loadd,store")])(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (subreg:DI (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")) 0))] "!flag_pic" "or %0,%1,%#lo16(%2)")(define_insn "" [(set (match_operand:DI 0 "register_operand" "=r") (match_operand:DI 1 "immediate_operand" "n"))] "" "* return output_load_const_dimode (operands);" [(set_attr "type" "marith") (set_attr "length" "4")]) ; length is 2, 3 or 4.;; DFmode move instructions(define_expand "movdf" [(set (match_operand:DF 0 "general_operand" "") (match_operand:DF 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, DFmode, 0)) DONE;}");; @@ This pattern is incomplete and doesn't appear necessary.;;;; This pattern forces (set (reg:DF ...) (const_double ...));; to be reloaded by putting the constant into memory.;; It must come before the more general movdf pattern.;(define_insn ""; [(set (match_operand:DF 0 "general_operand" "=r,o"); (match_operand:DF 1 "" "G,G"))]; "GET_CODE (operands[1]) == CONST_DOUBLE"; "*;{; switch (which_alternative); {; case 0:; return \"or %0,%#r0,0\;or %d0,%#r0,0\";; case 1:; operands[1] = adj_offsettable_operand (operands[0], 4);; return \"%v0st %#r0,%0\;st %#r0,%1\";; };}")(define_insn "" [(set (match_operand:DF 0 "register_operand" "=r,x") (const_int 0))] "" "@ or %0,%#r0,0\;or %d0,%#r0,0 mov %0,%#x0" [(set_attr "type" "marith,mov")])(define_insn "" [(set (match_operand:DF 0 "nonimmediate_operand" "=r,r,m,x,r,x,x,m") (match_operand:DF 1 "nonimmediate_operand" "r,m,r,r,x,x,m,x"))] "" "@ or %0,%#r0,%1\;or %d0,%#r0,%d1 %V1ld.d %0,%1 %v0st.d %1,%0 mov.d %0,%1 mov.d %0,%1 mov %0,%1 %V1ld.d %0,%1 %v0st.d %1,%0" [(set_attr "type" "marith,loadd,store,mov,mov,mov,loadd,store")])(define_insn "" [(set (match_operand:DF 0 "register_operand" "=r") (subreg:DF (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")) 0))] "!flag_pic" "or %0,%1,%#lo16(%2)")(define_insn "" [(set (match_operand:DF 0 "register_operand" "=r") (match_operand:DF 1 "immediate_operand" "F"))] "" "* return output_load_const_double (operands);" [(set_attr "type" "marith") (set_attr "length" "4")]) ; length is 2, 3, or 4.;; SFmode move instructions(define_expand "movsf" [(set (match_operand:SF 0 "general_operand" "") (match_operand:SF 1 "general_operand" ""))] "" "{ if (emit_move_sequence (operands, SFmode, 0)) DONE;}");; @@ What happens to fconst0_rtx?(define_insn "" [(set (match_operand:SF 0 "register_operand" "=r,x") (const_int 0))] "" "@ or %0,%#r0,0 mov %0,%#x0" [(set_attr "type" "arith,mov")])(define_insn "" [(set (match_operand:SF 0 "nonimmediate_operand" "=r,r,m,x,r,x,x,m") (match_operand:SF 1 "nonimmediate_operand" "r,m,r,r,x,x,m,x"))] "" "@ or %0,%#r0,%1 %V1ld %0,%1 %v0st %r1,%0 mov.s %0,%1 mov.s %0,%1 mov %0,%1 %V1ld %0,%1 %v0st %r1,%0" [(set_attr "type" "arith,load,store,mov,mov,mov,load,store")])(define_insn "" [(set (match_operand:SF 0 "register_operand" "=r") (subreg:SF (lo_sum:SI (match_operand:SI 1 "register_operand" "r") (match_operand:SI 2 "immediate_operand" "in")) 0))] "!flag_pic" "or %0,%1,%#lo16(%2)")(define_insn "" [(set (match_operand:SF 0 "register_operand" "=r") (match_operand:SF 1 "immediate_operand" "F"))] "operands[1] != const0_rtx" "* return output_load_const_float (operands);" [(set_attr "type" "marith")]) ; length is 1 or 2.;; String/block move insn. See m88k.c for details.(define_expand "movstrsi" [(parallel [(set (mem:BLK (match_operand:BLK 0 "" "")) (mem:BLK (match_operand:BLK 1 "" ""))) (use (match_operand:SI 2 "arith32_operand" "")) (use (match_operand:SI 3 "immediate_operand" ""))])] "" "{ rtx dest_mem = operands[0]; rtx src_mem = operands[1]; operands[0] = copy_to_mode_reg (SImode, XEXP (operands[0], 0)); operands[1] = copy_to_mode_reg (SImode, XEXP (operands[1], 0)); expand_block_move (dest_mem, src_mem, operands); DONE;}");; Call a non-looping block move library function (e.g. __movstrSI96x64).;; operand 0 is the function name;; operand 1 is the destination pointer;; operand 2 is the source pointer;; operand 3 is the offset for the source and destination pointers;; operand 4 is the first value to be loaded;; operand 5 is the register to hold the value (r4 or r5)(define_expand "call_block_move"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -