mirror of https://github.com/aamine/cbc
* net/loveruby/cflat/asm/Symbol.java -> LabelRef.java
* net/loveruby/cflat/asm/*.java: Symbol -> LabelRef. git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4028 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
de82f43658
commit
a95ad7b451
|
@ -1,3 +1,9 @@
|
|||
Tue Sep 16 02:53:07 2008 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/asm/Symbol.java -> LabelRef.java
|
||||
|
||||
* net/loveruby/cflat/asm/*.java: Symbol -> LabelRef.
|
||||
|
||||
Tue Sep 16 02:49:21 2008 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/asm/AsmEntity.java -> AsmOperand.java
|
||||
|
|
2
ToDo
2
ToDo
|
@ -2,7 +2,6 @@
|
|||
|
||||
== Current
|
||||
|
||||
* AsmEntity -> AsmOperand
|
||||
* Symbol -> LabelRef
|
||||
* reject struct/union/array on stmt context
|
||||
* -O (peephole optimization)
|
||||
|
@ -240,3 +239,4 @@
|
|||
- va_list
|
||||
- objectify instruction
|
||||
- fix &puts
|
||||
- AsmEntity -> AsmOperand
|
||||
|
|
|
@ -162,23 +162,23 @@ public class Assembler {
|
|||
//
|
||||
|
||||
public void jmp(Label label) {
|
||||
insn("jmp", new Symbol(label));
|
||||
insn("jmp", new LabelRef(label));
|
||||
}
|
||||
|
||||
public void jz(Label label) {
|
||||
insn("jz", new Symbol(label));
|
||||
insn("jz", new LabelRef(label));
|
||||
}
|
||||
|
||||
public void jnz(Label label) {
|
||||
insn("jnz", new Symbol(label));
|
||||
insn("jnz", new LabelRef(label));
|
||||
}
|
||||
|
||||
public void je(Label label) {
|
||||
insn("je", new Symbol(label));
|
||||
insn("je", new LabelRef(label));
|
||||
}
|
||||
|
||||
public void jne(Label label) {
|
||||
insn("jne", new Symbol(label));
|
||||
insn("jne", new LabelRef(label));
|
||||
}
|
||||
|
||||
public void cmp(Type t, Register a, Register b) {
|
||||
|
@ -239,7 +239,7 @@ public class Assembler {
|
|||
|
||||
// call function by relative address
|
||||
public void call(String sym) {
|
||||
insn("call", new Symbol(new Label(sym)));
|
||||
insn("call", new LabelRef(new Label(sym)));
|
||||
}
|
||||
|
||||
// call function by absolute address
|
||||
|
|
|
@ -4,7 +4,7 @@ public class DirectMemoryReference extends MemoryReference {
|
|||
protected Literal value;
|
||||
|
||||
public DirectMemoryReference(Label label) {
|
||||
this.value = new Symbol(label);
|
||||
this.value = new LabelRef(label);
|
||||
}
|
||||
|
||||
public DirectMemoryReference(IntegerLiteral n) {
|
||||
|
|
|
@ -8,7 +8,7 @@ public class ImmediateValue extends AsmOperand {
|
|||
}
|
||||
|
||||
public ImmediateValue(Label label) {
|
||||
this(new Symbol(label));
|
||||
this(new LabelRef(label));
|
||||
}
|
||||
|
||||
public ImmediateValue(AsmOperand entity) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package net.loveruby.cflat.asm;
|
||||
|
||||
public class Symbol extends Literal {
|
||||
public class LabelRef extends Literal {
|
||||
protected Label label;
|
||||
|
||||
public Symbol(Label label) {
|
||||
public LabelRef(Label label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
Loading…
Reference in New Issue