mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
add frameidx support
Make load work Make type inference infer from Arg1 to arg0 as well as from arg0 to arg1 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -159,6 +159,7 @@ class DagNodeValType;
|
|||||||
def DNVT_void : DagNodeValType; // Tree node always returns void
|
def DNVT_void : DagNodeValType; // Tree node always returns void
|
||||||
def DNVT_val : DagNodeValType; // A non-void type
|
def DNVT_val : DagNodeValType; // A non-void type
|
||||||
def DNVT_arg0 : DagNodeValType; // Tree node returns same type as Arg0
|
def DNVT_arg0 : DagNodeValType; // Tree node returns same type as Arg0
|
||||||
|
def DNVT_arg1 : DagNodeValType; // Tree node returns same type as Arg1
|
||||||
def DNVT_ptr : DagNodeValType; // The target pointer type
|
def DNVT_ptr : DagNodeValType; // The target pointer type
|
||||||
|
|
||||||
class DagNode<DagNodeValType ret, list<DagNodeValType> args> {
|
class DagNode<DagNodeValType ret, list<DagNodeValType> args> {
|
||||||
@@ -179,23 +180,23 @@ def set : DagNode<DNVT_void, [DNVT_val, DNVT_arg0]>;
|
|||||||
|
|
||||||
// Terminals...
|
// Terminals...
|
||||||
def imm : BuiltinDagNode<DNVT_val, [], "Constant">;
|
def imm : BuiltinDagNode<DNVT_val, [], "Constant">;
|
||||||
// def frameidx : BuiltinDagNode<DNVT_ptr, [], "FrameIndex">;
|
def frameidx : BuiltinDagNode<DNVT_ptr, [], "FrameIndex">;
|
||||||
|
|
||||||
// Arithmetic...
|
// Arithmetic...
|
||||||
def plus : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "Plus">;
|
def plus : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Plus">;
|
||||||
def minus : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "Minus">;
|
def minus : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Minus">;
|
||||||
def times : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "Times">;
|
def times : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Times">;
|
||||||
def sdiv : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "SDiv">;
|
def sdiv : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "SDiv">;
|
||||||
def udiv : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "UDiv">;
|
def udiv : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "UDiv">;
|
||||||
def srem : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "SRem">;
|
def srem : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "SRem">;
|
||||||
def urem : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "URem">;
|
def urem : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "URem">;
|
||||||
def and : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "And">;
|
def and : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "And">;
|
||||||
def or : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "Or">;
|
def or : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Or">;
|
||||||
def xor : BuiltinDagNode<DNVT_arg0, [DNVT_val, DNVT_arg0], "Xor">;
|
def xor : BuiltinDagNode<DNVT_arg0, [DNVT_arg1, DNVT_arg0], "Xor">;
|
||||||
|
|
||||||
|
|
||||||
def load : DagNode<DNVT_val, [DNVT_ptr]>;
|
def load : BuiltinDagNode<DNVT_val, [DNVT_ptr], "Load">;
|
||||||
//def store : DagNode<2, DNVT_Void>;
|
//def store : BuiltinDagNode<DNVT_Void, [DNVT_ptr, DNVT_val]>;
|
||||||
|
|
||||||
// Other...
|
// Other...
|
||||||
def ret : BuiltinDagNode<DNVT_void, [DNVT_val], "Ret">;
|
def ret : BuiltinDagNode<DNVT_void, [DNVT_val], "Ret">;
|
||||||
|
Reference in New Issue
Block a user