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