The cdecl calling convention: 1. arguments are passed on the stack, right to left. 2. int values and pointer values are returned in %eax. 3. floats are returned in %st(0). 4. when calling a function, %st(0) ~ %st(7) are all free. 5. functions are free to use %eax, %ecx, %edx, because caller needs to save them. 6. stack must be aligned to 4 bytes (before gcc 4.5, for gcc 4.5+, aligned to 16 bytes).
Example #1
0
 public static Expr Create(Expr left, Expr right) => new Modulo(left, right);
Example #2
0
 public IfElseStmt(Expr cond, Stmt trueStmt, Stmt falseStmt) {
     this.Cond = cond;
     this.TrueStmt = trueStmt;
     this.FalseStmt = falseStmt;
 }
Example #3
0
 private CaseStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
Example #4
0
 public SwitchStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
Example #5
0
 public IfStmt(Expr cond, Stmt stmt) {
     this.Cond = cond;
     this.Stmt = stmt;
 }
Example #6
0
 public WhileStmt(Expr cond, Stmt body) {
     this.Cond = cond;
     this.Body = body;
 }
Example #7
0
 public DoWhileStmt(Stmt body, Expr cond) {
     this.Body = body;
     this.Cond = cond;
 }
Example #8
0
 private Greater(Expr left, Expr right)
     : base(left, right) { }
Example #9
0
 private NotEqual(Expr left, Expr right)
     : base(left, right) { }
Example #10
0
 public static Expr Create(Expr left, Expr right) => new RShift(left, right);
Example #11
0
 private Less(Expr left, Expr right)
     : base(left, right) { }
Example #12
0
 private RShift(Expr left, Expr right)
     : base(left, right) { }
Example #13
0
 private Sub(Expr left, Expr right)
     : base(left, right) { }
Example #14
0
 private Add(Expr left, Expr right)
     : base(left, right) { }
Example #15
0
 protected BinaryArithmeticOp(Expr left, Expr right)
     : base(left, right) { }
Example #16
0
 public static Expr Create(Expr left, Expr right) => new NotEqual(left, right);
Example #17
0
 protected BinaryOp(Expr left, Expr right) {
     this.Left = left;
     this.Right = right;
 }
Example #18
0
 private Xor(Expr left, Expr right)
     : base(left, right) { }
Example #19
0
 public static Stmt Create(Expr cond, Stmt body) =>
     new WhileStmt(cond, body);
Example #20
0
 public static Expr Create(Expr left, Expr right) => new Xor(left, right);
Example #21
0
 public static Stmt Create(Stmt body, Expr cond) =>
     new DoWhileStmt(body, cond);
Example #22
0
 private BitwiseOr(Expr left, Expr right)
     : base(left, right) { }
Example #23
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new SwitchStmt(expr, stmt);
Example #24
0
 public static Expr Create(Expr left, Expr right) => new BitwiseOr(left, right);
Example #25
0
 public static Stmt Create(Expr cond, Stmt stmt) =>
     new IfStmt(cond, stmt);
Example #26
0
 private LogicalOr(Expr left, Expr right)
     : base(left, right) { }
Example #27
0
 public static Stmt Create(Expr cond, Stmt trueStmt, Stmt falseStmt) =>
     new IfElseStmt(cond, trueStmt, falseStmt);
Example #28
0
 public static Expr Create(Expr left, Expr right) =>
     new LogicalOr(left, right);
Example #29
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new CaseStmt(expr, stmt);
Example #30
0
 private Modulo(Expr left, Expr right)
     : base(left, right) { }