DontBelieveMe / helix

"Compiler Optimisation Techniques" - BSc Computer Science Final Year Project (Sheffield Hallam University)
2 stars 0 forks source link

Match against multi instruction patterns in arm.md #13

Open DontBelieveMe opened 2 years ago

DontBelieveMe commented 2 years ago

e.g.

(define-insn "load_sgptr"
    [(kInsn_Load
        (match_operand:ptr 0 "global")
        (match_operand:i32 1 "register"))
         (kInsn_SignExtend
        (match_operand:i8 0 "register")
        (match_operand:i32 1 "register"))]
    "movw {1}, :lower16:{0}"
    "movt {1}, :upper16:{0}"
    "ldrsb {1}, [{1}]")

Required for #10 - so that the correct load instruction (e.g. ldrsb, ldrb, ldrsh, ldrh etc...) can be generated when loading from globals that are smaller than 32 bits in size)

DontBelieveMe commented 2 years ago

Moving down from critical -> medium now that it is possible to write code to account for these situations