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).
Esempio n. 1
0
 public static Expr Create(Expr left, Expr right) => new Modulo(left, right);
Esempio n. 2
0
 public IfElseStmt(Expr cond, Stmt trueStmt, Stmt falseStmt) {
     this.Cond = cond;
     this.TrueStmt = trueStmt;
     this.FalseStmt = falseStmt;
 }
Esempio n. 3
0
 private CaseStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
Esempio n. 4
0
 public SwitchStmt(Expr expr, Stmt stmt) {
     this.Expr = expr;
     this.Stmt = stmt;
 }
Esempio n. 5
0
 public IfStmt(Expr cond, Stmt stmt) {
     this.Cond = cond;
     this.Stmt = stmt;
 }
Esempio n. 6
0
 public WhileStmt(Expr cond, Stmt body) {
     this.Cond = cond;
     this.Body = body;
 }
Esempio n. 7
0
 public DoWhileStmt(Stmt body, Expr cond) {
     this.Body = body;
     this.Cond = cond;
 }
Esempio n. 8
0
 private Greater(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 9
0
 private NotEqual(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 10
0
 public static Expr Create(Expr left, Expr right) => new RShift(left, right);
Esempio n. 11
0
 private Less(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 12
0
 private RShift(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 13
0
 private Sub(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 14
0
 private Add(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 15
0
 protected BinaryArithmeticOp(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 16
0
 public static Expr Create(Expr left, Expr right) => new NotEqual(left, right);
Esempio n. 17
0
 protected BinaryOp(Expr left, Expr right) {
     this.Left = left;
     this.Right = right;
 }
Esempio n. 18
0
 private Xor(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 19
0
 public static Stmt Create(Expr cond, Stmt body) =>
     new WhileStmt(cond, body);
Esempio n. 20
0
 public static Expr Create(Expr left, Expr right) => new Xor(left, right);
Esempio n. 21
0
 public static Stmt Create(Stmt body, Expr cond) =>
     new DoWhileStmt(body, cond);
Esempio n. 22
0
 private BitwiseOr(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 23
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new SwitchStmt(expr, stmt);
Esempio n. 24
0
 public static Expr Create(Expr left, Expr right) => new BitwiseOr(left, right);
Esempio n. 25
0
 public static Stmt Create(Expr cond, Stmt stmt) =>
     new IfStmt(cond, stmt);
Esempio n. 26
0
 private LogicalOr(Expr left, Expr right)
     : base(left, right) { }
Esempio n. 27
0
 public static Stmt Create(Expr cond, Stmt trueStmt, Stmt falseStmt) =>
     new IfElseStmt(cond, trueStmt, falseStmt);
Esempio n. 28
0
 public static Expr Create(Expr left, Expr right) =>
     new LogicalOr(left, right);
Esempio n. 29
0
 public static Stmt Create(Expr expr, Stmt stmt) =>
     new CaseStmt(expr, stmt);
Esempio n. 30
0
 private Modulo(Expr left, Expr right)
     : base(left, right) { }